1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

Removed save command in onevm

This commit is contained in:
Jaime Melis 2010-07-26 15:05:18 +02:00
parent 83fe5ba1bf
commit e62649ade4

View File

@ -347,10 +347,6 @@ Commands:
when the vm shutdowns)
onevm saveas <vm_id> <disk_id> <image_name>
* save (Set the specified vm's disk to be saved, overwriting the original image
when the vm shutdowns)
onevm save <vm_id> <disk_id>
* delete (Deletes a VM from the pool and DB)
onevm delete <vm_id>
@ -733,26 +729,6 @@ when "saveas"
result = vm.save_as(disk_id.to_i, image.id)
when "save"
check_parameters("save", 2)
vm_id = get_vm_id(ARGV[0])
disk_id = ARGV[1]
# Get the Image ID for this disk
vm = OpenNebula::VirtualMachine.new(
OpenNebula::VirtualMachine.build_xml(vm_id),
get_one_client)
result = vm.info
if !is_successful?(result)
puts result.message
exit -1
end
image_id = vm["TEMPLATE/DISK[DISK_ID=\"#{disk_id}\"]/IMAGE_ID"]
result = vm.save_as(disk_id.to_i, image_id.to_i)
when "show"
check_parameters("get_info", 1)
args=expand_args(ARGV)