summaryrefslogtreecommitdiffstats
path: root/ogcp/forms
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-04-06 17:29:44 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-04-08 08:03:32 +0200
commitfcbaf7d66d5e344b12b57d8d8c4c182c7497e764 (patch)
treef3a30c47d0ae91838495485e3a1c45c39e6c54d9 /ogcp/forms
parentd2fef8e85dcd348201631911711cbb9b5db30ec3 (diff)
Add Update image to commands
Allows updating the image file for an existing image. This action is related to /image/create in ogServer API. If ogServer receives an POST /image/create without the parameter "description", it does not create a new image and only updates.
Diffstat (limited to 'ogcp/forms')
-rw-r--r--ogcp/forms/action_forms.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 5e8bce1..5cabd54 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -137,6 +137,14 @@ class ImageCreateForm(FlaskForm):
description = StringField(label=_l('Description'))
create = SubmitField(label=_l('Create'))
+
+class ImageUpdateForm(FlaskForm):
+ ip = HiddenField()
+ os = SelectField(label=_l('Partition'), choices=[])
+ image = SelectField(label=_l('Image'), choices=[])
+ update = SubmitField(label=_l('Update'))
+
+
class CenterForm(FlaskForm):
name = StringField(label=_l('Center name'),
validators=[InputRequired()])