Merge lp:~hopem/charm-helpers/lp1572506 into lp:charm-helpers

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 569
Proposed branch: lp:~hopem/charm-helpers/lp1572506
Merge into: lp:charm-helpers
Diff against target: 38 lines (+4/-1)
2 files modified
charmhelpers/contrib/storage/linux/ceph.py (+1/-1)
tests/contrib/storage/test_linux_ceph.py (+3/-0)
To merge this branch: bzr merge lp:~hopem/charm-helpers/lp1572506
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
OpenStack Charmers Pending
Review via email: mp+292365@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/storage/linux/ceph.py'
--- charmhelpers/contrib/storage/linux/ceph.py 2016-04-15 20:41:19 +0000
+++ charmhelpers/contrib/storage/linux/ceph.py 2016-04-20 10:54:30 +0000
@@ -615,7 +615,7 @@
615 except CalledProcessError:615 except CalledProcessError:
616 return False616 return False
617617
618 return name in out618 return name in out.split()
619619
620620
621def get_osds(service):621def get_osds(service):
622622
=== modified file 'tests/contrib/storage/test_linux_ceph.py'
--- tests/contrib/storage/test_linux_ceph.py 2016-04-15 20:41:19 +0000
+++ tests/contrib/storage/test_linux_ceph.py 2016-04-20 10:54:30 +0000
@@ -16,6 +16,7 @@
16import time16import time
1717
18LS_POOLS = b"""18LS_POOLS = b"""
19.rgw.foo
19images20images
20volumes21volumes
21rbd22rbd
@@ -627,11 +628,13 @@
627 """It detects an rbd pool exists"""628 """It detects an rbd pool exists"""
628 self.check_output.return_value = LS_POOLS629 self.check_output.return_value = LS_POOLS
629 self.assertTrue(ceph_utils.pool_exists('cinder', 'volumes'))630 self.assertTrue(ceph_utils.pool_exists('cinder', 'volumes'))
631 self.assertTrue(ceph_utils.pool_exists('rgw', '.rgw.foo'))
630632
631 def test_pool_does_not_exist(self):633 def test_pool_does_not_exist(self):
632 """It detects an rbd pool exists"""634 """It detects an rbd pool exists"""
633 self.check_output.return_value = LS_POOLS635 self.check_output.return_value = LS_POOLS
634 self.assertFalse(ceph_utils.pool_exists('cinder', 'foo'))636 self.assertFalse(ceph_utils.pool_exists('cinder', 'foo'))
637 self.assertFalse(ceph_utils.pool_exists('rgw', '.rgw'))
635638
636 def test_pool_exists_error(self):639 def test_pool_exists_error(self):
637 """ Ensure subprocess errors and sandboxed with False """640 """ Ensure subprocess errors and sandboxed with False """

Subscribers

People subscribed via source and target branches