Merge lp:~hazmat/juju-deployer/use-solo-named-config into lp:juju-deployer

Proposed by Kapil Thangavelu
Status: Merged
Approved by: Adam Gandelman
Approved revision: 77
Merged at revision: 77
Proposed branch: lp:~hazmat/juju-deployer/use-solo-named-config
Merge into: lp:juju-deployer
Diff against target: 22 lines (+9/-4)
1 file modified
deployer/cli.py (+9/-4)
To merge this branch: bzr merge lp:~hazmat/juju-deployer/use-solo-named-config
Reviewer Review Type Date Requested Status
juju-deployers Pending
Review via email: mp+192014@code.launchpad.net

Description of the change

Allow usage of deployer configs without a named deployment if theres only one. Simplifies common case around juju-gui environment exports.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'deployer/cli.py'
--- deployer/cli.py 2013-09-11 18:08:41 +0000
+++ deployer/cli.py 2013-10-21 16:17:27 +0000
@@ -188,10 +188,15 @@
188188
189 # Do something to a deployment189 # Do something to a deployment
190 if not options.deployment:190 if not options.deployment:
191 log.error(191 # If there's only one option then use it.
192 "Deployment name must be specified. available: %s", tuple(192 if len(config.key()) == 1:
193 sorted(config.keys())))193 options.deployment = config.keys()[0]
194 sys.exit(1)194 log.info("Using deployment %s", options.deployment)
195 else:
196 log.error(
197 "Deployment name must be specified. available: %s",
198 tuple(sorted(config.keys())))
199 sys.exit(1)
195200
196 deployment = config.get(options.deployment)201 deployment = config.get(options.deployment)
197202

Subscribers

People subscribed via source and target branches