Mitchell Hashimoto
7531c94dbf
Allow path and exception for Lock middleware to be procs
2013-01-28 20:46:39 -08:00
Mitchell Hashimoto
9ae3a373c8
Add new middleware builtin: Lock
...
This will do a process lock by flocking a file. If it fails, it will
raise an exception of choice.
2013-01-28 17:08:37 -08:00
Mitchell Hashimoto
64af19c783
Remove archive::tar::minitar from tests
2013-01-28 13:28:40 -08:00
Mitchell Hashimoto
6a3c0bd425
Call built-in supports args for imddleware
2013-01-22 12:20:02 -08:00
Mitchell Hashimoto
51540496a9
GracefulHalt builtin
2013-01-22 11:56:49 -08:00
Mitchell Hashimoto
8ad8f73846
Raise an exception if a non-MachineState is returned
2013-01-21 11:31:20 -06:00
Mitchell Hashimoto
7bdf54923a
Create the MachineState class
2013-01-21 11:25:28 -06: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
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
23668d4ed0
Fix some newline weirdness with StringBlockEditor
2013-01-15 21:53:11 -08:00
Mitchell Hashimoto
adec64baa4
Add the #get method to StringBlockEditor
2013-01-15 20:34:41 -08:00
Mitchell Hashimoto
335503a688
StringBlockEditor to help plugins with owning parts of files
2013-01-15 17:49:46 -08:00
Mitchell Hashimoto
25fcb59e38
Use registries for the V2 plugin manager
2013-01-13 13:05:31 -08:00
Mitchell Hashimoto
f3b340aae0
Use registry merging for provider configs
2013-01-13 13:00:06 -08:00
Mitchell Hashimoto
45879132a3
Registries support merging
2013-01-13 12:58:48 -08:00
Mitchell Hashimoto
e66c5066e4
Plugin configuration can have scopes now, ex. provider
2013-01-13 12:38:17 -08:00
Mitchell Hashimoto
0c612f695f
Util::ScopedHashOverride
2013-01-11 15:44:35 -08:00
Mitchell Hashimoto
cf2c5a10c1
One more final fix for 1.8.7
2012-12-30 18:16:51 -10:00
Mitchell Hashimoto
037dbf24db
Fix some failing tests for 1.8.7.
2012-12-30 18:13:27 -10:00
Mitchell Hashimoto
a30a92bb4f
active_machines should return name as a symbol
2012-12-30 11:51:22 -10:00
Mitchell Hashimoto
4c46091746
Environment#primary_machine_name and use it for with_target_vms
...
This makes the single-provider and default provider semantics work with
primary VMs.
2012-12-30 11:12:56 -10:00
Mitchell Hashimoto
24c3c9a7ae
Better test coverage on with_target_vms. Added pending tests to work on.
2012-12-30 10:59:59 -10:00
Mitchell Hashimoto
07157b47ae
Only allow one provider active machine at a time.
...
Temporary limitation of Vagrant to only allow one active machine with a
provider at a time. That means you cant `up` a machine with both vmware
and virtualbox at the same time. In the future you will be able to but
to avoid various edge cases for now we're disallowing it.
2012-12-30 10:52:01 -10:00
Mitchell Hashimoto
9257fe3d98
Environment#active_machines
...
This returns a list of active machines for the environment. An active
machine is a machine that at one point was created by Vagrant.
2012-12-27 19:28:05 -10:00
Mitchell Hashimoto
4e649cc987
Upgrade V1-style dotfile to V2
...
See the code and comments for details on how this is done. As usual, we
are very careful about this so as not to inadvertently destruct real
user data.
2012-12-26 22:41:42 -08:00
Mitchell Hashimoto
cd969e1e05
Remove the dotfile_name configuration option.
...
The dotfile is gone now so the configuration option is obselete
2012-12-26 21:45:24 -08:00
Mitchell Hashimoto
c0c3e7bf43
Remove Vagrant::DataStore
...
We just don't use it yet and the old implementation was sketchy. I was
not happy with it.
2012-12-26 21:45:24 -08:00
Mitchell Hashimoto
3baa31460f
Store machine ID in "id" file in data directory.
...
Instead of storing an "active" hash in the local_data of an Environment,
we now place the ID of a machine in the "id" file of the machine data
directory. This file is read upon re-instantiation in order to load the
proper state.
2012-12-26 21:45:23 -08:00
Mitchell Hashimoto
cc18492c7a
Local data path introduced
...
The local data path is set to the `ROOT_DIR/.vagrant` by default and is
a directory where Vagrant can store environment-local state. This can be
overriden on a per-Environment basis using the `local_data_path`
option.
2012-12-26 21:45:23 -08:00
Mitchell Hashimoto
8fe0f86dbd
The --provider flag for `up` now actually does something.
2012-12-23 21:23:08 -08:00
Mitchell Hashimoto
3808ea377f
Upgrade all other default configurations to V2
2012-12-23 16:29:26 -08:00
Mitchell Hashimoto
6478139cee
Move config.vm.customize to VirtualBox specific option
2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
dffbf6eb09
Allow COnfirm calls to be forced by specifying a force_key
2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
50d7b0aba4
Fix bug where Call didn't propagate recovery. Warden has no recovery.
...
The issue here is that when a middleware failed and a recovery sequence
started, it would halt at the "call" step because the "Call" didn't
properly recover the child sequence.
An additional issue was that a Warden had no "recover" method, meaning
embedded Wardens wouldn't recover their stacks properly.
2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
a6e0d3908f
Create a "dummy" provider for tests
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
ac7958a43b
Environment#primary_machine takes a provider argument. Use it.
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
128c06e78d
Environment#default_provider
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
1ee470a551
Begin work on supporting provider-specific configuration
...
This works by registering a `config` with `:provider => true` with the
same name as your provider. Vagrant will then automatically configure
the provider when `config.vm.provider` is used.
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
99c5cddb7d
V2 config supports the concept of an "UNSET" value when doing merges
...
This value should be used as a default, and allows the parent `merge`
method to "just work" most of the time.
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
819140bbc2
Don't error if box doesn't exist on load
2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
0ec639c8e1
BoxCollection#find should only find V1 box when searching for vbox
2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
e2dd0b0cf2
Get machine tests passing again with new environment
2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
f2b91d26fd
Load the configuration per machine, so that provider boxes work
...
Boxes are provider-specific, and we don't know the provider until
Environment#machine is called, so we need to build up the machine
configuration during this time.
2012-12-23 16:29:23 -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
1559f7b7a7
Get rid of the old Environment#vms calls. Use #machine everywhere.
2012-12-23 16:29:23 -08:00
Mitchell Hashimoto
5002b8d9c2
Fix failing test on 1.8.7
2012-12-20 22:05:05 -08:00
Mitchell Hashimoto
2ef6ff10f0
Cache the machine objects created in Environment#machine.
...
Each machine and provider backing should be represented by only one
machine.
2012-11-07 22:08:06 -08:00
Mitchell Hashimoto
67855be77b
Add the Environment#machine method
...
This will eventually replace the Environment#vms method. Because of the
introduction of providers, the environment doesn't know what the backing
of the machines will be (and they're _machines_ now, not _vms_).
Instead, users of Environment will now call `#machine` on the
environment to retrieve a machine with the given backing provider as it
needs it.
2012-11-07 21:45:09 -08:00