domains = server.xenapi.VM.get_all_records()
metrics = server.xenapi.VM_metrics.get_all_records()
for d in domains.values():
- ret[d['uuid'].replace('-', '_')] = {'name': d['name_label'],
- 'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()),
- 'domid': d['domid'],
- 'uuid': d['uuid'],
- # No equivalent
- }
+ ret['uuid_'+d['uuid'].replace('-', '_')] = {'name': d['name_label'],
+ 'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()),
+ 'domid': d['domid'],
+ 'uuid': d['uuid'],
+ # No equivalent
+ }
return ret
else:
domains = server.xend.domains_with_state(True, 'all', True)
data['sched-credit'] = sched
except:
data['sched-credit'] = None
- ret[sxp.child_value(d, 'uuid', 'NONE').replace('-', '_')] = data
+ ret['uuid_'+sxp.child_value(d, 'uuid', 'NONE').replace('-', '_')] = data
return ret
if cmd == 'config':