Skip to content

Commit

Permalink
PEP8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmlg committed Jan 2, 2024
1 parent f61ccd4 commit 9a8b765
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions zaza/openstack/charm_tests/ceph/rbd_mirror/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ def create_volume(cinder, volume_params, retry=20):


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',
Expand Down Expand Up @@ -191,6 +192,7 @@ def setUpClass(cls):
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)
Expand Down Expand Up @@ -244,7 +246,8 @@ def get_failover_pools(self):
"""
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)

Expand Down Expand Up @@ -798,8 +801,8 @@ def test_100_forced_juju_failover(self):
})
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.
Expand Down

0 comments on commit 9a8b765

Please sign in to comment.