diff options
Diffstat (limited to 'snaps/openstack/create_stack.py')
-rw-r--r-- | snaps/openstack/create_stack.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/snaps/openstack/create_stack.py b/snaps/openstack/create_stack.py index 12ce602..43ac307 100644 --- a/snaps/openstack/create_stack.py +++ b/snaps/openstack/create_stack.py @@ -498,6 +498,22 @@ class OpenStackHeatStack(OpenStackCloudObject, object): return status == expected_status_code +def generate_creator(os_creds, stack_inst, image_settings): + """ + Initializes an OpenStackHeatStack object + :param os_creds: the OpenStack credentials + :param stack_inst: the SNAPS-OO VmInst domain object + :param image_settings: list of SNAPS-OO ImageConfig objects + :return: an initialized OpenStackHeatStack object + """ + + heat_config = StackConfig( + name=stack_inst.name, template={'place': 'holder'}) + heat_creator = OpenStackHeatStack(os_creds, heat_config, image_settings) + heat_creator.initialize() + return heat_creator + + class StackSettings(StackConfig): """ Class to hold the configuration settings required for creating OpenStack |