169 Commits

Author SHA1 Message Date
Mitchell Hashimoto
2da812bd48 Change log levels of some messages that are useful 2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
0180ed849d Move config loader order out from an ivar into a param for the #load
method
2012-12-23 16:29:23 -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
Mitchell Hashimoto
0ca783e8d1 V1 config loader loads upgradable config if not V1
This is to prepare for the upcoming V2 configuration. When we're in V2,
we only want to load _upgradable_ configuration keys.
2012-11-03 21:54:32 -07:00
Mitchell Hashimoto
c803b0508a Much cleaner plugin part querying syntax.
Before we were manually going over every plugin and getting each piece,
all over the place. Now we have a central manager that will give us all
the pieces we want. There is still some cleanup to do here but this is
much better overall.
2012-11-03 21:25:28 -07:00
Mitchell Hashimoto
6df6f6764f Remove plugin activation. It really isn't necessary.
It was only used in a couple places and it isn't necessary since you can
do the loading within the actual blocks themselves.
2012-11-03 20:29:34 -07:00
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