class Sahara::Command::Status
Public Instance Methods
execute()
click to toggle source
# File lib/sahara/command/status.rb, line 5 def execute options = {} opts = OptionParser.new do |opts| opts.banner = "Shows the status of the sandbox" opts.separator "" opts.separator "Usage: vagrant sandbox status <vmname>" end # Parse the options argv = parse_options(opts) return if !argv with_target_vms(argv, :reverse => true) do |machine| ses = Sahara::Session::Factory.create(machine) if !ses.is_vm_created? then puts "[#{machine.name}] VM is not created" next end if ses.is_snapshot_mode_on? then puts "[#{machine.name}] Sandbox mode is on" else puts "[#{machine.name}] Sandbox mode is off" end end end