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

feature #954: Update render of Template/Resource attributes

This commit is contained in:
Daniel Molina 2011-11-17 18:21:28 +01:00
parent 997f057e75
commit 1bfd873430
3 changed files with 8 additions and 1 deletions

View File

@ -60,6 +60,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
puts str % ["IM_MAD", host['IM_MAD']]
puts str % ["VM_MAD", host['VM_MAD']]
puts str % ["TM_MAD", host['TM_MAD']]
puts str % ["LAST MONITORING TIME", host['LAST_MON_TIME']]
puts
CLIHelper.print_header(str_h1 % "HOST SHARES", false)
@ -70,6 +71,9 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
puts str % ["MAX CPU", host['HOST_SHARE/MAX_CPU']]
puts str % ["USED CPU (REAL)", host['HOST_SHARE/USED_CPU']]
puts str % ["USED CPU (ALLOCATED)", host['HOST_SHARE/CPU_USAGE']]
puts str % ["MAX DISK", host['HOST_SHARE/MAX_DISK']]
puts str % ["USED DISK (REAL)", host['HOST_SHARE/USED_DISK']]
puts str % ["USED DISK (ALLOCATED)", host['HOST_SHARE/DISK_USAGE']]
puts str % ["RUNNING VMS", host['HOST_SHARE/RUNNING_VMS']]
puts

View File

@ -65,7 +65,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
def format_resource(vm)
str_h1="%-80s"
str="%-20s: %-20s"
CLIHelper.print_header(
str_h1 % "VIRTUAL MACHINE #{vm['ID']} INFORMATION")
puts str % ["ID", vm.id.to_s]

View File

@ -53,9 +53,12 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
str="%-15s: %-20s"
puts str % ["ID", vn.id.to_s]
puts str % ["NAME", vn['NAME']]
puts str % ["USER", vn['UNAME']]
puts str % ["GROUP", vn['GNAME']]
puts str % ["PUBLIC", OpenNebulaHelper.boolean_to_str(vn['PUBLIC'])]
puts str % ["TYPE", vn.type_str]
puts str % ["BRIDGE", vn["BRIDGE"]]
puts str % ["USED LEASES", vn['TOTAL_LEASES']]
puts