Commit graph

5519 commits

Author SHA1 Message Date
sophia
93a5d6033b
Accept a struct as command options 2022-04-25 12:26:08 -05:00
sophia
45e15101df
Add mapper for Struct -> Hash 2022-04-25 12:26:08 -05:00
sophia
ce6b2c8338
Add mapper for communicator command 2022-04-25 12:26:08 -05:00
sophia
4bc2a51748
Pass communincator command 2022-04-25 12:26:08 -05:00
sophia
2e693b60fe
Load remote communincator 2022-04-25 12:26:07 -05:00
sophia
1272c087b9
Setup communincator client 2022-04-25 12:26:07 -05:00
sophia
6903f9bf09
Setup communincator service 2022-04-25 12:26:07 -05:00
sophia
1c03b3b7f2
Return plugins of map hashed by plugin name 2022-04-25 12:26:07 -05:00
Chris Roberts
fbde80af43
Add default mapping for named capabilities 2022-04-25 12:26:05 -05:00
Chris Roberts
ee95d6b01b
Add typed and named seed values 2022-04-25 12:26:05 -05:00
Chris Roberts
167b8bf70d
Use seed util module for clients/services 2022-04-25 12:26:05 -05:00
Chris Roberts
262a4fa099
Add HasSeeds util module for client/service 2022-04-25 12:26:05 -05:00
sophia
841573194e
Add mappers for synced folders and basis 2022-04-25 12:26:05 -05:00
sophia
fb5c2dd339
Add basis client module 2022-04-25 12:26:04 -05:00
sophia
c71f27b17e
Return synced folder + synced folder options from machine 2022-04-25 12:26:04 -05:00
sophia
45cfcc4c34
Return empty response if capability returns an empty response 2022-04-25 12:26:04 -05:00
sophia
46aa1b3e4e
Add synced folder service to list of services 2022-04-25 12:26:04 -05:00
sophia
847d87a017
Get synced folder from machine 2022-04-25 12:26:04 -05:00
sophia
b9a8ff1089
Fill in synced folder service 2022-04-25 12:26:04 -05:00
sophia
cb28412a91
Fill in synced folder client 2022-04-25 12:26:03 -05:00
sophia
168c307aef
Start filling in synced folder service impl 2022-04-25 12:26:03 -05:00
sophia
f70b7268f2
Start adding synced folder client 2022-04-25 12:26:03 -05:00
Chris Roberts
319d86e555
Check graph for cycles before sorting. Fix expansion. 2022-04-25 12:26:03 -05:00
Chris Roberts
4f4a2ae916
Use clone before reversing 2022-04-25 12:26:03 -05:00
Chris Roberts
022f17e711
Use final vertex type for destination in mapper 2022-04-25 12:26:02 -05:00
Chris Roberts
7d548517c9
Add final vertex type to define destination 2022-04-25 12:26:02 -05:00
Chris Roberts
e60e43553e
Do not allow output vertices to be unique 2022-04-25 12:26:02 -05:00
Chris Roberts
f07ef26a64
Machine proto arg is within target 2022-04-25 12:26:02 -05:00
Chris Roberts
da8572cb45
Fix broker argument for statebag proto 2022-04-25 12:26:02 -05:00
Chris Roberts
c7d13e62c7
Ensure output of mapper to unpack funcspec is a proto 2022-04-25 12:26:02 -05:00
Chris Roberts
6a1c5f1c7f
Add default map list for blind mappings. Unpack funcspec before map. 2022-04-25 12:26:02 -05:00
Chris Roberts
ed7f1fcd1e
Start adding Hash like methods to state bag 2022-04-25 12:26:02 -05:00
Chris Roberts
3cc92280f8
Update mappers to include maps from funcspec value to proto 2022-04-25 12:26:02 -05:00
sophia
2513d21054
Return 0 when no boxes are installed
Previously the cli returned 1 for `vagrant box list` if there
are no installed boxes. This is somewhat misleading since the
command completes without an error, it should return 0
2022-04-25 12:26:02 -05:00
Chris Roberts
675bea93cc
Persist cache for thread 2022-04-25 12:26:01 -05:00
Chris Roberts
796d2f2578
Simplify direct mappers 2022-04-25 12:26:01 -05:00
Chris Roberts
100ad1330d
Remove automatic caching and add short circuits 2022-04-25 12:26:01 -05:00
Chris Roberts
c75c20692c
Cache environment and allow mapping without UI 2022-04-25 12:26:01 -05:00
Chris Roberts
ce3f18ada1
Add machine to_proto mapper and update from target 2022-04-25 12:26:01 -05:00
Chris Roberts
b7c04b4ecc
Add project caching in mapper 2022-04-25 12:26:01 -05:00
Chris Roberts
c3fb475abe
Remove target from String mapper 2022-04-25 12:26:00 -05:00
Chris Roberts
d95147bd6f
Re-enable terminal extraction from project 2022-04-25 12:26:00 -05:00
Chris Roberts
3aa4e1bab4
Add mapping for pathnames 2022-04-25 12:26:00 -05:00
Chris Roberts
a0797da229
Argument is only invalid if nil and expected type is not NilClass 2022-04-25 12:26:00 -05:00
Chris Roberts
4b14221be4
Full extract all nested values when mapping 2022-04-25 12:26:00 -05:00
Chris Roberts
74d6dafccf
Use custom Array and Hash mapping 2022-04-25 12:26:00 -05:00
Chris Roberts
0e8ded18aa
Add significant weight to non-direct type matches 2022-04-25 12:26:00 -05:00
Chris Roberts
4e60160797
Update module loading in clients 2022-04-25 12:26:00 -05:00
Chris Roberts
b327dbe7d8
Add resource_id method to project client 2022-04-25 12:26:00 -05:00
Chris Roberts
b8ed8a495f
Map directly to Any value 2022-04-25 12:26:00 -05:00
Chris Roberts
b195772160
Update capability platform service and host/guest usages
Update default arguments to be a map instead of an array so
    expected result values can be provided. Add new method for
    handling arguments so custom adjustments can be applied before
    calling the capability. Add custom argument adjustments to
    guest service to provide machine if one is not given.
