Correct getchildren() usage in list_addresses()
This commit fixes the usage of getchildren in the list_addresses
method. Previously, the method was called on body which was a string.
This commit corrects the behavior and runs the method on an etree
object.
Fixes bug 1132796
Change-Id: Iafb8d51257b7bcbfbcf9141c3d424c601a186a89
diff --git a/tempest/services/compute/xml/servers_client.py b/tempest/services/compute/xml/servers_client.py
index 93630df..955d97e 100644
--- a/tempest/services/compute/xml/servers_client.py
+++ b/tempest/services/compute/xml/servers_client.py
@@ -305,7 +305,8 @@
resp, body = self.get("servers/%s/ips" % str(server_id), self.headers)
networks = {}
- for child in etree.fromstring(body.getchildren()):
+ xml_list = etree.fromstring(body)
+ for child in xml_list.getchildren():
network = self._parse_network(child)
networks.update(**network)