diff options
Diffstat (limited to 'src/workflow')
-rw-r--r-- | src/workflow/models.py | 2 | ||||
-rw-r--r-- | src/workflow/opnfv_workflow.py | 2 | ||||
-rw-r--r-- | src/workflow/snapshot_workflow.py | 2 | ||||
-rw-r--r-- | src/workflow/workflow_manager.py | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/workflow/models.py b/src/workflow/models.py index 9d1fac2..99608f6 100644 --- a/src/workflow/models.py +++ b/src/workflow/models.py @@ -146,7 +146,7 @@ class BookingAuthManager(): return True # admin override for this user if Booking.objects.filter(owner=booking.owner, end__gt=timezone.now()).count() >= 3: return False - if len(booking.resource.template.getHosts()) < 2: + if len(booking.resource.template.getResources()) < 2: return True # if they only have one server, we dont care if repo.BOOKING_INFO_FILE not in repo.el: return False # INFO file not provided diff --git a/src/workflow/opnfv_workflow.py b/src/workflow/opnfv_workflow.py index a192d6e..0cac48e 100644 --- a/src/workflow/opnfv_workflow.py +++ b/src/workflow/opnfv_workflow.py @@ -202,7 +202,7 @@ class Assign_Host_Roles(WorkflowStep): # taken verbatim from Define_Software in if config is None: context['error'] = "Please select a Configuration on the first step" - formset = self.create_host_role_formset(hostlist=config.bundle.getHosts()) + formset = self.create_host_role_formset(hostlist=config.bundle.getResources()) context['formset'] = formset return context diff --git a/src/workflow/snapshot_workflow.py b/src/workflow/snapshot_workflow.py index 4266587..c2f4cd6 100644 --- a/src/workflow/snapshot_workflow.py +++ b/src/workflow/snapshot_workflow.py @@ -36,7 +36,7 @@ class Select_Host_Step(WorkflowStep): booking_hosts[booking.id]['start'] = booking.start.strftime("%Y-%m-%d") booking_hosts[booking.id]['end'] = booking.end.strftime("%Y-%m-%d") booking_hosts[booking.id]['hosts'] = [] - for genericHost in booking.resource.template.getHosts(): + for genericHost in booking.resource.template.getResources(): booking_hosts[booking.id]['hosts'].append({"name": genericHost.resource.name}) context['booking_hosts'] = booking_hosts diff --git a/src/workflow/workflow_manager.py b/src/workflow/workflow_manager.py index 4677829..fda105e 100644 --- a/src/workflow/workflow_manager.py +++ b/src/workflow/workflow_manager.py @@ -189,7 +189,7 @@ class SessionManager(): models['bundle'] = resource models['interfaces'] = {} models['vlans'] = {} - for host in resource.getHosts(): + for host in resource.getResources(): models['hosts'].append(host) models['interfaces'][host.resource.name] = [] models['vlans'][host.resource.name] = {} @@ -205,7 +205,7 @@ class SessionManager(): confirm['resource'] = {} confirm['resource']['hosts'] = [] confirm['resource']['lab'] = resource.lab.lab_user.username - for host in resource.getHosts(): + for host in resource.getResources(): confirm['resource']['hosts'].append({"name": host.resource.name, "profile": host.profile.name}) return confirm |