2022-04-25 12:25:59 -05:00
Chris Roberts
faac057cca
Build arguments for command via mapper directly 2022-04-25 12:25:59 -05:00
Chris Roberts
f903b0ee31
Provide an alias to the args for consistency 2022-04-25 12:25:59 -05:00
Chris Roberts
63e253b506
Update cacher to use monitor mixin 2022-04-25 12:25:59 -05:00
Chris Roberts
4a97d86b78
Initial updates for direct to any mapping 2022-04-25 12:25:59 -05:00
Chris Roberts
7f937ea544
Add autoload for types 2022-04-25 12:25:58 -05:00
Chris Roberts
1d16a57d64
Include mapper within host client 2022-04-25 12:25:58 -05:00
Chris Roberts
6135b412d3
Increase edge weight when types do not match 2022-04-25 12:25:58 -05:00
Chris Roberts
909bd68126
Adjust edge weights and connect subtypes 2022-04-25 12:25:58 -05:00
Chris Roberts
1d4c57222f
Validate path starts with source and ends with destination 2022-04-25 12:25:58 -05:00
Chris Roberts
870c5f6808
Updates to existing mappers 2022-04-25 12:25:58 -05:00
Chris Roberts
33bb2ff608
Generate any mappers for any known proto types 2022-04-25 12:25:58 -05:00
Chris Roberts
af13724f56
Adjust wrapper type generated mappers 2022-04-25 12:25:58 -05:00
Chris Roberts
68ed3ba1d9
Add any unpacking. Filter blind maps. 2022-04-25 12:25:58 -05:00
Chris Roberts
2712046a9d
Add mapper for direct type to proto 2022-04-25 12:25:58 -05:00
Chris Roberts
917ac04ef1
Add expected types for funcspec maps 2022-04-25 12:25:58 -05:00
Chris Roberts
8310e1bf95
Loaders for types 2022-04-25 12:25:57 -05:00
Chris Roberts
757b97b882
Create a types namespace and add direct type 2022-04-25 12:25:57 -05:00
Chris Roberts
22e34e87e9
Include a #to_proto method for all clients 2022-04-25 12:25:57 -05:00
sophia
7aaeaf2e46
Update protos 2022-04-25 12:25:57 -05:00
sophia
cb458e707a
Ensure path is a string 2022-04-25 12:25:57 -05:00
sophia
d95b563e86
Ensure 0 is returned for successful command 2022-04-25 12:25:57 -05:00
sophia
cec195cecb
Remove boxes from db when deleting 2022-04-25 12:25:56 -05:00
sophia
c5de0d88f7
Add box from ruby 2022-04-25 12:25:56 -05:00
sophia
c50ca3a991
Assume no box found if find returns an error 2022-04-25 12:25:56 -05:00
sophia
69b15f7140
Return list of box info when requesting all boxes 2022-04-25 12:25:56 -05:00
sophia
f71aa68a69
Get box collection from vagrant-go 2022-04-25 12:25:56 -05:00
sophia
fd0df0865c
Add box collection client 2022-04-25 12:25:56 -05:00
sophia
80f3549716
Initialize remote box with client 2022-04-25 12:25:54 -05:00
sophia
085e30053e
Load box from machine 2022-04-25 12:25:53 -05:00
sophia
99694b210b
Add mappers for box proto to client 2022-04-25 12:25:53 -05:00
sophia
235cafddcc
Add box client 2022-04-25 12:25:53 -05:00
Chris Roberts
3f4e446798
Support mapping to unknown destination type 2022-04-25 12:25:50 -05:00
Chris Roberts
5c6587f688
Allow matching mapper input directly on type 2022-04-25 12:25:50 -05:00
Chris Roberts
d1974d9a00
Remove implementations no longer required 2022-04-25 12:25:50 -05:00
Chris Roberts
481d7185a7
Use graph functions for searching and expanding path 2022-04-25 12:25:50 -05:00
Chris Roberts
a6367553c8
When building graph, set weight on vertices 2022-04-25 12:25:50 -05:00
Chris Roberts
482bf15d57
Rebuild graph on top of RGL 2022-04-25 12:25:50 -05:00
Chris Roberts
0a20c9d665
Update weighted vertex to be a decorator 2022-04-25 12:25:50 -05:00
Chris Roberts
2bdfd8b810
Update output format for vertex string methods 2022-04-25 12:25:50 -05:00
sophia
7e0fcc0a24
Define synced folder service endpoints 2022-04-25 12:25:49 -05:00
sophia
08d4438ae1
Start Synced folder service 2022-04-25 12:25:49 -05:00
sophia
c6070c69db
Rename cap command 'target' to 'target-guest'
the target name is already used by the go cli
2022-04-25 12:24:49 -05:00
sophia
4251b2ff7c
Get first level parent from ruby plugins 2022-04-25 12:24:48 -05:00
sophia
cda3ba7b29
Make myplugin have parents darwin and bsd 2022-04-25 12:24:48 -05:00
sophia
bff3af4a00
Make myplugin a parent of bsd plugin 2022-04-25 12:24:48 -05:00
sophia
a3d4c170f0
Fix guest plugin issues 2022-04-25 12:24:47 -05:00
Chris Roberts
7cc07642a5
Use project for host capabilities 2022-04-25 12:24:47 -05:00
Chris Roberts
2d7ce1b9d8
Remove dummy capability from host plugin 2022-04-25 12:24:47 -05:00
Chris Roberts
e6952621d3
Provide bind address in output and log active port 2022-04-25 12:24:47 -05:00
Chris Roberts
c6c7455c8e
Clean up and add some logging output 2022-04-25 12:24:47 -05:00
Chris Roberts
6be33f1f84
Add seed methods to capability client and adjust capability request 2022-04-25 12:24:46 -05:00
Chris Roberts
049c777f69
Use logger utility 2022-04-25 12:24:46 -05:00
Chris Roberts
defd8c9073
Add todo note on capability service seed methods 2022-04-25 12:24:46 -05:00
Chris Roberts
8cd6b5a05b
Initialize logger in method and remove initialize override 2022-04-25 12:24:46 -05:00
Chris Roberts
ec669645ad
Use reader to access logger 2022-04-25 12:24:46 -05:00
Chris Roberts
b7b7fdb9c6
Disable target option on cap command 2022-04-25 12:24:46 -05:00
Chris Roberts
5052e1b9bf
Convert proto list to array using #to_a 2022-04-25 12:24:45 -05:00
Chris Roberts
678ffa60dc
Add state bag argument to dummy capability 2022-04-25 12:24:45 -05:00
Chris Roberts
fa27dc5c4f
Add some logging output from service setup 2022-04-25 12:24:45 -05:00
Chris Roberts
2b146d4179
Host service always wants statebag 2022-04-25 12:24:45 -05:00
Chris Roberts
d25f61e3ef
Force name to string type before downcasing 2022-04-25 12:24:45 -05:00
Chris Roberts
f99911b3ec
Add seed(s) endpoints to capability services 2022-04-25 12:24:45 -05:00
Chris Roberts
4331b09421
Include default args in spec and add readers 2022-04-25 12:24:45 -05:00
Chris Roberts
ca1c1f2042
Add #ui to project client 2022-04-25 12:24:44 -05:00
Chris Roberts
2d2a503f95
Decode value when loading proto 2022-04-25 12:24:44 -05:00
Chris Roberts
48c0c96798
Update namespace for machine 2022-04-25 12:24:44 -05:00
Chris Roberts
d88a1e1346
Load all mappers and support extra args for funcspec processing 2022-04-25 12:24:44 -05:00
Chris Roberts
e94de03560
Include mapper and broker for handling funcspec args 2022-04-25 12:24:44 -05:00
Chris Roberts
4167bf890a
Update dummy capability for testing 2022-04-25 12:24:44 -05:00
Chris Roberts
d37f2ff6fe
Split out mappers implementation to namespaced file 2022-04-25 12:24:44 -05:00
Chris Roberts
d81d505e8a
Add internal tools utilzing graph 2022-04-25 12:24:44 -05:00
Chris Roberts
0a26c040f7
Add a graph implementation and typed vertices 2022-04-25 12:24:44 -05:00
Chris Roberts
87848eec67
Define internal module and add loaders 2022-04-25 12:24:44 -05:00
Chris Roberts
6d682ab7eb
Add simple stack implementation 2022-04-25 12:24:44 -05:00
Chris Roberts
66f8643ae3
Add more mappers 2022-04-25 12:24:43 -05:00
Chris Roberts
c4da3b0cbd
Rename capabilities mapper and convert to symbol 2022-04-25 12:24:43 -05:00
Chris Roberts
eb5969dac0
Add new mappers 2022-04-25 12:24:43 -05:00
Chris Roberts
908135c21e
Fix method name for accessing capability name on message 2022-04-25 12:24:43 -05:00
Chris Roberts
4e35028e3f
Some small mapper adjustments and loaders 2022-04-25 12:24:43 -05:00
Chris Roberts
75b9950ae4
Update capability to request and handle direct args 2022-04-25 12:24:43 -05:00
Chris Roberts
ab6f18093b
Add dummy capability to void host plugin for testing 2022-04-25 12:24:43 -05:00
Chris Roberts
f06b1a0990
Allow capability platform service module to setup all other required modules 2022-04-25 12:24:43 -05:00
Chris Roberts
2a4eba8435
Be more prescriptive on super usage to make Ruby 2.6 happy 2022-04-25 12:24:43 -05:00
Chris Roberts
35277eff21
Remove machine autoload from client top level 2022-04-25 12:24:43 -05:00
Chris Roberts
9909701544
Update references to machine to nest under target 2022-04-25 12:24:42 -05:00
Chris Roberts
3941438ab3
Make machine path represent namespacing 2022-04-25 12:24:42 -05:00
Chris Roberts
c53c84182a
Nest machine within target namespace to match scopes 2022-04-25 12:24:42 -05:00
Chris Roberts
f24b211746
Provide override to lookup TerminalUI for our Terminal client 2022-04-25 12:24:42 -05:00
Chris Roberts
71ce491197
Allow name lookup overrides for proto integration 2022-04-25 12:24:42 -05:00
Chris Roberts
4420feb9cf
Disable cacher usage until mapper is updated 2022-04-25 12:24:42 -05:00
Chris Roberts
84d2dc1c60
Always extend connector when prepending the client setup module 2022-04-25 12:24:42 -05:00
Chris Roberts
2cd54c6079
Update client implementation module usage 2022-04-25 12:24:42 -05:00
Chris Roberts
fd18051b0d
Update module usage within service implementations 2022-04-25 12:24:42 -05:00
Chris Roberts
0401f9cad4
Check super method to be called and force no arguments if none expected
This fixes an issue with Ruby 2.6 where `super` usage when no
    arguments are passed results in an argument error
2022-04-25 12:24:42 -05:00
Chris Roberts
e89d344770
Extract utility modules into isolated files and add more utils 2022-04-25 12:24:41 -05:00
sophia
58ffe630a2
Pass statebag to host detect function 2022-04-25 12:24:41 -05:00
sophia
ca824644a5
Add tests for host service 2022-04-25 12:24:41 -05:00
sophia
dbb9188f87
Use mappers to get NamedCapability argument 2022-04-25 12:24:41 -05:00
sophia
177b06eb22
Add TODOs for extracting capability args 2022-04-25 12:24:41 -05:00
sophia
14d17dfd9d
Return capability execution result 2022-04-25 12:24:41 -05:00
sophia
a23da9bc64
Log ruby detect endpoint 2022-04-25 12:24:41 -05:00
sophia
5892c47ead
Extract common capability platform service for host and guest plugins 2022-04-25 12:24:41 -05:00
sophia
881502654b
Create statebag ruby client 2022-04-25 12:24:40 -05:00
sophia
a2ade36a74
Setup host client so that a golang based host may be used 2022-04-25 12:24:39 -05:00
sophia
0016baef36
Use mappers to extract string funcspec arguments 2022-04-25 12:24:39 -05:00
sophia
434e613856
Test has capability 2022-04-25 12:24:39 -05:00
sophia
04222f0eb6
Define initialize function to be compatible with ruby 2.6 2022-04-25 12:24:39 -05:00
sophia
7477455380
Get parents from guest plugin 2022-04-25 12:24:39 -05:00
sophia
29f14c98b7
Get parents chain from guest plugin 2022-04-25 12:24:38 -05:00
sophia
da64ea69d1
Execute capabilities 2022-04-25 12:24:38 -05:00
sophia
f74037e71d
Try accepting many arguments as protobuf any messages 2022-04-25 12:24:38 -05:00
sophia
dc5b13f930
Save point: get guest capablity function parameters 2022-04-25 12:24:38 -05:00
sophia
19dafb3d85
Add service to check guest for capabilities 2022-04-25 12:24:38 -05:00
Chris Roberts
dc32d6e9a0
Clean up constant aliases and set at top level for everyone 2022-04-25 12:24:38 -05:00
Chris Roberts
ce29c48931
Use mapper when loading funcspec arguments in services 2022-04-25 12:24:38 -05:00
Chris Roberts
fc88c8d580
Add basic mappers for client types 2022-04-25 12:24:38 -05:00
Chris Roberts
c0304101f4
Add a helper utility for setting up the mapper 2022-04-25 12:24:38 -05:00
Chris Roberts
65f733a288
Add a basic mappers implementation 2022-04-25 12:24:37 -05:00
sophia
42796be551
Get machine from project for guest service 2022-04-25 12:24:37 -05:00
sophia
8efc8542b7
Rename guest client 'capability method to match the client interface 2022-04-25 12:24:37 -05:00
sophia
5d46b93a99
Each component client stores their proto 2022-04-25 12:24:37 -05:00
sophia
83a080521e
Add to_proto to machine in order to pass machine protos around to other plugins 2022-04-25 12:24:37 -05:00
sophia
827b50db77
Get client from machine go impl 2022-04-25 12:24:36 -05:00
sophia
3067fe7dba
Add remote guest 2022-04-25 12:24:36 -05:00
sophia
34e7105193
Add guest client 2022-04-25 12:24:36 -05:00
sophia
d196b8635c
Detect Ruby guest plugin 2022-04-25 12:24:36 -05:00
sophia
a1fca2fde8
Add guest server for using Ruby based guest plugins 2022-04-25 12:24:36 -05:00
sophia
ca3d76ca7d
Use project client to populate environment options 2022-04-25 12:24:36 -05:00
sophia
685d555999
Flush out project client 2022-04-25 12:24:36 -05:00
Chris Roberts
82549f5579
Use updated Remote UI class name 2022-04-25 12:24:35 -05:00
Chris Roberts
04c1897869
Update terminal client to add message style 2022-04-25 12:24:34 -05:00
Chris Roberts
3583259fc9
Organizing clients and matching up with core interfaces 2022-04-25 12:24:34 -05:00
Chris Roberts
71d5195fb3
Get provider name from target client 2022-04-25 12:24:33 -05:00
Chris Roberts
61bb2328f3
Remove param documentation from method 2022-04-25 12:24:32 -05:00
Chris Roberts
59116a6773
Fix constant name for identifier 2022-04-25 12:24:32 -05:00
Chris Roberts
073acefea9
Update proto loads and method names 2022-04-25 12:24:32 -05:00
Chris Roberts
1f67fdfb11
Move methods and rename to match interface 2022-04-25 12:24:32 -05:00
Chris Roberts
d2ed78861e
Fix namespace for entry 2022-04-25 12:24:32 -05:00
Chris Roberts
341619fbfd
Use connector module for client loading 2022-04-25 12:24:30 -05:00
Chris Roberts
d458a177f3
Add target client and subclass machine from target 2022-04-25 12:24:30 -05:00
Chris Roberts
d48ec9ace2
Update index autoload entry and target autoload 2022-04-25 12:24:30 -05:00
Chris Roberts
4143abd82d
Remove settings no longer used 2022-04-25 12:24:30 -05:00
Chris Roberts
363a1f30c1
Add module for connection helper 2022-04-25 12:24:30 -05:00
Chris Roberts
a180e8441c
Rename to target index and update 2022-04-25 12:24:30 -05:00
sophia
10a1f1011b
Get datadir for machine and project 2022-04-25 12:24:29 -05:00
sophia
68aa184bee
Get local data path from project 2022-04-25 12:24:28 -05:00
sophia
f722b15661
Remove references to SDK from remote machine index 2022-04-25 12:24:28 -05:00
sophia
f761af3c55
Move client creation into client module 2022-04-25 12:24:28 -05:00
sophia
c71eb9ea0e
UQuery machine index by uuid 2022-04-25 12:24:28 -05:00
sophia
47a0a2d7d2
Record machine client in machine index entry 2022-04-25 12:24:27 -05:00
sophia
6eea1b0afd
Add endpoint for getting all machines from the index 2022-04-25 12:24:27 -05:00
sophia
8808ef353e
Clean up logging 2022-04-25 12:24:27 -05:00
sophia
01fc2926c9
Save machine index entries remotely 2022-04-25 12:24:27 -05:00
sophia
81913d1042
debug target object in machine index 2022-04-25 12:24:27 -05:00
sophia
991f7db5c5
Find target in index 2022-04-25 12:24:27 -05:00
sophia
3bda8b24ef
Save point: Get a target successfully from target index 2022-04-25 12:24:26 -05:00
sophia
6dae3576a3
Get project ref 2022-04-25 12:24:26 -05:00
sophia
1ea5b2ba91
Save point: use target ref to retrieve info from target index 2022-04-25 12:24:26 -05:00
sophia
f3210fff4c
Fill in Ruby machine index client 2022-04-25 12:24:26 -05:00
sophia
7de0fe1bd8
Get machine index remote service setup 2022-04-25 12:24:26 -05:00
sophia
c123335456
Save point: connect to machine index service 2022-04-25 12:24:26 -05:00
sophia
c124a583d7
Add machine index client 2022-04-25 12:24:26 -05:00
Chris Roberts
9e514cc8c1
Remove target from spec 2022-04-25 12:24:25 -05:00
Chris Roberts
ff973e380c
When a machine cannot be loaded, raise exception 2022-04-25 12:24:23 -05:00
Chris Roberts
798e33f6bb
Update synced folder constant name 2022-04-25 12:24:21 -05:00
sophia
a128d98dea
Move to_proto to config classes 2022-04-25 12:24:21 -05:00
sophia
0e40c2eb97
to_proto save point 2022-04-25 12:24:20 -05:00
sophia
ada96f13a3
Upload targets found in Vagrantfile 2022-04-25 12:24:20 -05:00
sophia
85271c616e
Collect config defined by community plugins 2022-04-25 12:24:20 -05:00
sophia
abf0dddd12
Clean up parsing examples/test 2022-04-25 12:24:19 -05:00
sophia
7f9702a095
Successfully parse vagrantfile 2022-04-25 12:24:19 -05:00
sophia
b2dd5be282
Set a default environment for the puppet provisioner 2022-04-25 12:24:18 -05:00
sophia
0923f1edf2
Collect config for Vagrantfile config element that does not exist in Ruby 2022-04-25 12:24:17 -05:00
sophia
4460faa862
Kind of manually parse vagrantfile for provisioners 2022-04-25 12:24:17 -05:00
sophia
c4f0420d72
Parse Vagrantfile to proto 2022-04-25 12:24:17 -05:00
sophia
21dec58ba6
Update vagrantfile parsing for vagrantfile proto changes 2022-04-25 12:24:17 -05:00
sophia
053be35242
Parse Vagrantfiles 2022-04-25 12:24:16 -05:00
Chris Roberts
a8ef49b4fe
Add missing methods for host interface 2022-04-25 12:24:12 -05:00
Chris Roberts
9379f1beb3
Properly handle direct plugin connection without broker 2022-04-25 12:24:12 -05:00
sophia
434cc89a95
Get rid of extra subcommand help message
The available subcommands are displayed using the option parser
in the vagrant client
2022-04-25 12:24:11 -05:00
sophia
e86dc5958a
Clean up debugging cruft 2022-04-25 12:24:09 -05:00
sophia
5ecb1cdc26
Get/set machine id 2022-04-25 12:24:09 -05:00
sophia
fc8fe0a106
Make status work 2022-04-25 12:24:09 -05:00
sophia
340c2d7b19
Save point: load target from project 2022-04-25 12:24:09 -05:00
sophia
b7ce9a8601
Specialize target to machine 2022-04-25 12:24:09 -05:00
sophia
87bd08ef12
Attempt to specialize target to machine 2022-04-25 12:24:09 -05:00
Chris Roberts
9f829e8cb2
Request project when executing command 2022-04-25 12:24:08 -05:00
Chris Roberts
1b0214debc
Being implementing project client in ruby runtime 2022-04-25 12:24:08 -05:00
Chris Roberts
ab1d9ab80f
Provider broker via actual method. Fix scope of exception logger. 2022-04-25 12:24:07 -05:00
Chris Roberts
d6e732cde3
Provide broker when loading terminal UI 2022-04-25 12:24:07 -05:00
Chris Roberts
83d5dd6d26
Pass current broker instance to terminal when loading 2022-04-25 12:24:07 -05:00
Chris Roberts
af2a98907d
Minimum and maximum ports are based on the default range 2022-04-25 12:24:07 -05:00
Chris Roberts
ae9119ad18
Don't pass arguments to parent class on initialization. Broker not a singleton. 2022-04-25 12:24:07 -05:00
Chris Roberts
ef7c6f58b7
Start adding updates for machine client setup 2022-04-25 12:24:05 -05:00
Chris Roberts
3d000609ec
Update autoload definition for terminal client 2022-04-25 12:24:05 -05:00
Chris Roberts
bb7a3b36eb
Add options to define bind address and range of ports for use 2022-04-25 12:24:05 -05:00
Chris Roberts
d34d70442b
Rename terminal client file 2022-04-25 12:24:05 -05:00
Chris Roberts
7dd331d53e
Update method name for generating a new terminal client 2022-04-25 12:24:05 -05:00
Chris Roberts
356c37fd73
Isolate utility modules. Includes broker and logging helper modules. 2022-04-25 12:24:04 -05:00
Chris Roberts
742f94c9e0
Add modules to services and update exception logger usage 2022-04-25 12:24:04 -05:00
Chris Roberts
b6a0ed111a
Expand broker functionality to include server implementation 2022-04-25 12:24:04 -05:00
sophia
de649b2154
Update protos 2022-04-25 12:24:03 -05:00
Chris Roberts
2f0dcda7e8
Check that the result is something that can be used as an exit code 2022-04-25 12:24:03 -05:00
Chris Roberts
c69710329f
Update message access to use spec 2022-04-25 12:24:02 -05:00
sophia
b4f0ef56df
Remove command metadata from service info 2022-04-25 12:24:02 -05:00
sophia
0e618a4fd1
Execute command with subcommand info 2022-04-25 12:24:02 -05:00
sophia
fd29c9df7c
Clean up ruby command service 2022-04-25 12:24:02 -05:00
sophia
5dd5ec84ee
Allow ruby errors to be caught by exception logger 2022-04-25 12:24:02 -05:00
sophia
9f51d87038
Update ruby execute func for new proto 2022-04-25 12:24:02 -05:00
sophia
7fb193f4a2
Add dummy endpoint for subcommands 2022-04-25 12:24:01 -05:00
sophia
3c491fafdd
Register subcommands with subcommands passed as part of command info 2022-04-25 12:24:01 -05:00
sophia
0414be7cf7
Don't get synopsis for subcommands 2022-04-25 12:24:01 -05:00
sophia
261fa5bbae
Fixes for command info message 2022-04-25 12:24:00 -05:00
sophia
06b1caedf8
Register all subcommands 2022-04-25 12:24:00 -05:00
sophia
c676768674
Get subcommands one level deep 2022-04-25 12:24:00 -05:00
sophia
65d990efc9
Start gatching subcommands to register 2022-04-25 12:24:00 -05:00
sophia
072e06ca79
Get list of subcommands 2022-04-25 12:24:00 -05:00
sophia
1f432350ea
Add dummy endpoint for subcommands 2022-04-25 12:24:00 -05:00
sophia
893e37711e
Setup dummy env 2022-04-25 12:24:00 -05:00
sophia
5498c22983
Get help and flags for subcommands 2022-04-25 12:24:00 -05:00
Chris Roberts
62ca9faa43
Use connection ID from broker for terminal UI setup 2022-04-25 12:23:59 -05:00
Chris Roberts
e64f07b109
Include the broker streamer service to handled services 2022-04-25 12:23:58 -05:00
Chris Roberts
63f0b61ed6
Add simple broker implementation for use within Ruby runtime 2022-04-25 12:23:58 -05:00
sophia
edcb9e08bd
Get help and flags for subcommands 2022-04-25 12:23:58 -05:00
sophia
633528318d
Get help from ui output 2022-04-25 12:23:58 -05:00
sophia
0c1e44f553
Get help from commands that have subcommands 2022-04-25 12:23:58 -05:00
sophia
c3ee750db1
Add gogo 2022-04-25 12:23:57 -05:00
sophia
20fbe05c23
Log exceptions from grpc services to file 2022-04-25 12:23:57 -05:00
sophia
8e1e08b9ee
Remove logger 2022-04-25 12:23:57 -05:00
Chris Roberts
55d57595c4
Check lookup for not found error and allow it to fall through 2022-04-25 12:23:56 -05:00
Chris Roberts
f2ef8110bb
Accept command arguments and pass them when executing internal commands 2022-04-25 12:23:56 -05:00
Chris Roberts
64ccbe9121
Updates for ID and state handling 2022-04-25 12:23:56 -05:00
Chris Roberts
4d0959e10c
Match up constant with proto changes. Use reader for client. 2022-04-25 12:23:56 -05:00
Chris Roberts
93f3c70dd0
Update load path modifications and requires for new proto path 2022-04-25 12:23:56 -05:00
Chris Roberts
9a9331ed4d
Add the machine client back in here isolate by resource id 2022-04-25 12:23:56 -05:00
Chris Roberts
548a0339df
Update name and use constant alias 2022-04-25 12:23:56 -05:00
Chris Roberts
28ebbce108
Update to use the service info helper 2022-04-25 12:23:55 -05:00
Chris Roberts
afa31bff58
Provide client and service loader files
The service also includes a service info helper class that
    can wrap requests and extract execution context of request.
    This includes the vagrant service endpoint for connecting
    a client back to the service and the scope of the request.
    It also provides a helper for creating and reusing clients.
