Commit Graph

10 Commits

Author SHA1 Message Date
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
2021-02-12 13:05:27 -06:00
Ivan Kolodyazhny 14e779bbac Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I2de669d8e89b8daeb7ee5405ffab35af6307c40b
2020-03-26 19:45:37 +02:00
Ivan Kolodyazhny e976461d85 Remove six usage from horizon package
We don't support Python 2 anymore so we don't need this
compatibility library.

six.reraise usages are left as is until it'll be moved to some
base lib like oslo.utils to not re-implenent this method in
Horizon.

This patch also removes Python2-specific base test case methods
assertItemsEqual and assertNotRegexpMatches in flavor of new
Python 3 analogues.

Change-Id: I0b567382edf4d68674a7b8d0b02333fb57293958
2020-01-15 12:36:11 +02:00
zhubx007 633897ae54 fix bug of fail to create volume type encryption from dashboard
Due to the commit https://review.openstack.org/#/c/573093/,
the body of create and update from dashboard for volume
type encryption does not match the schemas of it's API.

The schemas url is https://github.com/openstack/cinder/blob
/master/cinder/api/schemas/volume_type_encryption.py

So that, pop the volume_type_id and name from the data to
match the schemas.

Change-Id: I032e59251a0d54cd09ead8cf3b0ac2527d9261db
Closes-Bug: #1783467
2018-08-08 07:48:46 +09:00
Akihiro Motoki 4928df71ae Convert admin volume_types tests into mock
admin/volume_types/extras/tests.py
admin/volume_types/qos_specs/tests.py
admin/volume_types/tests.py

blueprint mock-framework-in-unit-tests
Change-Id: Ia05bb23732e34583abc23a94f2c88ace250e5697
2018-03-05 06:32:27 +09:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
Jenkins 98ac7666a0 Merge "Support editing volume type access" 2017-05-05 20:23:59 +00:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
liyingjun 87dbc2f9ff Support editing volume type access
Cinder v2 support add or remove volume type access for the given
project since Kilo [1]. This patch add this feature to horizon.
At least cinderclient 1.2.0 is required to support volume type
access extension.

[1]:
https://specs.openstack.org/openstack/cinder-specs/specs/kilo/private-volume-types.html

Implements blueprint: volume-type-access

Change-Id: I323d47ab2aed13305b609e27f8f959f40988537d
2017-03-14 12:58:31 +08:00
Richard Jones a22bba4af9 Move Volume Types out of tabbed panel
Change-Id: Ie8ddc78a6638e02b673582b081a67f05ec0a2a0a
Implements: blueprint reorganise-volumes
2017-03-09 14:30:56 +11:00