Merge lp:~bjornt/charms/precise/landscape-client/fix-computer-title into lp:~charmers/charms/precise/landscape-client/trunk

Proposed by Björn Tillenius
Status: Merged
Merged at revision: 15
Proposed branch: lp:~bjornt/charms/precise/landscape-client/fix-computer-title
Merge into: lp:~charmers/charms/precise/landscape-client/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/config-changed (+1/-1)
To merge this branch: bzr merge lp:~bjornt/charms/precise/landscape-client/fix-computer-title
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+143832@code.launchpad.net

Description of the change

Don't try to use the remote unit name as computer title, since it's not
available in the config-changed hook.

When David prepared the official landscape-client charm he merged in my
branch that wasn't working yet. This change reverts that merge.

To post a comment you must log in.
Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2013-01-16 13:57:13 +0000
+++ hooks/config-changed 2013-01-18 06:59:56 +0000
@@ -17,7 +17,7 @@
17configs = json.loads(check_output(["config-get", "--format=json"]))17configs = json.loads(check_output(["config-get", "--format=json"]))
18if configs and not configured:18if configs and not configured:
19 if not configs.get("computer-title"):19 if not configs.get("computer-title"):
20 configs["computer-title"] = os.environ["JUJU_REMOTE_UNIT"]20 configs["computer-title"] = os.environ["JUJU_UNIT_NAME"]
21 options = ["--%s=%s" % (key, value) for key, value in configs.items()]21 options = ["--%s=%s" % (key, value) for key, value in configs.items()]
2222
23 args = ["landscape-config", "--silent"]23 args = ["landscape-config", "--silent"]

Subscribers

People subscribed via source and target branches