1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

Minor changes in OCCI and added onevm saveas --type

This commit is contained in:
Daniel Molina 2010-07-26 15:22:54 +02:00 committed by Javi Fontan
parent 947bcd7475
commit 64fd4dbea6
2 changed files with 8 additions and 3 deletions

View File

@ -346,6 +346,9 @@ Commands:
* saveas (Set the specified vm's disk to be saved in a new image (image_name)
when the vm shutdowns)
onevm saveas <vm_id> <disk_id> <image_name>
(Set a different type for the new Image)
onevm saveas <vm_id> <disk_id> <image_name> -t/--type <type>
* delete (Deletes a VM from the pool and DB)
onevm delete <vm_id>
@ -387,6 +390,11 @@ EOT
table.print_help
end
def special_options(opts, options)
opts.on_tail("-t", "--type", "Image type") do |o|
options[:type]=o
end
end
end

View File

@ -33,9 +33,6 @@ class VirtualMachineOCCI < VirtualMachine
<STORAGE href="<%= base_url %>/storage/<%= disk['IMAGE_ID'] %>" name="<%= disk['IMAGE'] %>"/>
<TYPE><%= disk['TYPE'] %></TYPE>
<TARGET><%= disk['TARGET'] %></TARGET>
<% if disk['SAVE_AS'] %>
<SAVE_AS><%= disk['SAVE_AS'] %></SAVE_AS>
<% end %>
</DISK>
<% end %>
<% end %>