Merge lp:~therve/landscape-client/juju-env-info-2 into lp:~landscape/landscape-client/trunk
Proposed by
Thomas Herve
Status: | Merged |
---|---|
Merged at revision: | 609 |
Proposed branch: | lp:~therve/landscape-client/juju-env-info-2 |
Merge into: | lp:~landscape/landscape-client/trunk |
Diff against target: |
112 lines (+64/-2) 3 files modified
landscape/message_schemas.py (+5/-2) landscape/monitor/computerinfo.py (+19/-0) landscape/monitor/tests/test_computerinfo.py (+40/-0) |
To merge this branch: | bzr merge lp:~therve/landscape-client/juju-env-info-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Donato (community) | Approve | ||
Chris Glass (community) | Approve | ||
Review via email:
|
Description of the change
Here's another try: making it part of a plugin instead of registration means that the data will be used *after* the computer is registered, instead during registration where I may not have a computer yet. I'll write the server branch right away to make sure it's better.
To post a comment you must log in.
Nice! +1
[nitpick] json.dumps( {"JUJU_ ENV_UUID" : "uuid1",
+ fd = open(juju_info, "w")
+ fd.write(
+ "JUJU_UNIT_NAME": "unit/0"}))
+ fd.close()
Would probably benefit from a context instead, just in case:
with open(juju_info, "w") as fd: write(juju. dumps({ ...}))
fd.
But yeah, nitpick, feel free to ignore.