aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/sw_bundle_workflow.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-02-13 14:25:24 -0500
committerParker Berberian <pberberian@iol.unh.edu>2020-02-13 14:25:24 -0500
commit8c012f8a9bc64add11920688abcd6981278cb0ea (patch)
tree99772d9361784d2724d1665c566c69888ff7d5e9 /src/workflow/sw_bundle_workflow.py
parentf5cdab1569b26df0c7ffc3df1529f095116fd13a (diff)
Fix Imports
Fixes stale import statements. The dashboard can now come up and we can run our unit tests Change-Id: I7189afb2cd37aaa2492de065c236b6aa9a35de5b Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow/sw_bundle_workflow.py')
-rw-r--r--src/workflow/sw_bundle_workflow.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/workflow/sw_bundle_workflow.py b/src/workflow/sw_bundle_workflow.py
index ebd8c86..686f46f 100644
--- a/src/workflow/sw_bundle_workflow.py
+++ b/src/workflow/sw_bundle_workflow.py
@@ -13,7 +13,7 @@ from django.forms import formset_factory
from workflow.models import WorkflowStep
from workflow.forms import BasicMetaForm, HostSoftwareDefinitionForm
from workflow.booking_workflow import Abstract_Resource_Select
-from resource_inventory.models import Image, GenericHost, ConfigBundle, HostConfiguration
+from resource_inventory.models import Image, ResourceConfiguration, ResourceTemplate
class SWConf_Resource_Select(Abstract_Resource_Select):
@@ -38,7 +38,7 @@ class Define_Software(WorkflowStep):
user = self.repo_get(self.repo.SESSION_USER)
lab = self.repo_get(self.repo.SELECTED_GRESOURCE_BUNDLE).lab
for i, host_data in enumerate(hosts_data):
- host = GenericHost.objects.get(pk=host_data['host_id'])
+ host = ResourceConfiguration.objects.get(pk=host_data['host_id'])
wrong_owner = Image.objects.exclude(owner=user).exclude(public=True)
wrong_host = Image.objects.exclude(host_type=host.profile)
wrong_lab = Image.objects.exclude(from_lab=lab)
@@ -86,7 +86,7 @@ class Define_Software(WorkflowStep):
if not grb:
return []
if grb.id:
- return GenericHost.objects.filter(resource__bundle=grb)
+ return ResourceConfiguration.objects.filter(resource__bundle=grb)
generic_hosts = self.repo_get(self.repo.GRESOURCE_BUNDLE_MODELS, {}).get("hosts", [])
return generic_hosts
@@ -109,7 +109,7 @@ class Define_Software(WorkflowStep):
def post(self, post_data, user):
models = self.repo_get(self.repo.CONFIG_MODELS, {})
if "bundle" not in models:
- models['bundle'] = ConfigBundle(owner=self.repo_get(self.repo.SESSION_USER))
+ models['bundle'] = ResourceTemplate(owner=self.repo_get(self.repo.SESSION_USER))
confirm = self.repo_get(self.repo.CONFIRMATION, {})
@@ -127,7 +127,7 @@ class Define_Software(WorkflowStep):
if headnode:
has_headnode = True
bundle = models['bundle']
- hostConfig = HostConfiguration(
+ hostConfig = ResourceConfiguration(
host=host,
image=image,
bundle=bundle,
@@ -175,7 +175,7 @@ class Config_Software(WorkflowStep):
def post(self, post_data, user):
models = self.repo_get(self.repo.CONFIG_MODELS, {})
if "bundle" not in models:
- models['bundle'] = ConfigBundle(owner=self.repo_get(self.repo.SESSION_USER))
+ models['bundle'] = ResourceTemplate(owner=self.repo_get(self.repo.SESSION_USER))
confirm = self.repo_get(self.repo.CONFIRMATION, {})
if "configuration" not in confirm: