51 Commits

Author SHA1 Message Date
Mitchell Hashimoto
18524628b7 Hooks allow parameters and blocks to middlewares 2013-02-22 12:00:35 -08:00
Mitchell Hashimoto
c307a01baf Remove unused test 2013-02-06 22:59:46 -08:00
Mitchell Hashimoto
cd3d2a1e8c Call properly modifies original environment 2013-02-06 18:36:05 -08:00
Mitchell Hashimoto
83bba789a4 Hook#apply 2013-02-06 15:21:34 -08:00
Mitchell Hashimoto
d720205810 Builder supports action hooks 2013-02-06 15:06:13 -08:00
Mitchell Hashimoto
e822aac931 Convert builder tests to use rspec "subjects" 2013-02-06 14:25:36 -08:00
Mitchell Hashimoto
80a7c8a0cb Hook class 2013-02-06 14:21:31 -08:00
Mitchell Hashimoto
864f1b7506 Pass a proper Pathname for SSHExec to check key perms 2013-02-04 21:17:12 -08:00
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
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
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
2fc18f7207 destroy gets a little farther, and properly halts the VM 2012-08-13 23:18:50 -07:00
Mitchell Hashimoto
b1ced46d7c SSHExec raises proper exception if SSH is not yet ready 2012-08-06 10:29:25 -07:00
Mitchell Hashimoto
8d50c4774e Tests for SSHExec, and forward in the ssh options 2012-08-05 18:37:41 -07:00
Mitchell Hashimoto
e0ec679838 vagrant ssh with full console works with new provider.
This works by now calling the `:ssh` action on the provider. This action
is allowed to do whatever it pleases, but should at some point probably
call the `SSHExec` built-in middleware.

The `SSHExec` built-in middleware was added. This uses the information
returned by `Machine#ssh_info` and uses the `Vagrant::Util::SSH` helper
to exec into the remote machine. The provider should do any work upfront
in verifying that the machine is ready to be SSHed into.
2012-08-05 13:45:24 -07:00
Mitchell Hashimoto
e5f250121a Call now only yields the environment 2012-07-27 19:34:46 -07:00
Mitchell Hashimoto
118377e6f0 Destroy sequence asks the user for confirmation. 2012-07-27 19:29:40 -07:00
Mitchell Hashimoto
e20326d577 Added the Confirm built-in middleware
This middleware asks the user a question and expects a Y/N answer. This
middleware can be used with the Call middleware.
2012-07-27 19:16:44 -07:00
Mitchell Hashimoto
556a53d48d You can no longer set env vars on Builders via use 2012-07-27 19:05:35 -07:00
Mitchell Hashimoto
90517a0f9b The Call built-in middleware allows for conditional MW sequences.
Read the documentation for more information.
2012-07-26 23:56:47 -07:00
Mitchell Hashimoto
5eed3b8417 Building up the destroy action again using new provider API.
This shows me moving the built-in middleware sequences to the provider
and how I'm organizing all that.
2012-07-26 22:39:27 -07:00
Mitchell Hashimoto
3d147f1d96 Raise exception if the insert_before middleware is not found 2012-05-05 22:10:26 -07:00
Mitchell Hashimoto
879f98b5d5 Action builder supports indexing middlewares by name 2012-05-05 22:01:53 -07:00
Mitchell Hashimoto
d80ff0a27f Pull out port collision detection/correction into the CheckPortCollision middleware 2011-12-25 10:13:08 -08:00
Mitchell Hashimoto
e3426211bc Vagrant::Action::Warden unit tests 2011-12-22 20:41:01 -08:00
Mitchell Hashimoto
3cd262ed75 Unit tests for Vagrant::Action::Builder 2011-12-22 20:17:45 -08:00
Mitchell Hashimoto
e201d9cacf Rename action registry to just Vagrant::Registry 2011-12-11 18:22:06 -08:00
Mitchell Hashimoto
739d5ffb5f Lazy load attributes for runners. Get box repackage working. 2011-12-09 20:24:34 -08:00
Mitchell Hashimoto
b31c3d458c Action runner supports global parameters 2011-12-09 14:44:43 -08:00
Mitchell Hashimoto
bbb8f0ac2c Integrate new action runner/registry into Vagrant::Environment 2011-12-09 14:39:39 -08:00
Mitchell Hashimoto
daf711fd80 Separate Vagrant::Action into Runner and Registry 2011-12-09 14:22:03 -08:00
Mitchell Hashimoto
5bfcbcba66 Remove step stuff. Failed experiment for now. Too radical for point release. 2011-12-09 13:40:49 -08:00
Mitchell Hashimoto
2c73de0043 The proper enter/exit sequence is called for multisteps 2011-12-06 18:45:37 -08:00
Mitchell Hashimoto
822226cae4 MultiStep does not allow composing steps that do not work together 2011-12-06 18:31:07 -08:00
Mitchell Hashimoto
73761dc92a MultiStep should do input/output validation 2011-12-06 18:19:18 -08:00
Mitchell Hashimoto
7d3746b292 Multistep can now take parameters from any arbitrary step prior. 2011-12-06 09:46:57 -08:00
Mitchell Hashimoto
5b87165e97 Multistep tests pass again. 2011-12-05 21:08:31 -08:00
Mitchell Hashimoto
c5eae41fd8 Revamp Step to be more like a Python with-context 2011-12-05 21:05:41 -08:00
Mitchell Hashimoto
683bbdaa3c Implement multistep 2011-12-04 18:09:18 -08:00
Mitchell Hashimoto
49d299956f Add the "Step" abstraction 2011-12-04 17:14:21 -08:00
Mitchell Hashimoto
fe442faefa Move unit tests into the unit_legacy folder 2011-12-03 15:44:08 -08:00
Mitchell Hashimoto
db491e1f9b Modify unit tests a bit 2011-11-24 21:31:30 -07:00
Mitchell Hashimoto
5d684b9001 Reload the configuration for all VMs after downloading a box. Fixes GH-564 2011-11-21 22:39:12 -08:00
Mitchell Hashimoto
f83c1b3c27 Fix regression introduced with cab1e4e 2011-11-05 15:19:03 -07:00
Mitchell Hashimoto
245bcf436f Have tests pass on Ruby 1.8.x 2011-10-30 22:23:36 -07:00
Mitchell Hashimoto
7219f3d05b Show warning if forwarding port less than 1024 [closes GH-487] 2011-09-11 23:56:02 -07:00
Samer Abukhait
99646735d0 Don't do the port threshold check if running under root 2011-09-11 23:26:55 -07:00