Class: Veewee::Command::Vbox

Inherits:
GroupBase show all
Defined in:
lib/veewee/command/vbox.rb

Instance Attribute Summary

Attributes inherited from GroupBase

#env

Instance Method Summary collapse

Methods inherited from GroupBase

#copy, #define, #destroy, #halt, #initialize, #list, #ostypes, register, #sendkeys, #ssh, #templates, #undefine, #up, #winrm

Methods included from Helpers

#initialize_environment

Constructor Details

This class inherits a constructor from Veewee::Command::GroupBase

Instance Method Details

#build(box_name) ⇒ Object


21
22
23
# File 'lib/veewee/command/vbox.rb', line 21

def build(box_name)
  env.get_box(box_name).build(options)
end

#export(box_name) ⇒ Object


29
30
31
# File 'lib/veewee/command/vbox.rb', line 29

def export(box_name)
 env.get_box(box_name).export_vagrant(options)
end

#screenshot(box_name, pngfilename) ⇒ Object


47
48
49
50
51
52
53
54
55
56
57
# File 'lib/veewee/command/vbox.rb', line 47

def screenshot(box_name,pngfilename)
  begin
    venv=Veewee::Environment.new(options)
    venv.ui = ::Veewee::UI::Shell.new(venv, shell)

    venv.providers[@provider].get_box(box_name).screenshot(pngfilename,options)
  rescue Veewee::Error => ex
    venv.ui.error(ex, :prefix => false)
    exit -1
  end
end

#validate(box_name) ⇒ Object


35
36
37
38
39
40
41
42
43
44
# File 'lib/veewee/command/vbox.rb', line 35

def validate(box_name)
  begin
    venv=Veewee::Environment.new(options)
    venv.ui = ::Veewee::UI::Shell.new(venv, shell)
    venv.providers[@provider].get_box(box_name).validate_vagrant(options)
  rescue Veewee::Error => ex
    venv.ui.error(ex, :prefix => false)
    exit -1
  end
end