diff options
author | ssmith <ssmith@iol.unh.edu> | 2020-05-27 19:19:03 -0400 |
---|---|---|
committer | ssmith <ssmith@iol.unh.edu> | 2020-05-28 15:12:37 -0400 |
commit | 945bfa360ed4c30f8a9b684dd49441afeeb4c9c1 (patch) | |
tree | ec0091a0124b585b15e52fffb2e2f100362b540c /src/workflow/models.py | |
parent | 9ebe025e1385a0a4fa8e24ad62cc1c0f8808fb9c (diff) |
Some small fixes to launch Akraino
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Change-Id: If64d15afa456b7bdf25d40015decb37b1a20da54
Diffstat (limited to 'src/workflow/models.py')
-rw-r--r-- | src/workflow/models.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/workflow/models.py b/src/workflow/models.py index 173fdba..4a5616e 100644 --- a/src/workflow/models.py +++ b/src/workflow/models.py @@ -368,7 +368,6 @@ class Repository(): RESOURCE_SELECT = "resource_select" CONFIRMATION = "confirmation" SELECTED_RESOURCE_TEMPLATE = "selected resource template pk" - SELECTED_CONFIG_BUNDLE = "selected config bundle pk" SELECTED_OPNFV_CONFIG = "selected opnfv deployment config" RESOURCE_TEMPLATE_MODELS = "generic_resource_template_models" RESOURCE_TEMPLATE_INFO = "generic_resource_template_info" @@ -456,15 +455,6 @@ class Repository(): self.el[self.RESULT_KEY] = self.SELECTED_RESOURCE_TEMPLATE return - if self.CONFIG_MODELS in self.el: - errors = self.make_software_config_bundle() - if errors: - return errors - else: - self.el[self.HAS_RESULT] = True - self.el[self.RESULT_KEY] = self.SELECTED_CONFIG_BUNDLE - return - if self.OPNFV_MODELS in self.el: errors = self.make_opnfv_config() if errors: @@ -585,11 +575,6 @@ class Repository(): else: return "BOOK, no selected resource. CODE:0x000e" - if self.SELECTED_CONFIG_BUNDLE not in self.el: - return "BOOK, no selected config bundle. CODE:0x001f" - - booking.config_bundle = self.el[self.SELECTED_CONFIG_BUNDLE] - if not booking.start: return "BOOK, booking has no start. CODE:0x0010" if not booking.end: @@ -602,7 +587,8 @@ class Repository(): else: return "BOOK, collaborators not defined. CODE:0x0013" try: - resource_bundle = ResourceManager.getInstance().convertResourceBundle(selected_grb, config=booking.config_bundle) + res_manager = ResourceManager.getInstance() + resource_bundle = res_manager.instantiateTemplate(selected_grb) except ResourceAvailabilityException as e: return "BOOK, requested resources are not available. Exception: " + str(e) + " CODE:0x0014" except ModelValidationException as e: |