- for child in vm_list_xmlroot:
- if child.tag.split("}")[1] == 'IsShared':
- network_configuration['isShared'] = child.text.strip()
- if child.tag.split("}")[1] == 'Configuration':
- for configuration in child.iter():
- tagKey = configuration.tag.split("}")[1].strip()
- if tagKey != "":
- network_configuration[tagKey] = configuration.text.strip()
- return network_configuration
+ network_configuration['status'] = vm_list_xmlroot.get("status")
+ network_configuration['name'] = vm_list_xmlroot.get("name")
+ network_configuration['uuid'] = vm_list_xmlroot.get("id").split(":")[3]
+
+ for child in vm_list_xmlroot:
+ if child.tag.split("}")[1] == 'IsShared':
+ network_configuration['isShared'] = child.text.strip()
+ if child.tag.split("}")[1] == 'Configuration':
+ for configuration in child.iter():
+ tagKey = configuration.tag.split("}")[1].strip()
+ if tagKey != "":
+ network_configuration[tagKey] = configuration.text.strip()