2022-04-25 12:23:55 -05:00
Chris Roberts
ac34b3bcdc
Clean up requires, use autoload, set vagrant in server mode 2022-04-25 12:23:55 -05:00
Chris Roberts
7350b85902
Implement enough of the command service to get things working.
Also updates the UI setup so that we can properly get the
    output streaming back to us.
2022-04-25 12:23:55 -05:00
sophia
854a2a4022
Just get the flag names 2022-04-25 12:23:55 -05:00
Chris Roberts
dc64d85adf
Extract option building to standalone method. Update help to use method. 2022-04-25 12:23:54 -05:00
Chris Roberts
11df6c7ae1
Store option parser instance and then extract flags from the result 2022-04-25 12:23:54 -05:00
sophia
1109d89616
Collect flag information 2022-04-25 12:23:54 -05:00
sophia
43e4e968ef
Make help message work 2022-04-25 12:23:54 -05:00
sophia
cadcbe82f7
Hard code less 2022-04-25 12:23:54 -05:00
sophia
078a091709
Start replacing machine variables with calls to core service 2022-04-25 12:23:54 -05:00
sophia
4c26f5b384
Make machine with ui 2022-04-25 12:23:54 -05:00
sophia
fd74318bf5
Pass ui to machine 2022-04-25 12:23:54 -05:00
sophia
c99348413a
Make ui class for interacting with terminal ui service 2022-04-25 12:23:53 -05:00
sophia
b80f19a49d
Add terminal ui to provider 2022-04-25 12:23:53 -05:00
sophia
ea64673e9f
Add terminal client 2022-04-25 12:23:53 -05:00
sophia
f68d470dc9
Fixes from rebase 2022-04-25 12:23:53 -05:00
sophia
3c360722df
Allow communicator to use plugin config 2022-04-25 12:23:53 -05:00
sophia
ad74f18719
Add communicators 2022-04-25 12:23:53 -05:00
sophia
0b1df4593e
Get some more information about Vagrantfile 2022-04-25 12:23:53 -05:00
sophia
8f034b24e2
Parse vagrantfile 2022-04-25 12:23:53 -05:00
sophia
f995a96b09
Setup parse vagrantfile endpoint 2022-04-25 12:23:53 -05:00
Chris Roberts
9071e39782
Remove plugin service. Use internal service instead. 2022-04-25 12:23:52 -05:00
Chris Roberts
8a9c2fe772
Remove internal service as plugin service provides same implementation 2022-04-25 12:23:52 -05:00
Chris Roberts
ae6639d301
Clean up plugin loading and compact registration 2022-04-25 12:23:52 -05:00
Chris Roberts
f915922f7d
Remove generated proto files from within plugin subdirectory 2022-04-25 12:23:52 -05:00
Chris Roberts
851955e1d4
Add command service 2022-04-25 12:23:52 -05:00
Chris Roberts
addf420ca2
Add some helper methods and some adjustments to serve setup 2022-04-25 12:23:52 -05:00
sophia
a268afb945
Setup a batch action for bringin up a machine 2022-04-25 12:23:52 -05:00
sophia
d7f92f9d87
Some update for sdk changes 2022-04-25 12:23:52 -05:00
sophia
7ff0d11582
Move protos into Vagrant module 2022-04-25 12:23:52 -05:00
sophia
773c4bd910
Return an ActionResp 2022-04-25 12:23:52 -05:00
sophia
41f3af51af
Return a result from an up action 2022-04-25 12:23:51 -05:00
sophia
e56013a6b4
Slightly better log location 2022-04-25 12:23:51 -05:00
sophia
a25381b03a
Get the associated requested provider 2022-04-25 12:23:51 -05:00
sophia
7a612698a5
Transform a machine arg to an instance of Vagrant::Machine 2022-04-25 12:23:51 -05:00
sophia
a806a47a1a
Decode incoming machine arg 2022-04-25 12:23:51 -05:00
sophia
a11f5a4dbf
Move proto files into more globally accessible spot 2022-04-25 12:23:51 -05:00
sophia
82e3dd55ad
Setup machine client 2022-04-25 12:23:51 -05:00
sophia
fdcae6e13a
Get a machine instance for action up 2022-04-25 12:23:51 -05:00
sophia
7438d2d7e7
Get to run action up 2022-04-25 12:23:51 -05:00
sophia
6d397a072d
Add provider service 2022-04-25 12:23:51 -05:00
sophia
8cccefb8aa
Add plugin protos 2022-04-25 12:23:51 -05:00
sophia
244bb335c8
Get all plugins 2022-04-25 12:23:50 -05:00
sophia
5a92ba0186
Return list of plugins 2022-04-25 12:23:50 -05:00
sophia
cd04e4385f
Return list of installed plugins 2022-04-25 12:23:50 -05:00
sophia
c02baa9219
Start server as vagrant command 2022-04-25 12:23:50 -05:00
Ralf Brunckhorst
b8197a65b4 Fix sed command for Solaris
"sed -i" is specific to GNU sed and is not a posix standard option.
The default sed command in Solaris is not GNU sed though it is possible
to install the GNU-sed which includes /usr/bin/gsed
2022-04-17 09:37:56 +02:00
Thilak Somasundaram
9c0c3acbae Fix sentense:
"that are you are using" to "that you are using"
2022-01-14 18:30:24 -08:00
Paul Hinze
c02758e1f2
Print output when pushing to Heroku
This is just a convenience enhancement - rather than swallowing all the
output from the Heroku push command, print stdout and stderr like we do
elsewhere with subprocesses. Heoku pushes are pretty involved and dump
lots of useful output, so it should be useful for users to see this.
2022-01-06 18:12:14 -06:00
Paul Hinze
d03a058e04
Fix VAGRANT_CWD handling in vagrant push ftp
When testing all of the push functionality I ran into the fact that the
FTP upload code did not recognize that I had VAGRANT_CWD set, so it
wasn't finding the right files to upload.

