In Django 3.0, django.utils.http.urlquote(), urlquote_plus(),
urlunquote(), and urlunquote_plus() are deprecated in favor of
the functions that they’re aliases for: urllib.parse.quote(),
quote_plus(), unquote(), and unquote_plus().
https: //docs.djangoproject.com/en/4.0/releases/3.0/
Change-Id: I37fcd917cbf87b4d3141cfbdd2675aa38f33f2a4
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
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
Now, we give the init status of the volume when resetting status.
The first glance is the current status, instead of "Select an
new status", and we could do nothing with the status will confuse user.
The same with snapshot.
According to the above situation and Akihiro's suggestion:
- Use "Select on new status" as the default label
- List all possible values for status *including the current status*
- Add "(current)" to the current value in the dropdown list
Change-Id: I61e642e2fd8ddd7498911272678e57b60b60a3b8
Closes-Bug: #1803475
mox_**** was used to store test data.
It is confusing and meaningless.
This commit fixes the usage.
Related to blueprint mock-framework-in-unit-tests
Change-Id: I35a13020962999c3f5b550208e6f0b82bf1648b6
(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
If click the name link and go into the details page for the snapshot,
the snapshot object lose the property of volume. It will be thrown an
exception in the console.
AttributeError: 'VolumeSnapshot' object has no attribute '_volume'
Change-Id: I365992a9f784af293f40d74e0f80828d9a7e699b
Closes-Bug: #1695719
The value of Status dropdown on Admin > Volume > Volumes > Update Volume
Status and Admin > Volume > Snapshots > Update Status forms were initially
set with the raw data instead of the localized version of the value. This
fix changes the initial value to the localized version and also updates
localized statuses to use values from
project.volumes.tables.VolumesTableBase.STATUS_DISPLAY_CHOICES.
Closes-Bug: #1626343
Change-Id: I1ac58e2eb7b4a8d4894280285a824d280fafd531
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