Merge lp:~hopem/charm-helpers/lp1517892.2 into lp:charm-helpers

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 484
Proposed branch: lp:~hopem/charm-helpers/lp1517892.2
Merge into: lp:charm-helpers
Diff against target: 47 lines (+5/-5)
1 file modified
charmhelpers/contrib/storage/linux/ceph.py (+5/-5)
To merge this branch: bzr merge lp:~hopem/charm-helpers/lp1517892.2
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+277992@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

LGTM, 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 2015-11-19 13:30:09 +0000
3+++ charmhelpers/contrib/storage/linux/ceph.py 2015-11-19 13:45:58 +0000
4@@ -570,14 +570,14 @@
5 return requests
6
7
8-def is_request_sent(request):
9+def is_request_sent(request, relation='ceph'):
10 """Check to see if a functionally equivalent request has already been sent
11
12 Returns True if a similair request has been sent
13
14 @param request: A CephBrokerRq object
15 """
16- states = get_request_states(request)
17+ states = get_request_states(request, relation=relation)
18 for rid in states.keys():
19 if not states[rid]['sent']:
20 return False
21@@ -585,7 +585,7 @@
22 return True
23
24
25-def is_request_complete(request):
26+def is_request_complete(request, relation='ceph'):
27 """Check to see if a functionally equivalent request has already been
28 completed
29
30@@ -593,7 +593,7 @@
31
32 @param request: A CephBrokerRq object
33 """
34- states = get_request_states(request)
35+ states = get_request_states(request, relation=relation)
36 for rid in states.keys():
37 if not states[rid]['complete']:
38 return False
39@@ -648,7 +648,7 @@
40
41 @param request: A CephBrokerRq object
42 """
43- if is_request_sent(request):
44+ if is_request_sent(request, relation=relation):
45 log('Request already sent but not complete, not sending new request',
46 level=DEBUG)
47 else:

Subscribers

People subscribed via source and target branches