Merge lp:~jimbaker/pyjuju/juju-get-cli-use-yaml-null into lp:pyjuju

Proposed by Jim Baker
Status: Merged
Approved by: Jim Baker
Approved revision: 577
Merged at revision: 577
Proposed branch: lp:~jimbaker/pyjuju/juju-get-cli-use-yaml-null
Merge into: lp:pyjuju
Diff against target: 25 lines (+2/-2)
2 files modified
juju/control/config_get.py (+1/-1)
juju/control/tests/test_config_get.py (+1/-1)
To merge this branch: bzr merge lp:~jimbaker/pyjuju/juju-get-cli-use-yaml-null
Reviewer Review Type Date Requested Status
Clint Byrum (community) Approve
Review via email: mp+124281@code.launchpad.net

Description of the change

juju get should use standard YAML for null value

The juju get command for retrieving config settings currently uses a custom value of -Not set- to imply None (Python)/nil (golang), instead of just using YAML's support for a null value. This bug means that it's not possible to distinguish a user setting of this string of -Not set-, which prevents roundtripping on that specific value.

To post a comment you must log in.
Revision history for this message
Jim Baker (jimbaker) wrote :

Please take a look.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

LGTM. This is only doable for trunk, not backportable.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'juju/control/config_get.py'
2--- juju/control/config_get.py 2012-06-22 19:08:23 +0000
3+++ juju/control/config_get.py 2012-09-13 18:48:20 +0000
4@@ -82,7 +82,7 @@
5 if k in settings:
6 v['value'] = settings[k]
7 else:
8- v['value'] = "-Not set-"
9+ v['value'] = None
10
11 if 'default' in v:
12 if v['default'] == settings[k]:
13
14=== modified file 'juju/control/tests/test_config_get.py'
15--- juju/control/tests/test_config_get.py 2012-05-04 22:43:40 +0000
16+++ juju/control/tests/test_config_get.py 2012-09-13 18:48:20 +0000
17@@ -68,7 +68,7 @@
18 'outlook': {
19 'description': 'No default outlook.',
20 'type': 'string',
21- 'value': '-Not set-'},
22+ 'value': None},
23 'skill-level': {
24 'description': 'A number indicating skill.',
25 'value': 24,

Subscribers

People subscribed via source and target branches

to status/vote changes: