Fixing the broken API contract for flavor_id
fixes bug 1198318 Change-Id: Ifae19ab495bdb274fb840741f0cde5274b633b31
This commit is contained in:
parent
64e91bb8a6
commit
c8c788e92d
|
@ -130,7 +130,8 @@ class SimpleInstance(object):
|
|||
|
||||
@property
|
||||
def flavor_id(self):
|
||||
return self.db_info.flavor_id
|
||||
# Flavor ID is a str in the 1.0 API.
|
||||
return str(self.db_info.flavor_id)
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
|
|
|
@ -36,10 +36,6 @@ from trove.tests.api.instances import GROUP_TEST
|
|||
from trove.tests.util import poll_until
|
||||
|
||||
GROUP = "dbaas.api.mgmt.instances"
|
||||
XML_SUPPORT = False
|
||||
if hasattr(CONFIG, 'trove_client_cls'):
|
||||
if CONFIG.trove_client_cls == "troveclient.xml.TroveXmlClient":
|
||||
XML_SUPPORT = True
|
||||
|
||||
|
||||
@test(groups=[GROUP])
|
||||
|
@ -52,10 +48,7 @@ def mgmt_index_requires_admin_account():
|
|||
# These functions check some dictionaries in the returned response.
|
||||
def flavor_check(flavor):
|
||||
with CollectionCheck("flavor", flavor) as check:
|
||||
if XML_SUPPORT:
|
||||
check.has_element("id", basestring)
|
||||
else:
|
||||
check.has_element("id", int)
|
||||
check.has_element("id", basestring)
|
||||
check.has_element("links", list)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue