summaryrefslogtreecommitdiff
path: root/heatclient/v1
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-20 20:08:28 +0000
committerGerrit Code Review <review@openstack.org>2018-11-20 20:08:28 +0000
commitdd5f64c4c49d98f76635ca0dc467d7bbe9f5dbc1 (patch)
treeba757cd848e1c8882ad933a349d2a72bc929e168 /heatclient/v1
parentada4b90083ee2d6e61133d759be90daf325358e6 (diff)
parent597e98fec079c839831036495950f5cba2778d1d (diff)
downloadpython-heatclient-dd5f64c4c49d98f76635ca0dc467d7bbe9f5dbc1.tar.gz
Merge "Load files from adopt file when adopt stack"
Diffstat (limited to 'heatclient/v1')
-rw-r--r--heatclient/v1/shell.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py
index e5bf19c..66d9651 100644
--- a/heatclient/v1/shell.py
+++ b/heatclient/v1/shell.py
@@ -185,6 +185,10 @@ def do_stack_adopt(hc, args):
adopt_url = utils.normalise_file_path_to_url(args.adopt_file)
adopt_data = request.urlopen(adopt_url).read()
+ yaml_adopt_data = yaml.safe_load(adopt_data) or {}
+
+ files = yaml_adopt_data.get('files', {})
+ files.update(env_files)
if not len(adopt_data):
raise exc.CommandError('Invalid adopt-file, no data!')
@@ -201,7 +205,7 @@ def do_stack_adopt(hc, args):
'disable_rollback': not(args.enable_rollback),
'adopt_stack_data': adopt_data,
'parameters': utils.format_parameters(args.parameters),
- 'files': dict(list(env_files.items())),
+ 'files': files,
'environment': env
}