30 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
2af4ee0859 Always store values even when not registered 2022-06-15 11:06:33 -07:00
Chris Roberts
dfc2a6d6f4 Make dummy config a proper config instance and remove to_proto 2022-06-15 11:06:33 -07: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
Paul Hinze
92c345b42d
Allow go push plugins to use config from Vagrantfile
* Populate push configs when parsing the vagrantfile
* Allow untyped configs to be shipped over GRPC
* In our demo plugin, walk the vagrantfile and snag the config

Example Vagrantfile that works with the demo plugin:

```ruby
Vagrant.configure("2") do |config|
  config.push.define "myplugin" do |push|
    push.coolkey = "coolvalue"
    push.alist = ["so", "many", "items"]
    push.ahash = { "hashkey" => "hashvalue" }
  end
end

```
2022-04-25 12:26:21 -05:00
Paul Hinze
a841da4fc6
Add a simple push plugin in Go
The only tweak required to get this to work was allowing a DummyConfig
to survive being passed through a remote plugin on the Ruby side.
2022-04-25 12:26:21 -05:00
sophia
8d1b9a4a8c
Update regex for dummy config fields 2022-04-25 12:24:20 -05:00
sophia
b152cc4f2b
Allow dummy config to eval config blocks to set instance variables 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
Brian Cain
6051f3598e
Fixes #10224: Allow validation of config while ignoring provider
This commit adds a new flag to the `vagrant validate` command which
allows users to completely ignore the provider block of a config file.
This is useful for when you are running `vagrant validate` in CI and
don't want to install a valid provider to check the syntax of your
Vagratnfile. When the flag is invoked, a warning will be displayed
saying that the provider block will be ignored and not validated.
2018-10-30 13:37:22 -07:00
Chris Roberts
257441ed78 Log location of caller for missing configuration key requests 2018-01-03 09:41:45 -08:00
Seth Vargo
d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Alex Rodionov
34ec385c81 core: public_send vs send when merging configs
This fixes the problem when config keys collide with Kernel/Object
methods (private). An example is `exec` which is used in vagrant-exec
plugin.

Compare:

> old.send :exec
ArgumentError: wrong number of arguments (0 for 1+)
> old.public_send :exec
=> #<Vagrant::Config::V2::DummyConfig:0x007fe212cc05c8>
2014-05-07 19:02:21 +07:00
Mitchell Hashimoto
4df8636c38 core: instantiate all keys in a V2 config prior to merging
This forces everything to get a new instance, so we don't accidentally
overwrite any values across multiple machines.
2014-04-21 13:55:30 -07:00
Mitchell Hashimoto
f72db0c611 core: config raises NoMethodError on bad calls once finalized 2014-02-05 16:14:58 -08:00
phinze
ee44e717f0 core: fix small comment typo 2013-11-27 18:56:48 -06:00
Mitchell Hashimoto
7ef6c5d9d7 Unused config objects are finalized properly [GH-1877] 2013-07-23 17:36:48 -05:00
Mitchell Hashimoto
7547a0d34a V2 missing key returns a DummyConfig as well 2013-02-28 00:17:58 -08:00
Mitchell Hashimoto
d15acde8c0 Capture missing key calls in V1 configs and record them as warnings 2013-02-28 00:06:49 -08:00
Mitchell Hashimoto
595d6f7848 Record invalid key accesses as an error on config 2013-02-08 16:54:24 -08:00
Mitchell Hashimoto
2d57afbbda Support warnings/errors when upgrading Vagrantfiles internally 2013-01-20 22:04:50 -05:00
Mitchell Hashimoto
e651eb3aa1 Add a V2 config helper to merge errors since that seems common 2013-01-18 13:03:07 -08:00
Mitchell Hashimoto
3f3c7027aa Machine objects are passed into validate instead of env 2013-01-18 12:43:53 -08:00
Mitchell Hashimoto
a8b57ba13f Ignore empty error groups 2013-01-18 12:27:29 -08:00
Mitchell Hashimoto
e6f9586d83 New validation method on the root that returns errors 2013-01-18 12:14:40 -08:00
Mitchell Hashimoto
53860f90ab V2 loader now properly upgrades V1 configuration.
This is done by calling the `upgrade` method on the _old_ configuration
classes. The old configuration classes are given the complete new
configuration and can set whatever settings they need to on it.
2012-11-07 20:01:39 -08:00
Mitchell Hashimoto
d254d6f718 Configure the V2 kernel. 2012-11-06 21:28:44 -08:00
Mitchell Hashimoto
be294e002a Build the v2 interface, which is just a copy of V1 for now. 2012-11-06 20:51:03 -08:00