mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Feature #2486: Show the context cdrom with the other disks in cli and sunstone
This commit is contained in:
1 parent
97515e6da3
commit
59778f8c5b
2 files changed
+32
-2
No files matched your search
@@ -384,7 +384,28 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
||||
puts str % [e, mask]
|
||||
}
|
||||
|
||||
vm_disks = []
|
||||
|
||||
if vm.has_elements?("/VM/TEMPLATE/DISK")
|
||||
vm_disks = [vm.to_hash['VM']['TEMPLATE']['DISK']].flatten
|
||||
end
|
||||
|
||||
if vm.has_elements?("/VM/TEMPLATE/CONTEXT")
|
||||
context_disk = vm.to_hash['VM']['TEMPLATE']['CONTEXT']
|
||||
|
||||
context_disk["IMAGE"] = "CONTEXT"
|
||||
context_disk["DATASTORE"] = "-"
|
||||
context_disk["TYPE"] = "-"
|
||||
context_disk["READONLY"] = "-"
|
||||
context_disk["SAVE"] = "-"
|
||||
context_disk["CLONE"] = "-"
|
||||
context_disk["SAVE_AS"] = "-"
|
||||
|
||||
vm_disks.push(context_disk)
|
||||
end
|
||||
|
||||
|
||||
if !vm_disks.empty?
|
||||
puts
|
||||
CLIHelper.print_header(str_h1 % "VM DISKS",false)
|
||||
CLIHelper::ShowTable.new(nil, self) do
|
||||
@@ -440,7 +461,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
|
||||
|
||||
default :ID, :TARGET, :IMAGE, :TYPE,
|
||||
:SAVE, :SAVE_AS
|
||||
end.show([vm.to_hash['VM']['TEMPLATE']['DISK']].flatten, {})
|
||||
end.show(vm_disks, {})
|
||||
|
||||
while vm.has_elements?("/VM/TEMPLATE/DISK")
|
||||
vm.delete_element("/VM/TEMPLATE/DISK")
|
||||
|
||||
Reference in new issue
Block a user