summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-06-23 11:45:12 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-24 14:37:04 -0400
commit2833e627e8a3bf679260165e5631e7597bf81173 (patch)
treec76e42e88c1df27daba92d5e4af7dc8024c00f8c
parentef2dd06225f987f855ddb186305ba6f1dbbb4302 (diff)
downloadmeta-cloud-services-2833e627e8a3bf679260165e5631e7597bf81173.tar.gz
neutron: update uuid check error message
If the uuid specified has trailing whitespace, update the error message to suggest that this is the case. (ie give a more useful error message) Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch35
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron_git.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch b/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch
new file mode 100644
index 0000000..f3748d6
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch
@@ -0,0 +1,35 @@
1Binary files git.orig/neutron/api/v2/.attributes.py.swp and git/neutron/api/v2/.attributes.py.swp differ
2Index: git/neutron/api/v2/attributes.py
3===================================================================
4--- git.orig/neutron/api/v2/attributes.py
5+++ git/neutron/api/v2/attributes.py
6@@ -354,7 +354,10 @@
7
8 def _validate_uuid(data, valid_values=None):
9 if not uuidutils.is_uuid_like(data):
10- msg = _("'%s' is not a valid UUID") % data
11+ if data != data.rstrip():
12+ msg = _("'%s' is not a valid UUID: trailing whitespace?") % data
13+ else:
14+ msg = _("'%s' is not a valid UUID") % data
15 LOG.debug(msg)
16 return msg
17
18Index: git/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py
19===================================================================
20--- git.orig/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py
21+++ git/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py
22@@ -569,8 +569,11 @@
23 raise n_exc.InvalidInput(error_message=msg)
24 pair_list.append((segment, dot1qtag))
25 else:
26- LOG.debug(_('%s is not a valid uuid'), segment)
27- msg = _("'%s' is not a valid UUID") % segment
28+ if segment != segment.rstrip():
29+ msg = _("'%s' is not a valid UUID: trailing whitespace?") % segment
30+ else:
31+ msg = _("'%s' is not a valid UUID") % segment
32+ LOG.debug(msg)
33 raise n_exc.InvalidInput(error_message=msg)
34 return pair_list
35
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
index 5fbad17..1314548 100644
--- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/icehouse \
17 file://metadata_agent.ini \ 17 file://metadata_agent.ini \
18 file://neutron-dhcp-agent-netns-cleanup.cron \ 18 file://neutron-dhcp-agent-netns-cleanup.cron \
19 file://0001-neutron.conf-jumpstart-nova-state-reporting-configur.patch \ 19 file://0001-neutron.conf-jumpstart-nova-state-reporting-configur.patch \
20 file://uuid_wscheck.patch \
20 " 21 "
21SRCREV="e0deffc71e5031059530b9b6c2ef3b0765de3d10" 22SRCREV="e0deffc71e5031059530b9b6c2ef3b0765de3d10"
22PV="2014.1+git${SRCPV}" 23PV="2014.1+git${SRCPV}"