111 Commits

Author SHA1 Message Date
Mitchell Hashimoto
798704c6d2 Move the loader into the Config::V1 namespace. 2012-06-26 15:06:03 -07:00
Mitchell Hashimoto
41bc8e7454 Move Config::V1::Base to Vagrant::Plugin::V1::Config 2012-06-24 17:06:11 -07:00
Mitchell Hashimoto
6231bef3f0 Simple logging text change 2012-06-23 23:40:55 -07:00
Mitchell Hashimoto
7a299ae2de Configuration loader can handle upgrading.
The basic process for this is to:

1. Load the configuration using the proper loader for that version. i.e.
   if you're loading V1 config, then use the V1 loader.
2. If we just loaded a version that isn't current (imagine we're
   currently at V3), then we need to upgrade that config. So we first
   ask the V2 loader to upgrade the V1 config to V2, then we ask the V3
   loader to upgrade the V2 config to V3. We keep track of warnings and
   errors throughout this process.
3. Finally, we have a current config, so we merge it into the in-process
   configuration that is being loaded.
2012-06-23 19:56:31 -07:00
Mitchell Hashimoto
9bc1ea5f04 Use config finalize to move some version-specific logic to the version
This moves out the concept of a "default VM" from the Environment class
and makes it the responsibility of the V1 configuration that at least
one VM is defined on it. This lets the configuration ultimately decide
what a "default" implementation is.
2012-06-23 12:48:53 -07:00
Mitchell Hashimoto
70fb804128 Configuration versions can finalize config after loading
This is useful so that it can take a look at the final loaded
configuration object and possibly make some tweaks to the configuration
object. The use case this was built for was so that config V1 can verify
that there is always at least a single VM defined as a sub-VM, the
"default" VM.
2012-06-23 12:27:32 -07:00
Mitchell Hashimoto
7e19d6849b Config loader no longer assumes latest version for procs.
Previously, all procs were assumed to just be the current version. This
is certainly not going to be true always so now the version number of
the configuration must be explicit if you're assigning a proc to the
configuration loader.
2012-06-23 12:06:54 -07:00
Mitchell Hashimoto
b3db82e516 Separate out the versions the config loader knows as init params.
This means that the Config::Loader now only knows how to load
configuration for versions used to initialize the class. This lets
things like the tests be completely isolated from what the actual
configuration is for Vagrant. This will be immensely useful to verify
that the loader functionality works for non-trivial bits (like
upgrading) without depending on Vagrant's upgrading functionality.
2012-06-23 11:33:53 -07:00
Mitchell Hashimoto
51be92eeb6 Remove dependence on V1 Kernel from Environment 2012-06-14 18:46:48 -07:00
Mitchell Hashimoto
3204b3a580 Vagrant.configure and versioned configuration
Vagrant.configure is now how configuration is done in Vagrantfiles
(previously it was Vagrant::Config.run). This function takes a single
argument which is the version of configuration to use.

Various internals were updated for this new versioned configuration.

Note that multiple versions of configuration aren't yet used so aren't
fully supported by Vagrant, but the foundation is being set here.
2012-05-21 21:47:01 -07:00
Mitchell Hashimoto
95e554314e Foundation for supporting multiple version types
I created VersionBase which is the abstract base class for any
configuration versions. Configuration versions are responsible for
knowing how to load configuration given a proc (from a
Vagrant.configure block), as well as merging configuration procs. In the
future, it will have to upgrade versions as well. This is not done yet.

The VERSIONS constant was added to Vagrant::Config which is a registry
to keep track of all the available configuration versions. The
VERSIONS_ORDER constant is an array of the ordering of these versions.
The ordering is important so that in the future Vagrant can attempt to
gracefully upgrade the configurations. It is also used to determine the
current configuration version (which is assumed to be the last version
in the order).

The loader was modified to use the current version and the VERSIONS
registry instead of hardcoding V1.
2012-05-20 17:47:24 -07:00
Mitchell Hashimoto
a23fee4848 Remove old configuration classes 2012-04-18 17:16:03 -07:00
Mitchell Hashimoto
a62e859231 Get rid of the UNSET_VALUE stuff, save it for v2 2012-04-18 17:09:25 -07:00
Mitchell Hashimoto
b38fb5e974 Loader uses the new configuration classes 2012-04-18 17:03:34 -07:00
Mitchell Hashimoto
98d6bf958e Move core config into a plugin 2012-04-17 22:12:27 -07:00
Mitchell Hashimoto
c0ee3b06ff Config merging 2012-04-17 10:22:24 -07:00
Mitchell Hashimoto
92ee042fc2 V1 config loading using plugins as a source for config keys 2012-04-16 22:26:38 -07:00
Mitchell Hashimoto
cd92d6483f Update CHANGELOG 2012-03-15 09:52:28 -06:00
Remco Vermeulen
728dbe5a4f Make sure that the private_key_path is expanded before checking existence.
This allows for paths like ~/.ssh/some_key to be defined in the Vagrantfile.
2012-03-14 12:02:31 +01:00
Mitchell Hashimoto
07a815f9d8 Remove deprecation warnings, the things are gone! 2012-02-25 12:35:58 -08:00
Mitchell Hashimoto
c2fbbe7dee Better logging for config loading 2012-02-15 18:23:05 -08:00
Mitchell Hashimoto
3a8c44301b Fix some issues with NFS version selecting 2012-01-29 13:33:35 -08:00
Russ Garrett
ced99edd59 Allow user to choose NFS protocol version, defaulting to 3
NFSv4 has siginificant added complexity in the form of ID-mapping which
can cause problems with applications without extra setup. Best to
force version 3 unless the user requests it.