This should make everything work properly relative to that location.
2022-01-06 18:09:30 -06:00
Paul Cacheux
2bc1e2927b Fix missing VagrantPlugins::HostDarwin::Cap::Version on Big Sur 2021-11-08 16:22:12 +01:00
Chris Roberts
66b39d45f4
Merge pull request #12575 from chrisroberts/fix-coreos
Fix coreos network configuration
2021-11-05 10:39:26 -07:00
Chris Roberts
cae807fcf0 Configure each device individually to prevent orphan connections 2021-11-04 15:51:08 -07:00
Chris Roberts
8062242f7f Ignore errors when removing existing configurations 2021-11-04 15:26:34 -07:00
Chris Roberts
f9d1025688
Merge pull request #11880 from elastio/bug/11878-rsync-fails-on-windows
[WIP] Change `mkdir` command on Windows for rsync
2021-11-04 15:03:20 -07:00
Chris Roberts
657b2a39d9 Fix network configuration for coreos guests 2021-11-04 14:53:22 -07:00
Chris Roberts
45cb26348e Update atomic detection to prevent overlap with other guests 2021-11-04 14:52:52 -07:00
Chris Roberts
69ddf98607
Merge pull request #12570 from chrisroberts/darwin-nfs
Fix NFS host paths on darwin
2021-11-03 11:06:27 -07:00
Chris Roberts
ac92fd8e1d Access provider driver through machine for version check
Updates the VirtualBox version check for network range validation
    to access the driver via the machine instances provider within the
    passed env.
2021-11-03 09:32:41 -07:00
Chris Roberts
5f0e5652b1 Only resolve path with firmlink prefix on Catalina 2021-11-02 16:44:06 -07:00
Chris Roberts
6810c7b4bb Add version capability to darwin host plugin 2021-11-02 16:43:26 -07:00
Chris Roberts
1cff8c7495 Pass values to exception and define exception message content 2021-11-02 16:42:11 -07:00
Chris Roberts
716f4c0717
Merge pull request #12564 from chrisroberts/vbox-hostonly-validat
Validate VirtualBox hostonly network range
2021-11-02 11:03:44 -07:00
Chris Roberts
48d8cfbbd5
Merge pull request #12555 from collinmcneese/cm/chef_detect
Updates install checks for Chef provisioners
2021-11-02 10:58:46 -07:00
Chris Roberts
2f9a0ac253 Adjust default range 2021-10-29 09:43:47 -07:00
Chris Roberts
b23095eac5 Remove freeze on version to resolve comparison 2021-10-29 08:47:43 -07:00
Chris Roberts
ae7639ec23 Validate VirtualBox hostonly network range
VirtualBox introduced a restriction on the valid range for hostonly
    networks. When using a version of VirtualBox which includes this
    restriction a check is performed on the defined IP address to validate
    it is within either the default range (as defined in the VirtualBox
    documentation) or the values defined in the network configuration
    file.
2021-10-28 17:12:15 -07:00
Collin McNeese
0085124cd8
Updates chef_installed variable names to be more functional
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-10-24 12:32:37 -05:00
Collin McNeese
692cb1ae34
Updates install checks for Chef provisioners
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-10-24 11:38:59 -05:00
Ikko Ashimine
3ccbb3d24b
Fix typo in command.rb
separater -> separator
2021-09-15 02:20:26 +09:00
Chris Roberts
406c4737ec
Merge pull request #12398 from pszlazak/patch-1
Escape spaces in SSH key_path
2021-08-13 15:52:31 -07:00
Dan Čermák
c4ced5459d
Add fallback for SLE 11 guest machines
SLE 11 does not ship systemd and then using systemctl poweroff does not
work. Therefore we fall back to using /sbin/shutdown for machines without
systemd.
This fixes https://github.com/hashicorp/vagrant/issues/12487
2021-08-06 12:55:32 +02:00
Chris Roberts
a02b9b6b2f Use detected device when iterating over available addresses 2021-07-27 08:07:39 -07:00
Chris Roberts
84d3a5fe47 Update compose tests to pass fully through Util::Subprocess 2021-07-12 09:54:56 -07:00
sophia
04977677f1 Pass in docker command opts as a map 2021-07-08 12:15:06 -05:00
Chris Roberts
a8c5980afb Add Rocky Linux guest support 2021-07-02 15:32:48 -07:00
Dan Čermák
8ce38a639b
Use systemctl poweroff in the background instead of shutdown
We have started seeing occasional shutdown failures on openSUSE Tumbleweed with
Virtualbox inside a qemu virtual machine, where `shutdown -h now` would return
nil. While the machine is successfully turned off, the command fails and vagrant
reports an error.
This commit changes the shutdown command to launch in the background which
also triggers a shutdown, but always succeeds.
2021-07-01 09:31:50 +02:00
Chris Roberts
bbd1404c1e
Merge pull request #12437 from chrisroberts/line-buf-shell-util
Line buffer utility and shell provisioner usage
2021-06-29 13:11:19 -07:00
Chris Roberts
32757d56e1
Merge pull request #12304 from grahamhub/issue-12191
implement --info flag for package cmd #12191
2021-06-29 13:07:47 -07:00
Chris Roberts
de8da71c41
Merge pull request #12431 from chrisroberts/ui-tests
Update tests to use real UI instance
2021-06-29 12:47:26 -07:00
Chris Roberts
b1ae4d88fb Update shell provisioner usage of line buffer 2021-06-29 11:04:14 -07:00
Sophia Castellarin
5349a4941d
Merge pull request #12428 from soapy1/check-win-credentials
Check Domain and Application Directory contexts for credentials when validating SMB creds
2021-06-28 10:08:32 -05:00
Rui Lopes
ef18b45786 ensure that the shell provisioner only emits complete output lines to the ui
partial lines are buffered until they are complete (have a line ending)

see https://github.com/hashicorp/vagrant/issues/11047
2021-06-25 15:58:24 -07:00
Chris Roberts
1148658a53 Remove loops since only single device is desired 2021-06-25 15:16:56 -07:00
Chris Roberts
cb23f71e25
Merge pull request #12232 from rgl/fix-hyperv-guest-ip-detection
fix the hyperv guest ip detection by limiting the search to the vagra…
2021-06-25 15:15:49 -07:00
Sophia Castellarin
ca686e3192
Merge pull request #12413 from max-arnold/salt-bootstrap-win-fix
Use more conservative TLS settings to work on older .NET versions
2021-06-24 10:09:10 -05:00
Chris Roberts
3d0d0148e9 Update tests to use real UI instance
Replaces use of UI doubles within tests to use actual UI instance
    to ensure calls are passing parameters correctly.
2021-06-23 14:04:48 -07:00
Chris Roberts
eae6c1d022
Merge pull request #12419 from chrisroberts/fix-local-box-add
Fix local box add with relative path on Windows
2021-06-22 15:45:49 -07:00
sophia
5981f141e3 Check Domain and Application Directory contexts for credentials when validating SMB creds 2021-06-22 17:14:25 -05:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
Sophia Castellarin
750c95272d
Merge pull request #12421 from soapy1/retry-networks-setup-debian
Retry network setup on debain
2021-06-21 09:11:50 -05:00
sophia
681253aed9 Retry network setup on debain
DAD (Duplicate Address Detection) check times out when we add IPv6 interfaces
2021-06-15 17:49:28 -05:00
sophia
fecfe86cb8 Strip whitespace from ansible version
Note: strip! returns nil if there is nothing to be stripped
2021-06-15 15:24:39 -05:00
Chris Roberts
218f8323fb Return original when access token is not removed
When scrubbing box urls of access token parameters, only return
    the processed URL if the access token was removed. If it was not
    removed, return the original URL string. This prevents issues with
    local file URLs being parsed and replaced with invalid paths.

    Fixes: #12340 #12350 #12320
2021-06-11 16:59:35 -07:00
Max Arnold
0416180fb4 Use more conservative TLS settings to work on older .NET versions 2021-06-09 11:07:03 +07:00
pszlazak
ba2c195818
Escape spaces in SSH key_path 2021-05-27 14:34:15 +02:00
Philipp Panzer
89c071d374
detects new versions of ansible-4.0.0+
Ansible has switched dependency between version 3.4.0 (ansible-base) and 4.0.0 (ansible-core), which now outputs new version scheme of "ansible [core 2.11.0]" instead of "ansible 2.10.9".
This fix keeps old and new version detection working.
2021-05-25 13:28:22 +02:00
Sophia Castellarin
8d38ba1cdf
Merge pull request #12127 from max-arnold/salt-bootstrap-win
Always use upstream Salt bootstrap script on Windows
2021-05-24 16:49:51 -05:00
grahamhub
bfa73b06c6 cli: implement --info flag for package #12191 2021-04-15 00:28:41 -05:00
Chris Roberts
7271e02628
Merge pull request #12302 from chrisroberts/linux-reboot
Properly wait for reboot process to start
2021-04-14 15:35:35 -07:00
grahamhub
8ecf0fb0d8 specify correct dir for info.json #12191 2021-04-14 16:18:48 -05:00
Chris Roberts
a088fbba39 Properly wait for reboot process to start
This adds a check to the `#wait_for_reboot` method on the linux
    guest reboot capability to determine if the a reboot is still
    in process. This prevents the reboot process from being initiated
    and the `#ready?` check on the guest being called before the
    system shutdown process has shutdown the communicator process.
2021-04-13 16:42:31 -07:00
Chris Roberts
c5664e479e Fix matching on build output for docker provider 2021-04-13 13:23:43 -07:00
Sophia Castellarin
dfc8cab1cc
Merge pull request #12281 from soapy1/smb-mount-name
Get folder mount name
2021-04-13 13:57:37 -05:00
sophia
82dde55e64 Get folder mount name 2021-04-06 16:25:08 -05:00
sophia
97e4fd2551 Import guest detection module 2021-04-05 16:34:56 -05:00
Chris Roberts
cf51c18ad8 Update authentication middleware access token handling
Replace the `VAGRANT_ALLOW_PARAM_AUTH_TOKEN` environment variable
    with `VAGRANT_SERVER_ACCESS_TOKEN_BY_URL` and update the behavior
    when the environment variable is set to add the access token as
    a query parameter and disable the addition of the authentication
    header.

    Fixes #12080
2021-03-24 17:24:47 -07:00
Chris Roberts
fd4da92245 Check file size prior to upload and automatically adjust options
When uploading box file, check if the size is greater than
    5GB. If the size is larger and the direct to storage option
    is enabled, disable the option due to current 5GB restriction
    on direct uploads.
2021-03-23 15:11:32 -07:00
Chris Roberts
60323fdd6c
Merge pull request #12235 from chrisroberts/api-notify-ups
Prevent notification on default store, fix client end point
2021-03-17 13:57:47 -07:00
Chris Roberts
16e91e4ba2 Do not convert value to allow nil value to pass through 2021-03-17 13:08:43 -07:00
Chris Roberts
d580fbbee2 Use the server url helper method within the client
Some client setup locations where not using the custom helper
    method for the vagrant server URL value so they have been
    updated. The api path is also appended if it is not set for
    custom server URLs
2021-03-15 17:17:10 -07:00
Chris Roberts
867d65b079 Remove access token parameter if found on URL 2021-03-15 15:17:48 -07:00
Chris Roberts
51382a0d0a Deprecate hook and disable access token parameter by default
This sets the `authenticate_box_url` hook as deprecated and also
    disables the cloud auth middleware from adding an access token
    as a URL parameter by default. An environment variable has been
    added which can be used for re-enabling the access token URL
    parameter behavior if required for some legacy system which does
    not support the authorization header.
2021-03-15 14:46:46 -07:00
Rui Lopes
cc9ddc084c fix the hyperv guest ip detection by limiting the search to the vagrant management network interface (the first network interface of the vm) 2021-03-13 11:20:00 +00:00
sophia
fad1819cb0 Detect fedora using os-releases id
OS releases was added to fedora in Feb 2012
c6a541628f
and released into both F17 and F18: https://bugzilla.redhat.com/show_bug.cgi?id=733117

Those have both been EOL'ed since 2014
2021-03-11 11:50:43 -06:00
Sophia Castellarin
33586066f9
Merge pull request #12201 from kpy3/main
FreeBSD updated ansible to py37-ansible
2021-03-08 16:33:39 -06:00
Sophia Castellarin
0c653a3d4f
Merge pull request #12211 from soapy1/get-default-dhcp-ip
Get default dhcp ip from a matching host ip
2021-03-08 13:57:46 -06:00
Sophia Castellarin
ade9ecdde7
Merge pull request #12186 from soapy1/vagrant-destroy-exit-code
Don't count not created machines as declined when destroying
2021-03-08 13:54:03 -06:00
sophia
5d3c37126f Get default dhcp ip from a matching host ip 2021-02-24 15:53:27 -06:00
Sophia Castellarin
6f1ab0ed5e
Merge pull request #12181 from soapy1/alpine-configure-networks
Check if interface exists before shutting it down
2021-02-23 13:21:19 -06:00
sophia
a2fdbc5625 Don't count not created machines as declined when destroying 2021-02-22 16:14:16 -06:00
Sergey Yelin
e95a7f3e8a
FreeBSD updated ansible to py37-ansible 2021-02-20 18:35:07 +03:00
sophia
b30a87ce6c Extract os friendly mount name for vbox shared folders 2021-02-10 15:25:56 -06:00
sophia
b24d4252c5 Check if interface exists before shutting it down 2021-02-10 10:44:36 -06:00
Max Arnold
9f1c13d28c Modernize Salt bootstrap script 2021-01-07 17:07:20 +07:00
Max Arnold
e0211ebeb1 Use saltproject.io domain instead of saltstack.com 2021-01-07 02:13:19 +07:00
Max Arnold
f412672b24 Download upstream Salt bootstrap script into the same temp directory 2021-01-06 21:56:57 +07:00
Max Arnold
5a30570b9a Always use upstream Salt bootstrap script on Windows 2021-01-04 10:49:07 +07:00
Sophia Castellarin
a8363db300
Merge pull request #11791 from jbonhag/e/guest-openwrt
Guest support for OpenWrt
2020-12-22 15:05:48 -06:00
sophia
fffe6ea4a5 Add darwin version cap 2020-11-17 19:21:21 -06:00
sophia
8eea6a2301 Mount vmware synced folders for big sur guests 2020-11-17 19:21:21 -06:00
Chris Roberts
e75c36e1a4
Merge pull request #12011 from amaltson/make-reboot-retry-duration-configurable
Make the max reboot retry duration configurable
2020-11-03 15:47:51 -08:00
Chris Roberts
4751353a5f Fetch reboot env var at run time and keep constant values constant
Keep the default duration as a constant and fetch the custom environment
variable at run time with a fallback to the default. Set the sleep duration
into a constant and add tests covering the expected behaviors when the
default duration is in use as well as the override value. Also match the
environment variable up with the constant just for consistency.
2020-11-03 15:11:10 -08:00
Chris Roberts
eddd21b188
Merge pull request #12017 from chrisroberts/f-token-warning-print
Prevent printing token warning more than once
2020-11-03 14:13:14 -08:00
Chris Roberts
311429d1d3
Merge pull request #11936 from hpaskalev/feature/improved_vbox_installation_check
Detection of availability of VirtualBox provider #11929
2020-11-03 13:54:11 -08:00
Chris Roberts
4253f27901 Prevent printing token warning more than once
Mark warning of double tokens set when initially print to prevent
the warning from being shown multiple times during a single run.
2020-11-03 13:47:53 -08:00
Arthur Maltson
a2f5d615a0 Make max reboot retry duration configurable
Previously the maximum amount of time Vagrant would poll for whether a
machine has successfully reboot was hard coded to 120 seconds. This
change introduces the VAGRANT_MAX_REBOOT_RETRY_TIMEOUT environment
variable to allow this attribute to be configurable.

Add RSpec tests of the maximum retry logic. Since the maximum retries
are configured as a constant, we'd need to reload the class and that's
fairly ugly to do in RSpec.

Fixes #11695
2020-10-31 18:00:01 -04:00
Chris Roberts
8b0790168b Check for filter versions and break up box output 2020-10-30 09:26:07 -07:00
Chris Roberts
baa24af179 Remove all unused code related to the deprecated login command 2020-10-30 09:26:07 -07:00
Chris Roberts
78d309a09b Update cloud command to use refactored library implementation
This PR is dependent on the 2.1.0 release of the vagrant_cloud
library. It updates the `cloud` command to use the new interface
for interacting with the Vagrant Cloud API. It also adds support
for direct to backend storage uploads, and defaults to this
method.

Also included is a bit of cleanup refactoring, addition of method
documentation, and fixing up some small issues around custom username
usage within the internal client for authentication.
2020-10-30 09:26:07 -07:00
Rui Lopes
fcdc63ff89 let the user configure the cloud_init mime part content-disposition filename 2020-10-28 15:57:45 -05:00
Sophia Castellarin
8ad772629b
Merge pull request #11923 from soapy1/arch-smb
Install smbclient when setting up arch smb
2020-10-28 15:40:45 -05:00
Sophia Castellarin
1f9347dd5f
Merge pull request #11996 from soapy1/sles_change_host_name
Don't use hostnamectl if not on system
2020-10-28 15:08:50 -05:00
sophia
12d5b56f14 Fix indentation 2020-10-28 12:35:36 -05:00
sophia
0979cfcf4c Don't use hostnamectl if not on system 2020-10-26 17:06:48 -05:00
sophia
e02bf717b9 Fully replace :nfs option with :type => :nfs for synced folders 2020-10-22 14:59:34 -05:00
sophia
dfb0c3dde1 Add ability to specify target for cap command 2020-10-14 17:34:40 -05:00
sophia
f4640e49ff Ensure provider specific config gets transformed into common form 2020-10-06 16:27:20 -05:00
Hristo Paskalev
865ffb9965 Added proper exception handling whenever VirtualBox installation is corrupt 2020-10-03 15:37:49 +03:00
sophia
0c283e5b50 Install smbclient when setting up arch smb
Leaving out smbclient from the install will cause a cyclical
dependency error.

