aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/workflow_manager.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-03-16 17:54:09 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-03-16 17:54:09 +0000
commit0db3a84d9d9ed213983a517efd35c339537ef472 (patch)
treea6d7ac7ba2f2d70e18cb984bda4020c736082c62 /src/workflow/workflow_manager.py
parent176ec9aacbc87e6077e8807c60f95a1ccbbc26e3 (diff)
parent064f145f218385a6401fa6be2ccbbc462e915c26 (diff)
Merge "Test resource templates now use the same lab as the image generated alongside it."
Diffstat (limited to 'src/workflow/workflow_manager.py')
-rw-r--r--src/workflow/workflow_manager.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/workflow/workflow_manager.py b/src/workflow/workflow_manager.py
index fda105e..e31e14c 100644
--- a/src/workflow/workflow_manager.py
+++ b/src/workflow/workflow_manager.py
@@ -16,9 +16,8 @@ from booking.models import Booking
from workflow.workflow_factory import WorkflowFactory
from workflow.models import Repository
from resource_inventory.models import (
- GenericResourceBundle,
- ConfigBundle,
- HostConfiguration,
+ ResourceTemplate,
+ ResourceConfiguration,
OPNFVConfig
)
from workflow.forms import ManagerForm
@@ -154,10 +153,10 @@ class SessionManager():
edit_object = Booking.objects.get(pk=target_id)
self.prefill_booking(edit_object)
elif workflow_type == 1:
- edit_object = GenericResourceBundle.objects.get(pk=target_id)
+ edit_object = ResourceTemplate.objects.get(pk=target_id)
self.prefill_resource(edit_object)
elif workflow_type == 2:
- edit_object = ConfigBundle.objects.get(pk=target_id)
+ edit_object = ResourceTemplate.objects.get(pk=target_id)
self.prefill_config(edit_object)
def prefill_booking(self, booking):
@@ -213,7 +212,7 @@ class SessionManager():
models = self.active_workflow().repository.el.get(self.active_workflow().repository.CONFIG_MODELS, {})
models['bundle'] = config
models['host_configs'] = []
- for host_conf in HostConfiguration.objects.filter(bundle=config):
+ for host_conf in ResourceConfiguration.objects.filter(bundle=config):
models['host_configs'].append(host_conf)
models['opnfv'] = OPNFVConfig.objects.filter(bundle=config).last()
return models
@@ -227,7 +226,7 @@ class SessionManager():
opnfv = OPNFVConfig.objects.filter(bundle=config).last()
confirm['configuration']['installer'] = opnfv.installer.name
confirm['configuration']['scenario'] = opnfv.scenario.name
- for host_conf in HostConfiguration.objects.filter(bundle=config):
+ for host_conf in ResourceConfiguration.objects.filter(bundle=config):
h = {"name": host_conf.host.resource.name, "image": host_conf.image.name, "role": host_conf.opnfvRole.name}
confirm['configuration']['hosts'].append(h)
return confirm