Merge "Expose stack_user_project_id in stack-show"

This commit is contained in:
Jenkins
2015-01-29 04:44:40 +00:00
committed by Gerrit Code Review
4 changed files with 5 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ basic_keys = (
rpc_api.STACK_UPDATED_TIME, rpc_api.STACK_UPDATED_TIME,
rpc_api.STACK_OWNER, rpc_api.STACK_OWNER,
rpc_api.STACK_PARENT, rpc_api.STACK_PARENT,
rpc_api.STACK_USER_PROJECT_ID,
) )

View File

@@ -104,6 +104,7 @@ def format_stack(stack, preview=False):
rpc_api.STACK_TIMEOUT: stack.timeout_mins, rpc_api.STACK_TIMEOUT: stack.timeout_mins,
rpc_api.STACK_OWNER: stack.username, rpc_api.STACK_OWNER: stack.username,
rpc_api.STACK_PARENT: stack.owner_id, rpc_api.STACK_PARENT: stack.owner_id,
rpc_api.STACK_USER_PROJECT_ID: stack.stack_user_project_id,
} }
if not preview: if not preview:

View File

@@ -31,7 +31,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_PARENT, STACK_USER_PROJECT_ID
) = ( ) = (
'stack_name', 'stack_identity', 'stack_name', 'stack_identity',
'creation_time', 'updated_time', 'deletion_time', 'creation_time', 'updated_time', 'deletion_time',
@@ -40,7 +40,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' 'parent', 'stack_user_project_id'
) )
STACK_OUTPUT_KEYS = ( STACK_OUTPUT_KEYS = (

View File

@@ -289,6 +289,7 @@ class FormatTest(common.HeatTestCase):
'stack_owner': 'test_username', 'stack_owner': 'test_username',
'stack_status': 'IN_PROGRESS', 'stack_status': 'IN_PROGRESS',
'stack_status_reason': '', 'stack_status_reason': '',
'stack_user_project_id': None,
'template_description': 'No description', 'template_description': 'No description',
'timeout_mins': None, 'timeout_mins': None,
'parameters': { 'parameters': {