diff options
author | 2018-01-09 18:30:12 +0000 | |
---|---|---|
committer | 2018-01-09 18:30:12 +0000 | |
commit | c0942c3dd80fa50e15fc81d1b022199200640587 (patch) | |
tree | a4140e9256b5759fe454c7fd7f6c3f57ebb207fc | |
parent | 8c3757c7179cffb86d9889c1744c22a2620bc6a7 (diff) | |
parent | c2529aa55013a8e7df7080c3bb9693c313fb9b67 (diff) |
Merge "Added support for Heat resource files."
-rw-r--r-- | snaps/config/stack.py | 6 | ||||
-rw-r--r-- | snaps/openstack/utils/heat_utils.py | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/snaps/config/stack.py b/snaps/config/stack.py index 0655961..fd427af 100644 --- a/snaps/config/stack.py +++ b/snaps/config/stack.py @@ -37,12 +37,18 @@ class StackConfig(object): if template attribute is None) :param env_values: dict() of strings for substitution of template default values (optional) + :param files: Supplies the contents of files referenced in the template + or the environment. This object must be a dict() of + strings where the key is the file URI or filename and the + value contains the file's contents (optional) """ self.name = kwargs.get('name') self.template = kwargs.get('template') self.template_path = kwargs.get('template_path') self.env_values = kwargs.get('env_values') + self.files = kwargs.get('files') + if 'stack_create_timeout' in kwargs: self.stack_create_timeout = kwargs['stack_create_timeout'] else: diff --git a/snaps/openstack/utils/heat_utils.py b/snaps/openstack/utils/heat_utils.py index 07692e2..8e49c53 100644 --- a/snaps/openstack/utils/heat_utils.py +++ b/snaps/openstack/utils/heat_utils.py @@ -117,6 +117,9 @@ def create_stack(heat_cli, stack_settings): if stack_settings.env_values: args['parameters'] = stack_settings.env_values + if stack_settings.files: + args['files'] = stack_settings.files + stack = heat_cli.stacks.create(**args) return get_stack_by_id(heat_cli, stack_id=stack['stack']['id']) |