diff options
Diffstat (limited to 'src/workflow/snapshot_workflow.py')
-rw-r--r-- | src/workflow/snapshot_workflow.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/workflow/snapshot_workflow.py b/src/workflow/snapshot_workflow.py index 9d4b880..4ddc397 100644 --- a/src/workflow/snapshot_workflow.py +++ b/src/workflow/snapshot_workflow.py @@ -11,9 +11,11 @@ import datetime import json -from resource_inventory.models import * -from workflow.models import * -from workflow.forms import * +from booking.models import Booking +from resource_inventory.models import Host, Image +from workflow.models import WorkflowStep +from workflow.forms import SnapshotMetaForm, SnapshotHostSelectForm + class Select_Host_Step(WorkflowStep): template = "snapshot_workflow/steps/select_host.html" @@ -37,7 +39,6 @@ class Select_Host_Step(WorkflowStep): for genericHost in booking.resource.template.getHosts(): booking_hosts[booking.id]['hosts'].append({"name": genericHost.resource.name}) - context['booking_hosts'] = booking_hosts chosen_host = self.repo_get(self.repo.SNAPSHOT_MODELS, {}).get("host") @@ -77,6 +78,7 @@ class Select_Host_Step(WorkflowStep): self.metastep.set_valid("Success") return self.render(request) + class Image_Meta_Step(WorkflowStep): template = "snapshot_workflow/steps/meta.html" title = "Additional Information" @@ -88,7 +90,6 @@ class Image_Meta_Step(WorkflowStep): context['form'] = SnapshotMetaForm() return context - def post_render(self, request): form = SnapshotMetaForm(request.POST) if form.is_valid(): |