projects
/
invirt/packages/invirt-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For new naming scheme.
[invirt/packages/invirt-web.git]
/
templates
/
main.py
diff --git
a/templates/main.py
b/templates/main.py
index
152cd75
..
984f3b8
100755
(executable)
--- a/
templates/main.py
+++ b/
templates/main.py
@@
-212,7
+212,7
@@
def getUptimes(machines):
value_string = remctl('web', 'listvms')
lines = value_string.splitlines()
d = {}
value_string = remctl('web', 'listvms')
lines = value_string.splitlines()
d = {}
- for line in lines[1:]:
+ for line in lines:
lst = line.split()
name, id = lst[:2]
uptime = ' '.join(lst[2:])
lst = line.split()
name, id = lst[:2]
uptime = ' '.join(lst[2:])
@@
-592,6
+592,7
@@
def info(user, fields):
]
fields = []
machine_info = {}
]
fields = []
machine_info = {}
+ machine_info['name'] = machine.name
machine_info['type'] = machine.type.hvm and 'HVM' or 'ParaVM'
machine_info['owner'] = machine.owner
machine_info['contact'] = machine.contact
machine_info['type'] = machine.type.hvm and 'HVM' or 'ParaVM'
machine_info['owner'] = machine.owner
machine_info['contact'] = machine.contact
@@
-608,10
+609,10
@@
def info(user, fields):
for field, disp in display_fields:
if field in ('uptime', 'cputime'):
fields.append((disp, locals()[field]))
for field, disp in display_fields:
if field in ('uptime', 'cputime'):
fields.append((disp, locals()[field]))
- elif field in main_status:
- fields.append((disp, main_status[field]))
elif field in machine_info:
fields.append((disp, machine_info[field]))
elif field in machine_info:
fields.append((disp, machine_info[field]))
+ elif field in main_status:
+ fields.append((disp, main_status[field]))
else:
pass
#fields.append((disp, None))
else:
pass
#fields.append((disp, None))