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 c6c24eda59)
This commit is contained in:
Akihiro Motoki 2017-08-17 08:43:44 +00:00
parent 39d863ec23
commit 60a2d59c59
1 changed files with 2 additions and 0 deletions

View File

@ -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={