Merge "bay-show doesn't return stack_id"
This commit is contained in:
commit
a859b00596
@ -93,6 +93,9 @@ class Bay(base.APIBase):
|
|||||||
links = wsme.wsattr([link.Link], readonly=True)
|
links = wsme.wsattr([link.Link], readonly=True)
|
||||||
"""A list containing a self link and associated bay links"""
|
"""A list containing a self link and associated bay links"""
|
||||||
|
|
||||||
|
stack_id = wsme.wsattr(wtypes.text, readonly=True)
|
||||||
|
"""Stack id of the heat stack"""
|
||||||
|
|
||||||
status = wtypes.text
|
status = wtypes.text
|
||||||
"""Status of the bay from the heat stack"""
|
"""Status of the bay from the heat stack"""
|
||||||
|
|
||||||
@ -127,7 +130,8 @@ class Bay(base.APIBase):
|
|||||||
if not expand:
|
if not expand:
|
||||||
bay.unset_fields_except(['uuid', 'name', 'baymodel_id',
|
bay.unset_fields_except(['uuid', 'name', 'baymodel_id',
|
||||||
'node_count', 'status',
|
'node_count', 'status',
|
||||||
'bay_create_timeout', 'master_count'])
|
'bay_create_timeout', 'master_count',
|
||||||
|
'stack_id'])
|
||||||
|
|
||||||
bay.links = [link.Link.make_link('self', url,
|
bay.links = [link.Link.make_link('self', url,
|
||||||
'bays', bay.uuid),
|
'bays', bay.uuid),
|
||||||
@ -149,6 +153,7 @@ class Bay(base.APIBase):
|
|||||||
node_count=2,
|
node_count=2,
|
||||||
master_count=1,
|
master_count=1,
|
||||||
bay_create_timeout=15,
|
bay_create_timeout=15,
|
||||||
|
stack_id='49dc23f5-ffc9-40c3-9d34-7be7f9e34d63',
|
||||||
status="CREATE_COMPLETE",
|
status="CREATE_COMPLETE",
|
||||||
status_reason="CREATE completed successfully",
|
status_reason="CREATE completed successfully",
|
||||||
api_address='172.24.4.3',
|
api_address='172.24.4.3',
|
||||||
|
@ -66,7 +66,7 @@ class TestListBay(api_base.FunctionalTest):
|
|||||||
self.assertEqual(bay.uuid, response['uuid'])
|
self.assertEqual(bay.uuid, response['uuid'])
|
||||||
for key in ("name", "baymodel_id", "node_count", "status",
|
for key in ("name", "baymodel_id", "node_count", "status",
|
||||||
"api_address", "discovery_url", "node_addresses",
|
"api_address", "discovery_url", "node_addresses",
|
||||||
"master_count", "master_addresses"):
|
"master_count", "master_addresses", "stack_id"):
|
||||||
self.assertIn(key, response)
|
self.assertIn(key, response)
|
||||||
|
|
||||||
def test_get_one_by_name(self):
|
def test_get_one_by_name(self):
|
||||||
@ -75,7 +75,7 @@ class TestListBay(api_base.FunctionalTest):
|
|||||||
self.assertEqual(bay.uuid, response['uuid'])
|
self.assertEqual(bay.uuid, response['uuid'])
|
||||||
for key in ("name", "baymodel_id", "node_count", "status",
|
for key in ("name", "baymodel_id", "node_count", "status",
|
||||||
"api_address", "discovery_url", "node_addresses",
|
"api_address", "discovery_url", "node_addresses",
|
||||||
"master_count", "master_addresses"):
|
"master_count", "master_addresses", "stack_id"):
|
||||||
self.assertIn(key, response)
|
self.assertIn(key, response)
|
||||||
|
|
||||||
def test_get_one_by_name_not_found(self):
|
def test_get_one_by_name_not_found(self):
|
||||||
@ -129,7 +129,7 @@ class TestListBay(api_base.FunctionalTest):
|
|||||||
self.assertEqual(bay_list[-1].uuid, response['bays'][0]['uuid'])
|
self.assertEqual(bay_list[-1].uuid, response['bays'][0]['uuid'])
|
||||||
for key in ("name", "baymodel_id", "node_count", "status",
|
for key in ("name", "baymodel_id", "node_count", "status",
|
||||||
"discovery_url", "api_address", "node_addresses",
|
"discovery_url", "api_address", "node_addresses",
|
||||||
"master_addresses"):
|
"master_addresses", "stack_id"):
|
||||||
self.assertIn(key, response['bays'][0])
|
self.assertIn(key, response['bays'][0])
|
||||||
|
|
||||||
def test_detail_against_single(self):
|
def test_detail_against_single(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user