Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ObjectRetrierWraps for cinder/nova clients in cinder tests #1170

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions zaza/openstack/charm_tests/cinder/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import zaza.openstack.configure.guest as guest
import zaza.openstack.charm_tests.nova.utils as nova_utils
import zaza.openstack.charm_tests.tempest.tests as tempest_tests
from zaza.openstack.utilities import ObjectRetrierWraps

from tenacity import (
Retrying,
Expand All @@ -48,10 +49,14 @@ def setUpClass(cls):
cls.lead_unit = zaza.model.get_lead_unit_name(
"cinder", model_name=cls.model_name)
# version 3.42 is required for in-use (online) resizing lvm volumes
cls.cinder_client = openstack_utils.get_cinder_session_client(
cls.keystone_session, version=3.42)
cls.nova_client = openstack_utils.get_nova_session_client(
cls.keystone_session)
# Add retries to cinder and nova to allow for async restart issues and
# services becoming ready between configuration and individual tests.
cls.cinder_client = ObjectRetrierWraps(
openstack_utils.get_cinder_session_client(
cls.keystone_session, version=3.42))
cls.nova_client = ObjectRetrierWraps(
openstack_utils.get_nova_session_client(
cls.keystone_session))

@classmethod
def tearDown(cls):
Expand Down
6 changes: 4 additions & 2 deletions zaza/openstack/charm_tests/cinder_backup/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import zaza.openstack.charm_tests.test_utils as test_utils
import zaza.openstack.utilities.ceph as ceph_utils
import zaza.openstack.utilities.openstack as openstack_utils
from zaza.openstack.utilities import ObjectRetrierWraps


class CinderBackupTest(test_utils.OpenStackBaseTest):
Expand All @@ -35,8 +36,9 @@ class CinderBackupTest(test_utils.OpenStackBaseTest):
def setUpClass(cls):
"""Run class setup for running Cinder Backup tests."""
super(CinderBackupTest, cls).setUpClass()
cls.cinder_client = openstack_utils.get_cinder_session_client(
cls.keystone_session)
cls.cinder_client = ObjectRetrierWraps(
openstack_utils.get_cinder_session_client(
cls.keystone_session))

@property
def services(self):
Expand Down
Loading