Merge "Use service role also in test_server_external_events"
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
diff --git a/tempest/lib/common/utils/test_utils.py b/tempest/lib/common/utils/test_utils.py
index 4cf8351..c79db15 100644
--- a/tempest/lib/common/utils/test_utils.py
+++ b/tempest/lib/common/utils/test_utils.py
@@ -93,6 +93,7 @@
if attempt >= 3:
raise
LOG.warning('Got ServerFault while running %s, retrying...', func)
+ time.sleep(1)
def call_until_true(func, duration, sleep_for, *args, **kwargs):