Merge lp:~mariosplivalo/juju-deployer/juju-deployer into lp:juju-deployer

Proposed by Mario Splivalo
Status: Merged
Merge reported by: Kapil Thangavelu
Merged at revision: not available
Proposed branch: lp:~mariosplivalo/juju-deployer/juju-deployer
Merge into: lp:juju-deployer
Diff against target: 12 lines (+1/-1)
1 file modified
deployer/cli.py (+1/-1)
To merge this branch: bzr merge lp:~mariosplivalo/juju-deployer/juju-deployer
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Needs Fixing
Review via email: mp+221457@code.launchpad.net

Description of the change

--local-mods was enabled by default and there was no way to disable it. Based on the name of the option, it should be disabled by default, and enabled only when --local-mods option is present on the commandline.

To post a comment you must log in.
117. By Mario Splivalo

The logic was fine, just the help text was wrong :/

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

The original option is semantically confusing, if you pass --local-mods it should means: enable local modifications and it should be True by default, also the destination variable should be called dest="local_mods" for reflecting this.

Mario, Does that makes sense for you? If does, please modify the code accordingly.

review: Needs Fixing
118. By Mario Splivalo

Changed the name of the option to avoid confusion

119. By Mario Splivalo

Reverted option name to --local-mods, otherwise backwards compatibility might be broken

Revision history for this message
Mario Splivalo (mariosplivalo) wrote :

> The original option is semantically confusing, if you pass --local-mods it
> should means: enable local modifications and it should be True by default,
> also the destination variable should be called dest="local_mods" for
> reflecting this.
>
> Mario, Does that makes sense for you? If does, please modify the code
> accordingly.

Actually, the code is ok, just the help text is missleading. The default is for the deployer not to allow local charm modifications. If you, however, add --local-mods option, it will allow local charm modifications.
Therefore, the help text should read like this:

 -L, --local-mods Allow deployment of locally-modified charms

I've pushed the changes and created merge request.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

thanks.

On Fri, May 30, 2014 at 10:12 AM, Mario Splivalo <
<email address hidden>> wrote:

> > The original option is semantically confusing, if you pass --local-mods
> it
> > should means: enable local modifications and it should be True by
> default,
> > also the destination variable should be called dest="local_mods" for
> > reflecting this.
> >
> > Mario, Does that makes sense for you? If does, please modify the code
> > accordingly.
>
> Actually, the code is ok, just the help text is missleading. The default
> is for the deployer not to allow local charm modifications. If you,
> however, add --local-mods option, it will allow local charm modifications.
> Therefore, the help text should read like this:
>
> -L, --local-mods Allow deployment of locally-modified charms
>
>
> I've pushed the changes and created merge request.
> --
>
> https://code.launchpad.net/~mariosplivalo/juju-deployer/juju-deployer/+merge/221457
> Your team juju-deployers is subscribed to branch lp:juju-deployer.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deployer/cli.py'
2--- deployer/cli.py 2014-02-22 23:11:02 +0000
3+++ deployer/cli.py 2014-05-30 14:05:01 +0000
4@@ -34,7 +34,7 @@
5 action="store_true", default=False)
6 parser.add_argument(
7 '-L', '--local-mods',
8- help='Disallow deployment of locally-modified charms',
9+ help='Allow deployment of locally-modified charms',
10 dest="no_local_mods", default=True, action='store_false')
11 parser.add_argument(
12 '-u', '--update-charms',

Subscribers

People subscribed via source and target branches