Merge lp:~james-page/charms/precise/keystone/juju-core-fixes into lp:~charmers/charms/precise/keystone/trunk

Proposed by James Page
Status: Merged
Merged at revision: 43
Proposed branch: lp:~james-page/charms/precise/keystone/juju-core-fixes
Merge into: lp:~charmers/charms/precise/keystone/trunk
Diff against target: 37 lines (+5/-5)
3 files modified
hooks/keystone_hooks.py (+2/-0)
hooks/lib/utils.py (+2/-4)
revision (+1/-1)
To merge this branch: bzr merge lp:~james-page/charms/precise/keystone/juju-core-fixes
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+179920@code.launchpad.net

Description of the change

Fixes for compatibility with juju-core.

These will be superceeded when keystone get charm-helpers'ed

To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/keystone_hooks.py'
2--- hooks/keystone_hooks.py 2013-05-22 10:28:56 +0000
3+++ hooks/keystone_hooks.py 2013-08-13 12:57:06 +0000
4@@ -240,6 +240,8 @@
5 ca_bundle = ca.get_ca_bundle()
6 relation_data['https_keystone'] = 'True'
7 relation_data['ca_cert'] = b64encode(ca_bundle)
8+ if relation_id:
9+ relation_data['rid'] = relation_id
10 utils.relation_set(**relation_data)
11 return
12
13
14=== modified file 'hooks/lib/utils.py'
15--- hooks/lib/utils.py 2013-03-21 18:28:05 +0000
16+++ hooks/lib/utils.py 2013-08-13 12:57:06 +0000
17@@ -206,11 +206,9 @@
18 cmd.append('-r')
19 cmd.append(relation_id)
20 if remote_unit:
21- remote_unit_orig = os.getenv('JUJU_REMOTE_UNIT', None)
22- os.environ['JUJU_REMOTE_UNIT'] = remote_unit
23+ cmd.append('-')
24+ cmd.append(remote_unit)
25 j = subprocess.check_output(cmd)
26- if remote_unit and remote_unit_orig:
27- os.environ['JUJU_REMOTE_UNIT'] = remote_unit_orig
28 d = json.loads(j)
29 settings = {}
30 # convert unicode to strings
31
32=== modified file 'revision'
33--- revision 2013-05-22 10:28:56 +0000
34+++ revision 2013-08-13 12:57:06 +0000
35@@ -1,1 +1,1 @@
36-221
37+223

Subscribers

People subscribed via source and target branches

to all changes: