From e33d56ff79950581d7eef4fc2082bfc9cdca36db Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Fri, 1 Mar 2019 16:09:24 +0800 Subject: [PATCH] add the max_value to field in create flavor form The value of vcpus, ram and disk exceeds 2147483647, the service will throw an error, so I add the max_value to field in create flavor form Change-Id: I8d7c7bff06b546126ac41c8295265363849719be --- .../dashboards/admin/flavors/workflows.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openstack_dashboard/dashboards/admin/flavors/workflows.py b/openstack_dashboard/dashboards/admin/flavors/workflows.py index 4826f09d95..e98f0ca93c 100644 --- a/openstack_dashboard/dashboards/admin/flavors/workflows.py +++ b/openstack_dashboard/dashboards/admin/flavors/workflows.py @@ -41,11 +41,14 @@ class CreateFlavorInfoAction(workflows.Action): max_length=255, help_text=_flavor_id_help_text) vcpus = forms.IntegerField(label=_("VCPUs"), - min_value=1) + min_value=1, + max_value=2147483647) memory_mb = forms.IntegerField(label=_("RAM (MB)"), - min_value=1) + min_value=1, + max_value=2147483647) disk_gb = forms.IntegerField(label=_("Root Disk (GB)"), - min_value=0) + min_value=0, + max_value=2147483647) eph_gb = forms.IntegerField(label=_("Ephemeral Disk (GB)"), required=False, initial=0,