From c89d71f14a45c63dbc9df259d7e39a85898d40f8 Mon Sep 17 00:00:00 2001 From: Zhongyue Luo Date: Fri, 9 Nov 2012 11:49:04 +0800 Subject: [PATCH] Clean up quantum.api.v2.validators Remove redundant declarations Sort validators by lexographical order Change-Id: I9a55a55a28702bba38615bad192f6f80706eec7c --- quantum/api/v2/attributes.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 -- 2.45.2