Expose stack_user_project_id in stack-show
stack_user_project_id is currently never exposed by heat, so the user has no way of discovering what it is. This has a couple of implications: - The user can't call the REST API create_software_deployment unless they know the stack_user_project_id of the stack that the server resource belongs to - user can't do manual cleanup of stack_user_project_id when necessary This change adds stack_user_project_id to the formatted output of the stack-show REST API call. Change-Id: I0a2d337401c164eb58dbce63e01f68f98f8d467e Closes-Bug: #1413398
This commit is contained in:
parent
f690f8d599
commit
007ce91c55
@ -30,6 +30,7 @@ basic_keys = (
|
||||
rpc_api.STACK_UPDATED_TIME,
|
||||
rpc_api.STACK_OWNER,
|
||||
rpc_api.STACK_PARENT,
|
||||
rpc_api.STACK_USER_PROJECT_ID,
|
||||
)
|
||||
|
||||
|
||||
|
@ -104,6 +104,7 @@ def format_stack(stack, preview=False):
|
||||
rpc_api.STACK_TIMEOUT: stack.timeout_mins,
|
||||
rpc_api.STACK_OWNER: stack.username,
|
||||
rpc_api.STACK_PARENT: stack.owner_id,
|
||||
rpc_api.STACK_USER_PROJECT_ID: stack.stack_user_project_id,
|
||||
}
|
||||
|
||||
if not preview:
|
||||
|
@ -31,7 +31,7 @@ STACK_KEYS = (
|
||||
STACK_PARAMETERS, STACK_OUTPUTS, STACK_ACTION,
|
||||
STACK_STATUS, STACK_STATUS_DATA, STACK_CAPABILITIES,
|
||||
STACK_DISABLE_ROLLBACK, STACK_TIMEOUT, STACK_OWNER,
|
||||
STACK_PARENT
|
||||
STACK_PARENT, STACK_USER_PROJECT_ID
|
||||
) = (
|
||||
'stack_name', 'stack_identity',
|
||||
'creation_time', 'updated_time', 'deletion_time',
|
||||
@ -40,7 +40,7 @@ STACK_KEYS = (
|
||||
'parameters', 'outputs', 'stack_action',
|
||||
'stack_status', 'stack_status_reason', 'capabilities',
|
||||
'disable_rollback', 'timeout_mins', 'stack_owner',
|
||||
'parent'
|
||||
'parent', 'stack_user_project_id'
|
||||
)
|
||||
|
||||
STACK_OUTPUT_KEYS = (
|
||||
|
@ -289,6 +289,7 @@ class FormatTest(common.HeatTestCase):
|
||||
'stack_owner': 'test_username',
|
||||
'stack_status': 'IN_PROGRESS',
|
||||
'stack_status_reason': '',
|
||||
'stack_user_project_id': None,
|
||||
'template_description': 'No description',
|
||||
'timeout_mins': None,
|
||||
'parameters': {
|
||||
|
Loading…
Reference in New Issue
Block a user