From: gongysh Date: Tue, 4 Dec 2012 06:46:25 +0000 (+0800) Subject: Support to reset dnsname_servers and host_routes to empty X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4a6ae51eab09c1c38a52404fe816baad1c67376d;p=openstack-build%2Fneutron-build.git Support to reset dnsname_servers and host_routes to empty Bug #1086232 Change-Id: Ia27170b206f755577c8607c5b27dc5cf57d19633 --- diff --git a/quantum/api/v2/attributes.py b/quantum/api/v2/attributes.py index 203f0d54d..8cda1eee5 100644 --- a/quantum/api/v2/attributes.py +++ b/quantum/api/v2/attributes.py @@ -289,6 +289,11 @@ def convert_kvp_list_to_dict(kvp_list): kvp_map[key].add(value) return dict((x, list(y)) for x, y in kvp_map.iteritems()) + +def convert_none_to_empty_list(value): + return [] if value is None else value + + HOSTNAME_PATTERN = ("(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]" "{1,63}(?