Permalink
Browse files

added export command

  • Loading branch information...
1 parent ccfcbff commit 803b1ff7579c76f8db173f13c1e041c816b2ab6f @jedi4ever committed Feb 7, 2011
Showing with 17 additions and 4 deletions.
  1. +1 −1 Gemfile.lock
  2. +1 −1 README.md
  3. +9 −1 lib/veewee/command.rb
  4. +5 −0 lib/veewee/session.rb
  5. +1 −1 lib/veewee/version.rb
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- veewee (0.1.1)
+ veewee (0.0.2)
highline (~> 1.6.1)
net-ssh (~> 2.1.0)
popen4 (~> 0.1.2)
View
@@ -95,7 +95,7 @@ this is actually calling - vagrant package --base 'myubuntubox' --output 'boxes/
this will result in a myubuntubox.box
## Add the box as one of your boxes
-vagrant box add 'myubuntubox' 'myubuntubox.box'
+$ vagrant box add 'myubuntubox' 'myubuntubox.box'
## Use it in vagrant
Start vagrant init in another window (as we have set the Virtualbox env to tmp before)
View
@@ -43,7 +43,7 @@ def ostypes
Veewee::Session.list_ostypes
end
- desc "destroy", "Destroy the virtualmachine of a basebox"
+ desc "destroy BOXNAME", "Destroy the virtualmachine of a basebox"
def destroy(boxname)
puts Veewee::Session.destroy_vm(boxname)
end
@@ -53,6 +53,14 @@ def list
Veewee::Session.list_definitions
end
+ desc "export [NAME]", "export the box"
+ method_options :force => :boolean
+ def export(boxname)
+ if (!boxname.nil?)
+ Veewee::Session.export_box(boxname)
+ end
+ end
+
end
end
@@ -316,6 +316,9 @@ def self.add_ssh_nat_mapping(boxname)
end
def self.destroy_vm(boxname)
+
+ load_definition(boxname)
+
#:destroy_medium => :delete, will delete machine + all media attachments
#vm.destroy(:destroy_medium => :delete)
##vm.destroy(:destroy_image => true)
@@ -325,6 +328,8 @@ def self.destroy_vm(boxname)
#PDB
#vm.destroy()
+
+
vm=VirtualBox::VM.find(boxname)
if (!vm.nil? && !(vm.powered_off?))
@@ -1,3 +1,3 @@
module Veewee
- VERSION = "0.1.1"
+ VERSION = "0.0.2"
end

0 comments on commit 803b1ff

Please sign in to comment.