diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-12-14 08:34:15 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-12-14 08:34:15 +0000 |
commit | 0c246f32594027465f774c7cc94c00f8bef212ec (patch) | |
tree | a961007d627949bbcd6cff147ad325f0be5fe138 /heatclient/osc | |
parent | f2b7b64f5d8c872e2456736110f1ed64c9825650 (diff) | |
parent | 280b1edeeab3a9746ec6674d23fb7ea95b4b46fc (diff) | |
download | python-heatclient-0c246f32594027465f774c7cc94c00f8bef212ec.tar.gz |
Merge "User server side env merging with osc plugin"
Diffstat (limited to 'heatclient/osc')
-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: |