Merge "Add "parent" key to list stacks output"

This commit is contained in:
Jenkins 2014-09-02 00:34:06 +00:00 committed by Gerrit Code Review
commit aeb2b40fb1
4 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,7 @@ basic_keys = (
engine_api.STACK_DELETION_TIME, engine_api.STACK_DELETION_TIME,
engine_api.STACK_UPDATED_TIME, engine_api.STACK_UPDATED_TIME,
engine_api.STACK_OWNER, engine_api.STACK_OWNER,
engine_api.STACK_PARENT,
) )

View File

@ -103,6 +103,7 @@ def format_stack(stack):
api.STACK_DISABLE_ROLLBACK: stack.disable_rollback, api.STACK_DISABLE_ROLLBACK: stack.disable_rollback,
api.STACK_TIMEOUT: stack.timeout_mins, api.STACK_TIMEOUT: stack.timeout_mins,
api.STACK_OWNER: stack.username, api.STACK_OWNER: stack.username,
api.STACK_PARENT: stack.owner_id,
} }
# allow users to view the outputs of stacks # allow users to view the outputs of stacks

View File

@ -29,6 +29,7 @@ STACK_KEYS = (
STACK_PARAMETERS, STACK_OUTPUTS, STACK_ACTION, STACK_PARAMETERS, STACK_OUTPUTS, STACK_ACTION,
STACK_STATUS, STACK_STATUS_DATA, STACK_CAPABILITIES, STACK_STATUS, STACK_STATUS_DATA, STACK_CAPABILITIES,
STACK_DISABLE_ROLLBACK, STACK_TIMEOUT, STACK_OWNER, STACK_DISABLE_ROLLBACK, STACK_TIMEOUT, STACK_OWNER,
STACK_PARENT
) = ( ) = (
'stack_name', 'stack_identity', 'stack_name', 'stack_identity',
'creation_time', 'updated_time', 'deletion_time', 'creation_time', 'updated_time', 'deletion_time',
@ -37,6 +38,7 @@ STACK_KEYS = (
'parameters', 'outputs', 'stack_action', 'parameters', 'outputs', 'stack_action',
'stack_status', 'stack_status_reason', 'capabilities', 'stack_status', 'stack_status_reason', 'capabilities',
'disable_rollback', 'timeout_mins', 'stack_owner', 'disable_rollback', 'timeout_mins', 'stack_owner',
'parent'
) )
STACK_OUTPUT_KEYS = ( STACK_OUTPUT_KEYS = (

View File

@ -247,7 +247,8 @@ class FormatTest(HeatTestCase):
'stack_id': self.stack.id, 'stack_id': self.stack.id,
'stack_name': 'test_stack', 'stack_name': 'test_stack',
'tenant': 'test_tenant_id'}, 'tenant': 'test_tenant_id'},
'updated_time': None} 'updated_time': None,
'parent': None}
self.assertEqual(expected_stack_info, info) self.assertEqual(expected_stack_info, info)
def test_format_stack_created_time(self): def test_format_stack_created_time(self):