horizon/openstack_dashboard
Akihiro Motoki 5fd5b4c893 Fix version handling compatible with python-semanticversion 2.8
It seems the behavior of 'partial' argument of Version class __init__
has been changed between semantic-version 2.6.0 and 2.8.1
(though I could not identify the root cause).
'partial' argument is marked as deprecated in semantic-vesion 2.7.0,
so it is a good chance not to depend on 'partial' argument in horizon.

This commit uses Version.coerce() [1] instead to convert non-semver
version into a valid semver version.
We also need to keep the original version information as it is passed
when initializing python-*client (cinderclient and keystoneclient).

In addition, the previous implementation based on semantic-version 2.6.0
returns True for "Version("3.55") == 3". It depends on the behavior
of "partial" argument of semantic_version.Version. It was not
documented and it looks tricky to depend on this behavior.
"major" and "minor" properties are now introduced and api/cinder.py
is updated accordingly. I believe this approach is clearer and stable.

Unit test coverage on dict behavior is improved.
Variable names in the unit tests are adjusted to more meaningful ones.

[1] https://python-semanticversion.readthedocs.io/en/latest/#coercing-an-arbitrary-version-string

Change-Id: If0deee9d0289ff91d58d942b9612f7736356ae18
2019-09-09 15:54:26 +09:00
..
api Fix version handling compatible with python-semanticversion 2.8 2019-09-09 15:54:26 +09:00
conf Drop cinder consistency group support 2019-05-03 18:16:23 +00:00
contrib Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
dashboards Merge "Syntax error in image detail template" 2019-08-22 20:00:30 +00:00
django_pyscss_fix Handle log message interpolation by the logger 2017-03-31 20:59:16 +09:00
enabled Drop cinder consistency group support 2019-05-03 18:16:23 +00:00
local Set log devel to DEBUG in local_settings.py.example 2019-08-06 21:04:38 +09:00
locale Imported Translations from Zanata 2019-08-28 10:19:02 +00:00
management Use the python real executable 2019-07-17 16:23:33 +02:00
static Merge "After deleting the server group, jump to the correct page" 2019-08-08 07:13:58 +00:00
templates Fix CSRF error on Images dashboard 2019-03-18 19:03:40 +02:00
templatetags Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
test Fix version handling compatible with python-semanticversion 2.8 2019-09-09 15:54:26 +09:00
themes Rework old customization templates and add new blocks 2019-01-03 17:45:29 +13:00
usage Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
utils Get rid of keys() usage 2018-11-30 11:15:27 +00:00
wsgi Create new wsgi.py file and deprecate old file 2018-05-15 01:41:01 +00:00
.eslintrc Add selective ESLint rule activation for Horizon Legacy JS 2015-07-08 17:06:15 -07:00
__init__.py
context_processors.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
defaults.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
exceptions.py Drop Heat related code from horizon 2017-12-05 07:38:55 +00:00
hooks.py pylint: fix import-error 2019-01-16 00:00:58 +09:00
karma.conf.js Makes the xstatic files lookup dynamic in the tests 2017-07-27 10:01:33 -04:00
policy.py Specify POLICY_CHECK_FUNCTION as a string 2016-11-25 13:06:14 +01:00
settings.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
theme_settings.py pylint: fix several warnings 2019-01-15 00:22:27 +09:00
urls.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
views.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
wsgi.py Fixed path after moving wsgi/django.wsgi to wsgi.py 2018-09-06 12:05:37 +02:00