Revision 0084ffc5 src/vmm_mad/remotes/vcenter/snapshot_revert

View differences:

src/vmm_mad/remotes/vcenter/snapshot_revert
31 31

  
32 32
vm_ref          = ARGV[0]
33 33
snap_id         = ARGV[1]
34
vm_id           = ARGV[2]
35 34
vc_cluster_name = ARGV[3]
36 35

  
37 36
host = VCenterDriver::VIHelper.find_by_name(OpenNebula::HostPool, vc_cluster_name)
......
42 41

  
43 42
    vm = VCenterDriver::VirtualMachine.new_from_ref(vm_ref, vi_client)
44 43

  
45
    # Get snapshot name
46
    one_vm = VCenterDriver::VIHelper.one_item(OpenNebula::VirtualMachine, vm_id)
47
    snap_name = one_vm["TEMPLATE/SNAPSHOT[SNAPSHOT_ID=#{snap_id}]/NAME"]
48

  
49
    vm.revert_snapshot(snap_id, snap_name)
44
    vm.revert_snapshot(snap_id)
50 45

  
51 46
rescue Exception => e
52 47
    STDERR.puts "Snapshot of VM #{vm_ref} on vCenter cluster "\

Also available in: Unified diff