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
1=== modified file 'charmhelpers/contrib/storage/linux/ceph.py'
2--- charmhelpers/contrib/storage/linux/ceph.py 2016-04-15 20:41:19 +0000
3+++ charmhelpers/contrib/storage/linux/ceph.py 2016-04-20 10:54:30 +0000
4@@ -615,7 +615,7 @@
5 except CalledProcessError:
6 return False
7
8- return name in out
9+ return name in out.split()
10
11
12 def get_osds(service):
13
14=== modified file 'tests/contrib/storage/test_linux_ceph.py'
15--- tests/contrib/storage/test_linux_ceph.py 2016-04-15 20:41:19 +0000
16+++ tests/contrib/storage/test_linux_ceph.py 2016-04-20 10:54:30 +0000
17@@ -16,6 +16,7 @@
18 import time
19
20 LS_POOLS = b"""
21+.rgw.foo
22 images
23 volumes
24 rbd
25@@ -627,11 +628,13 @@
26 """It detects an rbd pool exists"""
27 self.check_output.return_value = LS_POOLS
28 self.assertTrue(ceph_utils.pool_exists('cinder', 'volumes'))
29+ self.assertTrue(ceph_utils.pool_exists('rgw', '.rgw.foo'))
30
31 def test_pool_does_not_exist(self):
32 """It detects an rbd pool exists"""
33 self.check_output.return_value = LS_POOLS
34 self.assertFalse(ceph_utils.pool_exists('cinder', 'foo'))
35+ self.assertFalse(ceph_utils.pool_exists('rgw', '.rgw'))
36
37 def test_pool_exists_error(self):
38 """ Ensure subprocess errors and sandboxed with False """

Subscribers

People subscribed via source and target branches