Conflicts:

	lib/vagrant/systems/linux.rb
2012-01-29 13:27:42 -08:00
Seth Chisamore
14c4dc5d53 add vbox driver support for creating transient shared folders 2012-01-27 11:53:42 -08:00
Mitchell Hashimoto
d487e286f4 Don't merge config keys that start with __.
This allows config classes to store internal state somehow.
2012-01-19 20:54:09 -08:00
Mitchell Hashimoto
89fb684297 Add a deprecation error for config.vm.system= [GH-653] 2012-01-19 17:41:34 -08:00
Mitchell Hashimoto
c600d9237b Properly merge forward_agent and other SSH configs [GH-651] 2012-01-18 18:48:07 -08:00
Mitchell Hashimoto
a8fe342520 Arbitrary mount options can be passed to shared folders with :extra [GH-551] 2012-01-11 23:20:12 -08:00
Mitchell Hashimoto
5c70dd1658 Remove nil defaults 2012-01-11 22:34:36 -08:00
Mitchell Hashimoto
863ebe2d2f Custom merging for VM config 2012-01-11 22:12:49 -08:00
Mitchell Hashimoto
b7279ec79d Custom merging behavior for VM configuration 2012-01-11 21:35:09 -08:00
Mitchell Hashimoto
1e856f7c75 Remove unused configuration key 2012-01-11 21:30:59 -08:00
Mitchell Hashimoto
bfb52ba7dc Top merges things in each key one by one by calling merge 2012-01-11 21:22:55 -08:00
Mitchell Hashimoto
d13dd482b5 Some Config::Top class tests 2012-01-11 21:09:52 -08:00
Mitchell Hashimoto
008132b3cb Run each config proc only once 2012-01-11 20:59:21 -08:00
Mitchell Hashimoto
7c9c6e34ce Change caching behavior of config procs for the config loader 2012-01-11 16:58:40 -08:00
Mitchell Hashimoto
4e426249ed Basic :dhcp configuration works. 2012-01-08 20:33:12 -08:00
Mitchell Hashimoto
9cb4597a27 :create flag on shared folders will create on host if it doesnt exist [GH-604] 2012-01-08 11:23:43 -08:00
Mitchell Hashimoto
7d56dbb755 Uploaded files now use temporary files rather than StringIO 2012-01-06 21:42:25 -08:00
Mitchell Hashimoto
d094432238 No longer require forwarded_port_key setting, its gone 2012-01-06 20:07:32 -08:00
Mitchell Hashimoto
acaabd5aa3 Remove forwarded_port_key/destination from config, replace with guest_port 2012-01-06 20:07:31 -08:00
Mitchell Hashimoto
a1b66f82aa Consistently generate names for forwarded ports.
To do this, I convert the ports to base 32 strings in the format
of "guestport-hostport." This makes a consistent mapping we can use
to look up if the forwarded port is set.
2012-01-03 10:34:35 -08:00
Mitchell Hashimoto
2d1ed88bcd Forwarded ports no longer require a name paramter 2012-01-03 10:22:42 -08:00
Mitchell Hashimoto
b36e3c447e Add a deprecation error for the old style of configuring host only networks 2011-12-30 23:39:16 -08:00
Mitchell Hashimoto
b5b3805157 Add validation once again for host only networks 2011-12-31 10:55:37 +09:00
Mitchell Hashimoto
8f522225a1 Fix issue that could cause config loader to fail if no block given to a subvm 2011-12-26 18:07:39 -08:00
Mitchell Hashimoto
ca938f041c Check currently forwarded ports when looking for collisions [GH-606] 2011-12-25 13:13:01 -08:00
Mitchell Hashimoto
4093e79027 Removed deprecation notice for chef_server to chef_client 2011-12-21 23:27:43 -08:00
Mitchell Hashimoto
e1d0ce19ce Customizations are back in! 2011-12-21 16:25:58 -08:00
Mitchell Hashimoto
48ea8173c6 Lots more VBoxManage 2011-12-21 13:37:59 -08:00