Paul Hinze
02a06bca45
Fixes for provider capability invocations
...
It looks like I might have been the first to hit provider cabability
invocation in testing these changes, and so I found these few missing
methods on the client. They're just copied over from the other
capability hosts.
Calling capabilities on a provider also revealed that the wrong Machine
type was being pulled out of the funcspec args, so we had to correct
that too in order to get the capability calls working.
2022-05-25 16:19:50 -05:00
Paul Hinze
e605132321
Pass along provider to environment.target
...
Mirrors change in https://github.com/hashicorp/vagrant-plugin-sdk/pull/157
2022-05-25 16:19:50 -05:00
Paul Hinze
06350a7afc
Port default provider selection
...
- Pulls in the SDK changes to Project.DefaultProvider and Project.Target
- Implements the hefty default provider method
- Un-hard-codes provider from Target, and sets it when a Target is
looked up from a Project
2022-05-25 16:19:50 -05:00
Paul Hinze
f221614187
Fix duplicate guess_provider call
...
No reason to call it twice when it's already being stored in a local
variable that's unmodified.
Also document the params for this method to help lay the groundwork for
porting.
2022-05-25 16:19:50 -05:00
sophia
dc1687e1ab
go generate
2022-05-17 15:03:24 -05:00
sophia
d708bab84a
Add error message for errors originating from a remote
2022-05-13 17:14:50 -05:00
Paul Hinze
8ff4fd674c
Add back in some respond_to checks
...
Helps Environment::Remote to work when it's handed a Basis client for
operations like `box list` and `vagrant init`.
2022-05-06 15:23:54 -05:00
sophia
e020c6600e
Hacks to let a remote machine be instantiated with or with out a client
2022-05-04 11:25:54 -05:00
sophia
a40d890f74
Instantiate provider for remote machine
2022-05-04 11:25:18 -05:00
sophia
6c10944c52
Clean up unused functions
2022-05-04 11:23:12 -05:00
sophia
053d658e52
Get default provider from go side
...
For now the go side will just return a hard coded value for the
default provider. It should be implementing the algorithm defined
at https://www.vagrantup.com/docs/providers/basic_usage.html#default-provider
2022-05-04 11:23:12 -05:00
sophia
92a0b1c541
Allow remote machine to be initialized with just a machine client
2022-05-04 11:23:06 -05:00
sophia
0117c01e4b
Fill in environment remote class
2022-05-04 11:22:41 -05:00
sophia
2000a53b06
Initialize from client if provided, otherwise from passed in environment
2022-05-04 09:32:36 -05:00
sophia
0a37521ef2
Remove reload machine function from the grpc api
2022-05-04 09:32:36 -05:00
sophia
6dfca17d54
Get machine state from go impl
2022-05-04 09:32:36 -05:00
sophia
b4fbf76a33
Plug machine#uid methods into remote go backend
2022-05-04 09:32:36 -05:00
sophia
5ab49f33bc
Refactor remote machine
2022-05-04 09:32:36 -05:00
Chris Roberts
bbf7e0fb12
Generated proto updates
2022-04-25 16:12:38 -07:00
sophia
3b8bf20b48
go generate
2022-04-25 14:12:28 -05:00
sophia
875c44b324
go generate
2022-04-25 12:26:58 -05:00
sophia
016a9a0efc
Remove box metadata ToMap functions
...
Box metadata is no longer passed around as a map. Instead it is
it's own service.
2022-04-25 12:26:57 -05:00
sophia
cddcfef0a1
Update Box#UpdateInfo to use box metadata client
2022-04-25 12:26:57 -05:00
sophia
8f23ce0d84
Return nil if box does not have an update
2022-04-25 12:26:57 -05:00
sophia
bb3da1e7db
Create box metadata from hash
2022-04-25 12:26:57 -05:00
sophia
147aa06cfd
Downcase and stringify metadata to create StringIO
2022-04-25 12:26:57 -05:00
sophia
35c094f570
Get box update info
2022-04-25 12:26:57 -05:00
sophia
495902a5df
go generate
2022-04-25 12:26:57 -05:00
Chris Roberts
81ec1173c2
Remove symbol transformation in config
2022-04-25 12:26:56 -05:00
Chris Roberts
a8edd7a031
Generated proto update
2022-04-25 12:26:56 -05:00
Paul Hinze
e5a75b78ec
Update Environment::Remote to match Environment changes
...
Since the `initialize` method is copied over, we need to mirror changes
from #250 into that copy
2022-04-25 12:26:55 -05:00
Paul Hinze
2707d09181
Fix prepend/append action hooks firing multiple times
...
This addresses the surprising behavior that the StoreBoxMetadata hook
was running many times during a machine up, including during failed
operations where a destroy_on_error deleted the machine. This was
resulting in an error that looked like:
> No such file or directory @ rb_sysopen [...] /[...]/box_meta
Plugin action hooks using prepend/append were attaching every time a
Builder was run, including sub-Builders that show up for things like
Call actions.
To fix this, we tell Builders if they are "primary" and only run
prepend/append on those. See inline comments for more explanation.
2022-04-25 12:26:55 -05:00
sophia
9dcb9df7ff
Let mappers convert machine to proto opposed to client
2022-04-25 12:26:55 -05:00
sophia
7b470d4b25
Ensure box metadata has optional arguments
2022-04-25 12:26:53 -05:00
sophia
c464569794
Remove extra logging
2022-04-25 12:26:53 -05:00
sophia
8adbab2f22
Sort box metadata versions
2022-04-25 12:26:53 -05:00
sophia
03ecb877e6
Update box metadata Name endpoint to boxName
2022-04-25 12:26:53 -05:00
sophia
66524426d0
Update ruby remote box metadata for proto changes
2022-04-25 12:26:53 -05:00
sophia
7f099bc30d
go generate
2022-04-25 12:26:53 -05:00
sophia
33c9d23a2e
go generate
2022-04-25 12:26:52 -05:00
sophia
428c3b02fd
Use remote box metadata implementation
2022-04-25 12:26:52 -05:00
sophia
84a6950c9e
go generate
2022-04-25 12:26:52 -05:00
sophia
9bf59a0d42
Rely on proto mappers to convert configs
2022-04-25 12:26:51 -05:00
sophia
436518e445
No need to stringify hash keys when using mappers
2022-04-25 12:26:51 -05:00
sophia
7dd3649d73
Update Symbol proto mappers
2022-04-25 12:26:51 -05:00
sophia
d5aacc0bc6
Thrash around making to proto for config faster
2022-04-25 12:26:51 -05:00
sophia
f4811af759
Use symbol proto when protoizing plugin configs
2022-04-25 12:26:51 -05:00
sophia
ccf2bf6197
Pass config as a SDK hash in order to use the Symbol proto
2022-04-25 12:26:51 -05:00
sophia
a0cec28849
go generate
2022-04-25 12:26:50 -05:00
sophia
77a06e83d0
Close core plugins
2022-04-25 12:26:50 -05:00