aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-01-28 03:22:50 -0800
committerelijah <elijah@riseup.net>2013-01-28 03:22:50 -0800
commitff502ed3baff2b16cee661599366f2a3c591825e (patch)
tree8c8954d3795f8914cbae5068693fd5b0989043b7
parent89da880dc2ae9aff184d81a5edc702a5c0f1cd87 (diff)
downloadleap_cli-ff502ed3baff2b16cee661599366f2a3c591825e.tar.gz
leap_cli-ff502ed3baff2b16cee661599366f2a3c591825e.tar.bz2
added 'leap local save' to create a new sandbox snapshot.
-rw-r--r--lib/leap_cli/commands/vagrant.rb24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb
index 02f47a4..dae6f53 100644
--- a/lib/leap_cli/commands/vagrant.rb
+++ b/lib/leap_cli/commands/vagrant.rb
@@ -22,14 +22,6 @@ module LeapCli; module Commands
end
end
- local.desc 'Resets virtual machine(s) to a pristine state'
- local.arg_name 'node-filter', :optional => true #, :multiple => false
- local.command :reset do |reset|
- reset.action do |global_options,options,args|
- vagrant_command("sandbox rollback", args)
- end
- end
-
local.desc 'Destroys the virtual machine(s), reclaiming the disk space'
local.arg_name 'node-filter', :optional => true #, :multiple => false
local.command :destroy do |destroy|
@@ -45,6 +37,22 @@ module LeapCli; module Commands
vagrant_command("status", args)
end
end
+
+ local.desc 'Saves the current state of the virtual machine as a new snapshot'
+ local.arg_name 'node-filter', :optional => true #, :multiple => false
+ local.command :save do |status|
+ status.action do |global_options,options,args|
+ vagrant_command("sandbox commit", args)
+ end
+ end
+
+ local.desc 'Resets virtual machine(s) to the last saved snapshot'
+ local.arg_name 'node-filter', :optional => true #, :multiple => false
+ local.command :reset do |reset|
+ reset.action do |global_options,options,args|
+ vagrant_command("sandbox rollback", args)
+ end
+ end
end
public