summaryrefslogtreecommitdiffstats
path: root/dashboard/src/booking/forms.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-15 12:49:20 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-01-18 12:15:45 -0500
commit22bcbe3dda67bb8c4dbd632a8ac8925f6b0d9b5e (patch)
tree7fb04ff99daad14777fae01ae2b947888242baf7 /dashboard/src/booking/forms.py
parent842707a6575b98c18642be4ec26dbe1c41f689ad (diff)
Allow for Hosts to be Re-Imaged
This change adds a button the user can press on thier booking detail page to reset thier host. They can choose to deploy any available image to thier servers (not just the one already used) Change-Id: I97a9869d2b38389c54f13173bb28a68cc52bb8d5 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/booking/forms.py')
-rw-r--r--dashboard/src/booking/forms.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/dashboard/src/booking/forms.py b/dashboard/src/booking/forms.py
index cb76383..7ba5af0 100644
--- a/dashboard/src/booking/forms.py
+++ b/dashboard/src/booking/forms.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2018 Sawyer Bergeron, Parker Berberian, and others.
+# Copyright (c) 2018 Parker Berberian, Sawyer Bergeron, and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -28,7 +28,7 @@ class QuickBookingForm(forms.Form):
installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False)
scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False)
- def __init__(self, data=None, *args, user=None, **kwargs):
+ def __init__(self, data=None, user=None, *args, **kwargs):
chosen_users = []
if "default_user" in kwargs:
default_user = kwargs.pop("default_user")
@@ -104,3 +104,9 @@ class QuickBookingForm(forms.Form):
'edit': False
}
return attrs
+
+
+class HostReImageForm(forms.Form):
+
+ image_id = forms.IntegerField()
+ host_id = forms.IntegerField()