Use service role also in test_assisted_volume_snapshots
Assisted volume snapshots API is service-to-service API
and nova is changing its default permission to 'service'
role
- https://review.opendev.org/c/openstack/nova/+/892635
To pass test on new defaults as well as old defaults
testing jobs, we need to use service role also in
the Tempest creds. Once nova change is merged then we
can use only service role to access this API.
Needed-By: https://review.opendev.org/c/openstack/nova/+/892635
Change-Id: I2c4368b8e2378842919fd16fa6f07505605f283a
diff --git a/tempest/api/compute/admin/test_assisted_volume_snapshots.py b/tempest/api/compute/admin/test_assisted_volume_snapshots.py
index 5e30444..b7be796 100644
--- a/tempest/api/compute/admin/test_assisted_volume_snapshots.py
+++ b/tempest/api/compute/admin/test_assisted_volume_snapshots.py
@@ -26,6 +26,13 @@
create_default_network = True
+ # TODO(gmann): Remove the admin access to service user
+ # once nova change the default of this API to service
+ # role. To merge the nova changing the policy default
+ # we need to use token with admin as well as service
+ # role and later we can use only service token.
+ credentials = ['primary', 'admin', ['service_user', 'admin', 'service']]
+
@classmethod
def skip_checks(cls):
super(VolumesAssistedSnapshotsTest, cls).skip_checks()
@@ -37,7 +44,7 @@
def setup_clients(cls):
super(VolumesAssistedSnapshotsTest, cls).setup_clients()
cls.assisted_v_client = (
- cls.os_admin.assisted_volume_snapshots_client)
+ cls.os_service_user.assisted_volume_snapshots_client)
cls.volumes_client = cls.os_admin.volumes_client_latest
cls.servers_client = cls.os_admin.servers_client