diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-06-23 11:45:12 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-06-24 14:37:04 -0400 |
| commit | 2833e627e8a3bf679260165e5631e7597bf81173 (patch) | |
| tree | c76e42e88c1df27daba92d5e4af7dc8024c00f8c /meta-openstack/recipes-devtools/python/python-neutron | |
| parent | ef2dd06225f987f855ddb186305ba6f1dbbb4302 (diff) | |
| download | meta-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>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron/uuid_wscheck.patch | 35 |
1 files changed, 35 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 @@ | |||
| 1 | Binary files git.orig/neutron/api/v2/.attributes.py.swp and git/neutron/api/v2/.attributes.py.swp differ | ||
| 2 | Index: 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 | |||
| 18 | Index: 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 | |||
