Merge lp://staging/~andrewjbeach/juju-ci-tools/get-juju-dict into lp://staging/juju-ci-tools

Proposed by Andrew James Beach
Status: Needs review
Proposed branch: lp://staging/~andrewjbeach/juju-ci-tools/get-juju-dict
Merge into: lp://staging/juju-ci-tools
Diff against target: 47 lines (+26/-0)
2 files modified
jujupy.py (+10/-0)
tests/test_jujupy.py (+16/-0)
To merge this branch: bzr merge lp://staging/~andrewjbeach/juju-ci-tools/get-juju-dict
Reviewer Review Type Date Requested Status
Juju Release Engineering Pending
Review via email: mp+307191@code.staging.launchpad.net

Description of the change

Added an method to EnvJujuClient, get_juju_dict. It is a thin operation, but
it wraps up get_juju_output with a yaml.safe_load. This pair of operations
(and adding '--format' 'yaml' to the arguments list) comes up in a number of
other methods as well as the general code base. Commonly enough it should be
worth wrapping up the idiom. It may also cut out some import yaml calls.

Added get_juju_dict to EnvJujuClient in jujupy.py.
Added test_get_juju_dict to TestJujuClient in test_jujupy.py.

To post a comment you must log in.

Unmerged revisions

1624. By Andrew James Beach

Added EnvJujuClient.get_juju_dict, which wraps the common get_juju_output and then parse to dict operation.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches