Sha256: a1859425db3ee2e10736387578674cb965e83611933b2baa2d8bf2f84e231f24

Contents?: true

Size: 498 Bytes

Versions: 6

Compression:

Stored size: 498 Bytes

Contents

desc 'revert vm to previous snapshot'
arg_name 'vm_name'

command :revert do |c|
  c.action do |global_options,options,args|
    ARGV.size >= 1 or abort 'must specify VM'
    vm_target = ARGV.shift
    @logger.debug "Revert invoked for #{vm_target}\n\t#{global_options[:host]}\n\t#{options}\n\t#{args}."

    vm_manager = Vmesh::VSphere.new global_options
    vm = vm_manager.get_machine(vm_target, global_options[:datacenter])
    Vmesh::logger.debug "Got vm #{vm.name}"
    vm.revert 
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vmesh-0.1.11 lib/vmesh/commands/revert.rb
vmesh-0.1.7 lib/vmesh/commands/revert.rb
vmesh-0.1.6 lib/vmesh/commands/revert.rb
vmesh-0.1.5 lib/vmesh/commands/revert.rb
vmesh-0.1.4 lib/vmesh/commands/revert.rb
vmesh-0.1.3 lib/vmesh/commands/revert.rb