Disable port number 0 for floating IP port_forwarding
Floating IP port forwarding internal or external port number should not allow 0, otherwise you will get some ValueError exception in neutron server. Directly modify the floating-ip-port-forwarding extension to change the external_port and internal_port minimum value. Change-Id: Icb177932f6cf1262757b29cb9b997321704616b7 Closes-Bug: #1799150
This commit is contained in:
parent
987fc92fef
commit
8dc31ec5f2
@ -91,13 +91,15 @@ SUB_RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
'is_visible': False},
|
'is_visible': False},
|
||||||
EXTERNAL_PORT: {
|
EXTERNAL_PORT: {
|
||||||
'allow_post': True, 'allow_put': True,
|
'allow_post': True, 'allow_put': True,
|
||||||
'validate': {'type:port_range': None},
|
'convert_to': converters.convert_to_int,
|
||||||
|
'validate': {'type:range': [1, 65535]},
|
||||||
'is_visible': True,
|
'is_visible': True,
|
||||||
'is_sort_key': True,
|
'is_sort_key': True,
|
||||||
'is_filter': True},
|
'is_filter': True},
|
||||||
INTERNAL_PORT: {
|
INTERNAL_PORT: {
|
||||||
'allow_post': True, 'allow_put': True,
|
'allow_post': True, 'allow_put': True,
|
||||||
'validate': {'type:port_range': None},
|
'convert_to': converters.convert_to_int,
|
||||||
|
'validate': {'type:range': [1, 65535]},
|
||||||
'is_visible': True},
|
'is_visible': True},
|
||||||
INTERNAL_IP_ADDRESS: {'allow_post': True,
|
INTERNAL_IP_ADDRESS: {'allow_post': True,
|
||||||
'allow_put': True,
|
'allow_put': True,
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Neutron API should not allow user to set zero for floating IP port
|
||||||
|
forwarding internal or external port number. Directly modify the
|
||||||
|
floating-ip-port-forwarding extension to change external_port and
|
||||||
|
internal_port minimum value to 1. Then API and port forwarding object
|
||||||
|
will make consistent for these attributes.
|
Loading…
Reference in New Issue
Block a user