From 9a8b7650a05959708fc7c0503ff0ce55992932f3 Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Tue, 2 Jan 2024 19:35:13 -0300 Subject: [PATCH] PEP8 changes --- zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py index 132d976..bb9918f 100644 --- a/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py +++ b/zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py @@ -156,14 +156,15 @@ def create_cinder_volume(cinder, name='zaza', image_id=None, type_id=None): def setup_rbd_mirror(): - """Setup an RBD pool in case Cinder isn't present.""" + """Set up an RBD pool in case Cinder isn't present.""" zaza.model.run_action_on_leader( 'ceph-mon', 'create-pool', action_params={ 'name': 'zaza-boot', 'app-name': 'rbd', - }) + } + ) zaza.model.run_action_on_leader( 'ceph-rbd-mirror', 'refresh-pools', @@ -191,6 +192,7 @@ class CephRBDMirrorBase(test_utils.BaseCharmTest): cls.with_cinder = False def check_cinder_present(self, caller): + """Skip a test if Cinder isn't present.""" if not self.with_cinder: raise unittest.SkipTest('Skipping %s due to lack of Cinder' % caller) @@ -244,7 +246,8 @@ class CephRBDMirrorBase(test_utils.BaseCharmTest): """ site_a_pools, site_b_pools = self.get_pools() if (self.with_cinder and - get_cinder_rbd_mirroring_mode(self.cinder_ceph_app_name) == 'image'): + get_cinder_rbd_mirroring_mode(self.cinder_ceph_app_name) == + 'image'): site_a_pools.remove(self.cinder_ceph_app_name) site_b_pools.remove(self.cinder_ceph_app_name) @@ -798,8 +801,8 @@ class CephRBDMirrorDisasterFailoverTest(CephRBDMirrorBase): }) self.assertEqual(int(result.results['Code']), 0) - # The action may not show up as 'failed' if there are no pools that needed - # to be promoted. + # The action may not show up as 'failed' if there are no pools that + # needed to be promoted. # self.assertEqual(result.status, 'failed') # Retry to promote site-b using the 'force' Juju action parameter.