Fixes for compat with juju-core

This commit is contained in:
James Page
2013-08-13 13:55:50 +01:00
parent 30423a488f
commit 2cc1af52e7
3 changed files with 5 additions and 5 deletions

View File

@@ -240,6 +240,8 @@ def identity_changed(relation_id=None, remote_unit=None):
ca_bundle = ca.get_ca_bundle()
relation_data['https_keystone'] = 'True'
relation_data['ca_cert'] = b64encode(ca_bundle)
if relation_id:
relation_data['rid'] = relation_id
utils.relation_set(**relation_data)
return

View File

@@ -206,11 +206,9 @@ def relation_get_dict(relation_id=None, remote_unit=None):
cmd.append('-r')
cmd.append(relation_id)
if remote_unit:
remote_unit_orig = os.getenv('JUJU_REMOTE_UNIT', None)
os.environ['JUJU_REMOTE_UNIT'] = remote_unit
cmd.append('-')
cmd.append(remote_unit)
j = subprocess.check_output(cmd)
if remote_unit and remote_unit_orig:
os.environ['JUJU_REMOTE_UNIT'] = remote_unit_orig
d = json.loads(j)
settings = {}
# convert unicode to strings

View File

@@ -1 +1 @@
221
223