Cinder v2 API is deprecated since pike release. Along with the removal
of cinder v2 API support in cinderclient (change I335db5c1799e drops
v2 support), this commit drops cinder v2 support in horizon.
The next release of python-cinderclient drops v2 support,
so horizon needs to use v3 classes.
Includes a workaround in unit tests for two cinderclient.v3 classes
that are missing in the cinderclient releases prior to 8.0.0. The
workaround can be removed once cinderclient change I335db5c1799edb2
is merged and released.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Iab0f097fab6696462572dc6ea53767c91e5411b1
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.
pylint provides a check for this.
Let's enable 'super-with-arguments' check.
NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.
Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
This patch adds a tab for cinder user messages for volumes and
snapshots. Cinder user messages shows error details for cinder
resources like if we are unable to create a volume due to some
failure in cinder it will shows us the reason of failure.
Implements blueprint cinder-user-facing-messages
Change-Id: I6f1539ffebdf2dfd0a470009e9171e868c2a9ad3
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
Cinder consistency group has been replaced by the generic group feature.
Horizon support of the generic group (in the project dashboard) is
available since Rocky release and it covers all existing support
for consistency group in horizon.
The consistency group support is horizon was marked as deprecated
in Stein release [1].
This commit drops the consistency group support.
[1] https://review.openstack.org/#/c/626846/
Change-Id: I11187d2b03b7e0033a6c6ba3f8be25b8b5e4dd74
There are sevral similar logics to handle microversioning
in Cinder API wrapper. This commit refactors them and
introduces _cinderclient_with_features() function.
The parent commit to fix bug 1810309 does not introduce
this logic to make it easy to backport the fix.
Change-Id: I378e58c7a80e2d00481a582eb3fa449f51c3612a
Related-Bug: #1810309
To verify resource usages when updating project quotas,
project_id query parameter needs to be supported in
tenant_absolute_limits in the cinder API.
This is supported in 3.39 or later in the cinder API.
API vesions shipped with released versions (pike, queens and
rocky) are selected as verified versions.
Change-Id: If5fc190988cf173387da2b66be23db9134310692
Closes-Bug: #1810309
This commit adds cinder generic group support.
Consistency group support are not shown if the generic group
support is available.
blueprint cinder-generic-volume-groups
Change-Id: I038eeaf2508926f18b6053db0082a8aa3f3e20c6
Since Cinder API v1 is removed in I03bf2db5bd7e2fdfb4f6032758ccaf2b348a82ba
we don't need _replace_v2_parameters function anymore.
Change-Id: I18c2787241f1dcbe4c0afc14a76630d9bfb1162a
There is no need to use stub_*client() because we can simply use
mock.patch(.object). This commit removed stub_*client().
Part of blueprint mock-framework-in-unit-tests
Change-Id: I1563720e3fc636f7b042d030baf59e0b1a0e9bf0
Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
Cinder API v3 was introduced several releases ago and is backward
compatible with API v2 so it's safe to swith to use it.
Change-Id: I550e6c59bb14c17da78d7b2abcde5783b2b6825d
Closes-Bug: #1728761
This commit relocates test codes in openstack_dashboard
according to blueprint relocation-test-codes.
Change-Id: I397a5a47fe9c1bf3a498c22056d924bf409c514b