yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #44956
[Bug 1533518] Re: Remove 'validate' key in 'type:dict_or_nodata' type in resource attribute map
Reviewed: https://review.openstack.org/266319
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d3701f001d7e6f9d4af8521354c1a84accd6e830
Submitter: Jenkins
Branch: master
commit d3701f001d7e6f9d4af8521354c1a84accd6e830
Author: Bo Chi <shcbo@xxxxxxxxxx>
Date: Wed Jan 13 03:15:53 2016 -0500
Remove 'validate' key in 'type:dict_or_nodata' type
In resource_map dict, if the 'validate' section of type:dict_or_nodata
contains 'validate' key, the validation will not be performed correctly,
because in _validate_dict_item(), it checks key name that starts with
'type:', and perform the validation.
This patch removed 'validate' key in 'external_fixed_ips' section in
neutron/extensions/l3_ext_gw_mode.py
Change-Id: I1ee49f8313bddef6f41b133f49830a8fbbe4769e
Closes-Bug: #1533518
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1533518
Title:
Remove 'validate' key in 'type:dict_or_nodata' type in resource
attribute map
Status in neutron:
Fix Released
Bug description:
In neutron/extensions/l3_ext_gw_mode.py, there's another 'validate' key in the 'validate' section of type 'type:dict_or_nodata', this cause the validation is not performed.
Because in _validate_dict_item(), it checks key name that starts with 'type:', and perform the validation.
EXTENDED_ATTRIBUTES_2_0 = {
'routers': {l3.EXTERNAL_GW_INFO:
{'allow_post': True,
'allow_put': True,
'is_visible': True,
'default': None,
'enforce_policy': True,
'validate':
{'type:dict_or_nodata':
{'network_id': {'type:uuid': None, 'required': True},
'enable_snat': {'type:boolean': None, 'required': False,
'convert_to': attrs.convert_to_boolean},
'external_fixed_ips': {
'convert_list_to': attrs.convert_kvp_list_to_dict,
'validate': {'type:fixed_ips': None}, <======== error
'default': None,
'required': False}
}
}}}}
The correct format is :
'external_fixed_ips': {
'convert_list_to': attrs.convert_kvp_list_to_dict,
'type:fixed_ips': None, <======== should be
'default': None,
'required': False}
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1533518/+subscriptions
References