```
Was getting error
Stderr from the command:

warning: dependency cycle detected:
warning: smbclient will be installed before its cifs-utils dependency
error: failed to commit transaction (conflicting files)
```
2020-09-23 11:59:42 -05:00
sophia
00e4810197 Add mount_name synced folder capability to get name of mount 2020-09-22 16:57:43 -05:00
sophia
3afd646a27 Fix osx guest smb mount 2020-09-22 16:56:11 -05:00
sophia
11aeafea5c Add tests for smb mount options driven through synced folder capabilities 2020-09-22 16:56:11 -05:00
sophia
583b3f5332 Persist smb mounts 2020-09-22 16:53:10 -05:00
sophia
7e698b757d Mount smb folders using mount options from cap 2020-09-22 16:53:10 -05:00
Sophia Castellarin
70d37e8a9c
Merge pull request #11835 from soapy1/remove-url-token
Download a box by setting auth headers
2020-09-22 15:35:30 -05:00
Sophia Castellarin
0d0935fce7
Merge pull request #11909 from soapy1/fstab-mod
Create fstab if does not exist
2020-09-22 14:29:09 -05:00
Chris Roberts
4b07f2d1fa
Merge pull request #11912 from kipal/assume-yes-cloud-version-release
--yes options added to CloudCommand::VersionCommand::Command::Release
2020-09-22 11:38:48 -07:00
Chris Roberts
7103be62b9
Merge pull request #11867 from marxarelli/fix/storage-controller-array-sort
Avoid sorting of controllers with nil boot_priority
2020-09-22 11:36:02 -07:00
Nandor Kiss
cc3cdfe452 --force instead of --yes. 2020-09-22 20:13:30 +02:00
Nandor Kiss
59d398c405 --yes at vagrant cloud version release command. 2020-09-16 22:25:41 +02:00
sophia
b6aebeacae Use '-r' xargs argument
This will pervent running sed if there are no results
passed to xargs
2020-09-16 10:36:55 -05:00
sophia
0831df2e7f Create fstab if does not exist 2020-09-15 15:38:32 -05:00
sophia
d6a88f666f Add some docstrings and logging 2020-09-15 15:01:01 -05:00
Sophia Castellarin
bc949da980
Merge pull request #11877 from soapy1/rhel-check-network-files
Check for existence of network files before trying to update them
2020-09-15 11:13:06 -05:00
Sophia Castellarin
3a407c9dfa
Merge pull request #11885 from soapy1/debian-host-name-order
Set hostname in /etc/hosts as first step to changing hostname
2020-09-15 11:11:12 -05:00
sophia
7370f24318 Check for existence of network files before trying to update them 2020-09-14 11:10:52 -05:00
sophia
41fa71081f Add check for /etc/fstab 2020-09-14 09:43:07 -05:00
sophia
638e3d35b9 Set hostname in /etc/hosts as first step to changing hostname 2020-09-08 11:03:02 -05:00
Adam Nelson
a606822fff Change mkdir command on Windows for rsync
This corrects the `mkdir` command used by rsync on Windows to make sure
the destination directory exists before starting to sync.  The old form
was correct on Linux but not on Windows, and it was just a coincidence
that the `-p` argument appeared to be work.
2020-09-04 12:01:41 +02:00
Dan Duvall
1b0f5120c6 Avoid sorting of controllers with nil boot_priority
Some unsupported storage controllers (e.g. floppy) report a nil
boot_priority which results in a failed sort. Select only supported
storage controllers to avoid that case.
2020-09-01 09:57:55 -07:00
Sophia Castellarin
3835da3839
Merge pull request #11797 from soapy1/synced-folder-caps
Synced folder caps for mount options and default fstab modification behaviour
2020-08-21 11:44:15 -05:00
sophia
23901fddf5 Simplify vm config for determining fstab modification setting 2020-08-21 11:10:01 -05:00
sophia
fffc555faf Add tests for new hook 2020-08-21 10:54:43 -05:00
sophia
649f69747f Check for nil return from forwarded ports cap
Nil may be returned if the forwarded ports cap is called while the
machine is not in a running state.
2020-08-19 17:13:33 -05:00
sophia
56fa014af8 Don't persist shared folders if mount options capability not provided 2020-08-19 15:47:21 -05:00
Chris Roberts
cd2d84fda7 Adjust synced folder collection class 2020-08-19 15:00:40 -05:00
sophia
2a8372a272 Add mount type cap 2020-08-19 15:00:40 -05:00
sophia
7577c11eb6 Persist synced folders in action 2020-08-19 15:00:40 -05:00
sophia
bc898e385d Update tests for synced folder typed hash 2020-08-19 15:00:40 -05:00
sophia
2239ee8582 Create Hash with type attribute 2020-08-19 15:00:40 -05:00
sophia
faad9f2717 Add tests 2020-08-19 15:00:40 -05:00
sophia
de28cec95f Add mount options cap for smb 2020-08-19 15:00:40 -05:00
sophia
cde39e26ba Make mount options a synced_folder capability 2020-08-19 15:00:40 -05:00
sophia
afd2a28f60 Add synced_folder_capability 2020-08-19 15:00:40 -05:00
sophia
0d1635303f Sperate hook for authenticating url and adding headers for authentication 2020-08-18 17:42:59 -05:00
sophia
f440012b30 Scrub token from logs 2020-08-18 10:51:42 -05:00
sophia
b5f6df9ec0 Download a box by setting auth headers 2020-08-18 10:13:39 -05:00
sophia
e7e956ca12 Fix a few deprecation warnings for ruby 2.7 2020-08-10 16:32:54 -05:00
Chris Roberts
5003bb6e15 Updates to address all Ruby deprecations and warnings
This includes updates for resolving all warnings provided by Ruby
for deprecations and/or removed methods. It also enables support
for Ruby 2.7 in the specification constraint as all 2.7 related
warnings are resolved with this changeset.
2020-08-10 13:05:41 -07:00
Sophia Castellarin
5135bdfc2e
Merge pull request #11809 from soapy1/fix-secure-boot
Fix if statement to use '-and' syntax
2020-08-07 17:43:34 -05:00
sophia
e3223b67ff Fix if statement to use '-and' syntax
Docs for powershell:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logical_operators?view=powershell-7
2020-08-07 17:24:49 -05:00
Chris Roberts
786273c1ab
Merge pull request #11795 from LachlanArthur/smb-credential-check-2
Fix SMB credential checks
2020-08-07 15:17:58 -07:00
Sophia Castellarin
a2811909be
Merge pull request #11618 from jbonhag/fix/empty-box
Treat an empty box value as invalid
2020-08-07 11:18:33 -05:00
Sophia Castellarin
be10e060e6
Merge pull request #11732 from soapy1/detach-from-subprocess
Detach from subprocess
2020-08-07 11:11:03 -05:00
Sophia Castellarin
e3b0784272
Merge pull request #11704 from soapy1/change-host-name-cap-arch
Make alt + arch + atomic-host +debian + gentoo + slackware + pld + photon + rhel +suse guests respect hostname network config option
2020-08-07 10:58:05 -05:00
Sophia Castellarin
bedd141381
Merge pull request #11721 from jbonhag/f/ssh-nil-exit-status
Raise an error on nil exit status
2020-08-07 10:55:58 -05:00
cam
67fdc3855f HyperV - Adding ability to disable Enhanced session transport type 2020-08-06 16:04:21 -07:00
Cameron Jack
41948a1ca9 Moving hyper-v enhanced session message to I18n 2020-08-06 16:04:21 -07:00
cam
f6875818dc Hyperv: moving session transport type config from string to boolean for enhanced mode aka HvSocker 2020-08-06 16:04:17 -07:00
cam
3dd7c89bf0 hyper-v: Hyper-V: add support for EnhancedSessionTransportType. Addresses #9823 2020-08-06 16:02:26 -07:00
Sophia Castellarin
c17ba03904
Merge pull request #11773 from soapy1/cloud-init-wait-action
Add cloud init wait action
2020-08-06 16:28:45 -05:00
sophia
6341563e84 Allow Linux RDP cap detach from rdp process for consistency 2020-08-06 16:19:11 -05:00
Sophia Castellarin
7bd937c21b
Merge pull request #11806 from soapy1/allow-version-tag-docker-provisioner
Allow docker run images to specify version with ':'
2020-08-06 16:00:25 -05:00
sophia
a1d429a4e8 Raise more descriptive error if cloud init fails 2020-08-06 15:47:36 -05:00
sophia
f69f87625a Allow docker run images to specify version with ':' 2020-08-06 10:25:19 -05:00
sophia
187d8e9cfd Allow file provisioner to copy empty folders 2020-08-05 15:56:04 -05:00
sophia
e4367d1539 Refactor linux change host cap 2020-08-05 15:12:45 -05:00
Jeff Bonhag
abf4a4c9c5
Display machine name in error message
Co-authored-by: Brian Cain <bcain@hashicorp.com>
2020-07-31 15:19:29 -04:00
Jeff Bonhag
862399905f
Detect older versions of OpenWrt 2020-07-30 17:20:29 -04:00
Sophia Castellarin
f49e9f9700
Merge pull request #11719 from soapy1/change-host-name-cap-darwin
Make darwin + openbsd +freebsd guest respect 'hostname' network config option
2020-07-30 12:27:38 -05:00
Sophia Castellarin
09f2c2716f
Merge pull request #11718 from soapy1/change-host-name-cap-alpine
Make alpine guest respect 'hostname' network config option
2020-07-30 11:29:34 -05:00