From: Zhongyue Luo Date: Fri, 9 Nov 2012 03:49:04 +0000 (+0800) Subject: Clean up quantum.api.v2.validators X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c89d71f14a45c63dbc9df259d7e39a85898d40f8;p=openstack-build%2Fneutron-build.git Clean up quantum.api.v2.validators Remove redundant declarations Sort validators by lexographical order Change-Id: I9a55a55a28702bba38615bad192f6f80706eec7c --- diff --git a/quantum/api/v2/attributes.py b/quantum/api/v2/attributes.py index db9edcac3..907665763 100644 --- a/quantum/api/v2/attributes.py +++ b/quantum/api/v2/attributes.py @@ -326,22 +326,19 @@ MAC_PATTERN = "^%s[aceACE02468](:%s{2}){5}$" % (HEX_ELEM, HEX_ELEM) # Dictionary that maintains a list of validation functions validators = {'type:boolean': _validate_boolean, - 'type:values': _validate_values, - 'type:string': _validate_string, - 'type:range': _validate_range, - 'type:mac_address': _validate_mac_address, 'type:fixed_ips': _validate_fixed_ips, + 'type:hostroutes': _validate_hostroutes, 'type:ip_address': _validate_ip_address, 'type:ip_address_or_none': _validate_ip_address_or_none, + 'type:ip_pools': _validate_ip_pools, 'type:mac_address': _validate_mac_address, + 'type:nameservers': _validate_nameservers, 'type:range': _validate_range, 'type:regex': _validate_regex, + 'type:string': _validate_string, 'type:subnet': _validate_subnet, 'type:uuid': _validate_uuid, - 'type:regex': _validate_regex, - 'type:ip_pools': _validate_ip_pools, - 'type:hostroutes': _validate_hostroutes, - 'type:nameservers': _validate_nameservers} + 'type:values': _validate_values} # Note: a default of ATTR_NOT_SPECIFIED indicates that an # attribute is not required, but will be generated by the plugin