summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-08-17 08:43:44 +0000
committerAkihiro Motoki <amotoki@gmail.com>2018-01-16 15:51:37 +0000
commit60a2d59c597a633daca38aaab0a357f0151d3014 (patch)
treeaefcb026ef94b3e2b9129f7ea3262df070a4b105
parent39d863ec239601ea6c57ef5273d6137d5930d80e (diff)
downloadhorizon-60a2d59c597a633daca38aaab0a357f0151d3014.tar.gz
Make icmp_type/code optional
In Neutron API icmp_type/code are not required fields, so they should be optional. Previously we support Nova API which requires icmp_type and icmp_code but we dropped Nova security group API support in Pike and we no longer need to care it. Change-Id: Ie460e763928b4f50f84c38d88556df632078ba42 Closes-Bug: #1712025 (cherry picked from commit c6c24eda59f8203f112125a4d1c073158576dd6b)
-rw-r--r--openstack_dashboard/dashboards/project/security_groups/forms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/project/security_groups/forms.py b/openstack_dashboard/dashboards/project/security_groups/forms.py
index 7fd6c8095..4d85aa941 100644
--- a/openstack_dashboard/dashboards/project/security_groups/forms.py
+++ b/openstack_dashboard/dashboards/project/security_groups/forms.py
@@ -175,6 +175,7 @@ class AddRule(forms.SelfHandlingForm):
utils_validators.validate_port_range])
icmp_type = forms.IntegerField(label=_("Type"),
+ required=False,
help_text=_("Enter a value for ICMP type "
"in the range (-1: 255)"),
widget=forms.TextInput(attrs={
@@ -186,6 +187,7 @@ class AddRule(forms.SelfHandlingForm):
validate_icmp_type_range])
icmp_code = forms.IntegerField(label=_("Code"),
+ required=False,
help_text=_("Enter a value for ICMP code "
"in the range (-1: 255)"),
widget=forms.TextInput(attrs={