diff options
Diffstat (limited to 'heatclient/osc/v1/stack.py')
-rw-r--r-- | heatclient/osc/v1/stack.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/heatclient/osc/v1/stack.py b/heatclient/osc/v1/stack.py index 6787f1c..719c0de 100644 --- a/heatclient/osc/v1/stack.py +++ b/heatclient/osc/v1/stack.py @@ -124,9 +124,11 @@ class CreateStack(command.ShowOne): parsed_args.template, object_request=http.authenticated_fetcher(client)) + env_files_list = [] env_files, env = ( template_utils.process_multiple_environments_and_files( - env_paths=parsed_args.environment)) + env_paths=parsed_args.environment, + env_list_tracker=env_files_list)) parameters = heat_utils.format_all_parameters( parsed_args.parameter, @@ -146,6 +148,10 @@ class CreateStack(command.ShowOne): 'environment': env } + # If one or more environments is found, pass the listing to the server + if env_files_list: + fields['environment_files'] = env_files_list + if parsed_args.tags: fields['tags'] = parsed_args.tags if parsed_args.timeout: @@ -286,9 +292,11 @@ class UpdateStack(command.ShowOne): object_request=http.authenticated_fetcher(client), existing=parsed_args.existing) + env_files_list = [] env_files, env = ( template_utils.process_multiple_environments_and_files( - env_paths=parsed_args.environment)) + env_paths=parsed_args.environment, + env_list_tracker=env_files_list)) parameters = heat_utils.format_all_parameters( parsed_args.parameter, @@ -308,6 +316,10 @@ class UpdateStack(command.ShowOne): 'environment': env } + # If one or more environments is found, pass the listing to the server + if env_files_list: + fields['environment_files'] = env_files_list + if parsed_args.tags: fields['tags'] = parsed_args.tags if parsed_args.timeout: |