Fixing format_flavor to handle flavor extra_specs
Flavor detail/show call has extra_specs as a child element in xml.
The parser strips off the namespace before comparing key value pairs.
We need to expect just the key 'extra_specs' without the namespace.
Fixes bug 1213896
Change-Id: I163d99d08b42aaedeeba377898f23f79153e3ee5
diff --git a/tempest/services/compute/xml/flavors_client.py b/tempest/services/compute/xml/flavors_client.py
index 3a8986c..6fbb9e3 100644
--- a/tempest/services/compute/xml/flavors_client.py
+++ b/tempest/services/compute/xml/flavors_client.py
@@ -30,8 +30,6 @@
"http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1"
XMLNS_OS_FLV_ACCESS = \
"http://docs.openstack.org/compute/ext/flavor_access/api/v1.1"
-XMLNS_OS_FLV_WITH_EXT_SPECS = \
- "http://docs.openstack.org/compute/ext/flavor_with_extra_specs/api/v2.0"
class FlavorsClientXML(RestClientXML):
@@ -51,7 +49,7 @@
if k == '{%s}ephemeral' % XMLNS_OS_FLV_EXT_DATA:
k = 'OS-FLV-EXT-DATA:ephemeral'
- if k == '{%s}extra_specs' % XMLNS_OS_FLV_WITH_EXT_SPECS:
+ if k == 'extra_specs':
k = 'OS-FLV-WITH-EXT-SPECS:extra_specs'
flavor[k] = dict(v)
continue