From 7c6a5509b0e48badaec57fc6c7903720375fdc72 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Fri, 4 Sep 2015 12:44:40 -0400 Subject: [PATCH] Fix lxd-relation-joined --- hooks/lxd_hooks.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hooks/lxd_hooks.py b/hooks/lxd_hooks.py index 6fb110c..3d1ea30 100755 --- a/hooks/lxd_hooks.py +++ b/hooks/lxd_hooks.py @@ -36,10 +36,14 @@ def install(): @hooks.hook('lxd-relation-joined') def relation_joined(rid=None): + settings = {} + + settings['lxd_password'] = config('lxd-trust-password') + settings['lxd_hostname'] = unit_get('private-address') + settings['lxd_address'] = gethostname() + relation_set(relation_id=rid, - lxd_hostname=unit_get('private-address'), - lxd_address=gethostname(), - lxd_password=config('lxd-trust-password')) + relation_settings=settings) def main(): try: