<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">+1 from me, I'll make the change in the only plugin to reflect this. Thanks for the heads up!</span><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jul 31, 2013 at 9:34 PM, Mark Mims <span dir="ltr"><<a href="mailto:mark.mims@canonical.com" target="_blank">mark.mims@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+1... ok with plugins parsimg everything they need and/or taking responsibility to pass them along to actual subcommands.<br>
<br>
-- (mobile)<br>
Mark Mims, Ph.D.<br>
Ubuntu Server Team<br>
Canonical Ltd<br>
<a href="mailto:mark.mims@canonical.com">mark.mims@canonical.com</a><br>
<a href="tel:%2B1%28512%29981-6467" value="+15129816467">+1(512)981-6467</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Jul 31, 2013, at 15:27, Ian Booth <<a href="mailto:ian.booth@canonical.com">ian.booth@canonical.com</a>> wrote:<br>
<br>
> Sending to you guys directly as well....<br>
><br>
><br>
> -------- Original Message --------<br>
> Subject: Important - proposed Juju plugin change<br>
> Date: Thu, 01 Aug 2013 11:19:16 +1000<br>
> From: Ian Booth <<a href="mailto:ian.booth@canonical.com">ian.booth@canonical.com</a>><br>
> To: <a href="mailto:juju-dev@lists.ubuntu.com">juju-dev@lists.ubuntu.com</a> <<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a>><br>
><br>
> Hi folks<br>
><br>
> Juju processes arguments used when calling a plugin, acting on common things;<br>
> the main one is using -e to set the environment. However, this means plugins<br>
> require the use of "--" to receive any additional arguments. eg<br>
><br>
> juju myplugin -e myenv -- -pluginarg<br>
><br>
> The above would set JUJU_ENV to myenv and pass -pluginarg to the plugin.<br>
><br>
> This is kinda conceptually messy for the end user, having to know to use "--".<br>
> And it's now made worse by the fact that the new simplestreams tools plugins<br>
> which ship with Juju do not require "--" since they are built on top of Juju<br>
> command infrastructure. So this works:<br>
><br>
> juju metadata validate-images -e myenv -s raring<br>
><br>
> If it were an "external" plugin, it would need to be:<br>
><br>
> juju metadata validate-images -e myenv -- -s raring<br>
><br>
> What we are proposing is to drop the "--". However, this means that:<br>
><br>
> - plugins are responsible for processing *all* of their own arguments<br>
> - common Juju arguments like "-e" are no longer automatically processed<br>
><br>
> So if a plugin is called with "-e myenv", it will need to parse the -e itself<br>
> and set JUJU_ENV and not count on it being done by Juju. Or course, if the<br>
> plugin is written in Go, it can always use the built in parsing just like the<br>
> simplestreams metadata plugin does.<br>
><br>
> Can I please have feedback from anyone who has written a Juju plugin who would<br>
> find the above change problematic? Users of plugins would just need to tweak any<br>
> scripts which call them to remove the "--".<br>
><br>
><br>
><br>
> --<br>
> Juju-dev mailing list<br>
> <a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at:<br>
> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>