Add provisioner profile to VM information
This commit is contained in:
parent
a95e7d1f76
commit
52127f2938
|
@ -182,6 +182,11 @@ def getInformationFromXML(zk_conn, uuid):
|
||||||
if not domain_node_autostart:
|
if not domain_node_autostart:
|
||||||
domain_node_autostart = 'False'
|
domain_node_autostart = 'False'
|
||||||
|
|
||||||
|
try:
|
||||||
|
domain_profile = zkhandler.readdata(zk_conn, '/domains/{}/profile'.format(uuid))
|
||||||
|
except:
|
||||||
|
domain_profile = None
|
||||||
|
|
||||||
parsed_xml = getDomainXML(zk_conn, uuid)
|
parsed_xml = getDomainXML(zk_conn, uuid)
|
||||||
|
|
||||||
domain_uuid, domain_name, domain_description, domain_memory, domain_vcpu, domain_vcputopo = getDomainMainDetails(parsed_xml)
|
domain_uuid, domain_name, domain_description, domain_memory, domain_vcpu, domain_vcputopo = getDomainMainDetails(parsed_xml)
|
||||||
|
@ -210,6 +215,7 @@ def getInformationFromXML(zk_conn, uuid):
|
||||||
'node_selector': domain_node_selector,
|
'node_selector': domain_node_selector,
|
||||||
'node_autostart': domain_node_autostart,
|
'node_autostart': domain_node_autostart,
|
||||||
'description': domain_description,
|
'description': domain_description,
|
||||||
|
'profile': domain_profile,
|
||||||
'memory': domain_memory,
|
'memory': domain_memory,
|
||||||
'vcpu': domain_vcpu,
|
'vcpu': domain_vcpu,
|
||||||
'vcpu_topology': domain_vcputopo,
|
'vcpu_topology': domain_vcputopo,
|
||||||
|
|
|
@ -693,6 +693,7 @@ def format_info(zk_conn, domain_information, long_output):
|
||||||
ainformation.append('{}UUID:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['uuid']))
|
ainformation.append('{}UUID:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['uuid']))
|
||||||
ainformation.append('{}Name:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['name']))
|
ainformation.append('{}Name:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['name']))
|
||||||
ainformation.append('{}Description:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['description']))
|
ainformation.append('{}Description:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['description']))
|
||||||
|
ainformation.append('{}Profile:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['profile']))
|
||||||
ainformation.append('{}Memory (M):{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['memory']))
|
ainformation.append('{}Memory (M):{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['memory']))
|
||||||
ainformation.append('{}vCPUs:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['vcpu']))
|
ainformation.append('{}vCPUs:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['vcpu']))
|
||||||
ainformation.append('{}Topology (S/C/T):{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['vcpu_topology']))
|
ainformation.append('{}Topology (S/C/T):{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['vcpu_topology']))
|
||||||
|
@ -720,6 +721,8 @@ def format_info(zk_conn, domain_information, long_output):
|
||||||
}
|
}
|
||||||
ainformation.append('{}State:{} {}{}{}'.format(ansiprint.purple(), ansiprint.end(), dstate_colour[domain_information['state']], domain_information['state'], ansiprint.end()))
|
ainformation.append('{}State:{} {}{}{}'.format(ansiprint.purple(), ansiprint.end(), dstate_colour[domain_information['state']], domain_information['state'], ansiprint.end()))
|
||||||
ainformation.append('{}Current Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['node']))
|
ainformation.append('{}Current Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['node']))
|
||||||
|
if not domain_information['last_node']:
|
||||||
|
domain_information['last_node'] = "N/A"
|
||||||
ainformation.append('{}Previous Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['last_node']))
|
ainformation.append('{}Previous Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['last_node']))
|
||||||
|
|
||||||
# Get a failure reason if applicable
|
# Get a failure reason if applicable
|
||||||
|
|
Loading…
Reference in New Issue