<div dir="ltr">It's easy enough to add a small parser and check for the environment variables. FWIW, I think this would really streamline the user experience when using these plugins.</div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Wed, Jul 31, 2013 at 9:40 PM, Ian Booth <span dir="ltr"><<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Don't change anything yet!<br>
At this stage it's just up for discussion :-)<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu 01 Aug 2013 11:38:39 EST, Marco Ceppi wrote:<br>
> +1 from me, I'll make the change in the only plugin to reflect this. Thanks<br>
> for the heads up!<br>
><br>
><br>
> On Wed, Jul 31, 2013 at 9:34 PM, Mark Mims <<a href="mailto:mark.mims@canonical.com">mark.mims@canonical.com</a>> wrote:<br>
><br>
>> +1... ok with plugins parsimg everything they need and/or taking<br>
>> 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>
>><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<br>
>> things;<br>
>>> the main one is using -e to set the environment. However, this means<br>
>> 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>
>> "--".<br>
>>> And it's now made worse by the fact that the new simplestreams tools<br>
>> plugins<br>
>>> which ship with Juju do not require "--" since they are built on top of<br>
>> 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<br>
>> itself<br>
>>> and set JUJU_ENV and not count on it being done by Juju. Or course, if<br>
>> the<br>
>>> plugin is written in Go, it can always use the built in parsing just<br>
>> like the<br>
>>> simplestreams metadata plugin does.<br>
>>><br>
>>> Can I please have feedback from anyone who has written a Juju plugin who<br>
>> would<br>
>>> find the above change problematic? Users of plugins would just need to<br>
>> 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>
>><br>
><br>
</div></div></blockquote></div><br></div>