commit a4a8f46248ab1d1a68d422276df21f75b24be84c
Author: Gage Hugo <email address hidden>
Date: Thu Feb 2 20:01:53 2017 -0600
Make `is_valid` more flexible with uuid validation
In keystone, multiple domain ids are handled by concatenating
two valid uuids together. This causes issues with pycadf validation
and causes the following warning to be thrown:
warnings.warn('Invalid uuid. To ensure interoperability, identifiers '
'should be a valid uuid.')
This appears throughout the testing logs while running keystone tests
and there is a current attempt to remove most/all invalid uuids to
eliminate this warning [0]. However due to the multiple domain id
issue, this cannot be solved in keystone alone.
The idea to allow multiple uuids that were joined together was
mentioned before in a previous attempt to solve this issue [1].
This change:
- Allows 2 or more concatenated uuids to be considered valid without
emitting a warning
- Cleaned up the list of words that are exceptions for validation
- Added 'default' to list of valid words in exception list
- Added offending value to printed warning
- Broke up test_identifiers for better clarity about which tests
were valid. This also solves the issue of `warning_mock.called` always
being `True` once an invalid uuid of type string was checked within
test_identifier
- Added test for valid exception words and extra characters that
can be present in a valid uuid according to [2]
Reviewed: https:/ /review. openstack. org/428543 /git.openstack. org/cgit/ openstack/ pycadf/ commit/ ?id=a4a8f46248a b1d1a68d422276d f21f75b24be84c
Committed: https:/
Submitter: Jenkins
Branch: master
commit a4a8f46248ab1d1 a68d422276df21f 75b24be84c
Author: Gage Hugo <email address hidden>
Date: Thu Feb 2 20:01:53 2017 -0600
Make `is_valid` more flexible with uuid validation
In keystone, multiple domain ids are handled by concatenating
two valid uuids together. This causes issues with pycadf validation
and causes the following warning to be thrown:
warnings. warn('Invalid uuid. To ensure interoperability, identifiers '
'should be a valid uuid.')
This appears throughout the testing logs while running keystone tests
and there is a current attempt to remove most/all invalid uuids to
eliminate this warning [0]. However due to the multiple domain id
issue, this cannot be solved in keystone alone.
The idea to allow multiple uuids that were joined together was
mentioned before in a previous attempt to solve this issue [1].
This change: mock.called` always
- Allows 2 or more concatenated uuids to be considered valid without
emitting a warning
- Cleaned up the list of words that are exceptions for validation
- Added 'default' to list of valid words in exception list
- Added offending value to printed warning
- Broke up test_identifiers for better clarity about which tests
were valid. This also solves the issue of `warning_
being `True` once an invalid uuid of type string was checked within
test_identifier
- Added test for valid exception words and extra characters that
can be present in a valid uuid according to [2]
[0] https:/ /bugs.launchpad .net/keystone/ +bug/1659053 /bugs.launchpad .net/keystone/ +bug/1521844 /docs.python. org/2/library/ uuid.html
[1] https:/
[2] https:/
Co-Authored-By: Tin Lam <email address hidden>
Partial-Bug: #1659053 4fd37850c9ecc6f ac99deb3fc4
Change-Id: I58bba04c21c2d2