Hi Dean,<div>This is true only if that particular command line option is used - so in that case it makes sense,  but this issue arose because I (possibly inadvertently, but as an admin setting up accounts and testing accounts this is feasible so one would argue if this is an edge case) had SERVICE_TOKEN set which meant that --username --password  were ignored: The issue in this case is that if SERVICE_ENDPOINT and SERVICE_TOKEN is used, it overrides anyone wanting to use --username --password, for example.</div>
<div><br></div><div>This make sense:</div><div><br></div><div><div>parser.add_argument('--token',</div><div>            default=env('SERVICE_TOKEN'),</div><div>            help='Defaults to env[SERVICE_TOKEN]')</div>
<div><br></div><div>        parser.add_argument('--endpoint',</div><div>            default=env('SERVICE_ENDPOINT'),</div><div>            help='Defaults to env[SERVICE_ENDPOINT]')</div><div><br></div>
<div>But not if I chose to use</div><div><br></div><div><div>        parser.add_argument('--username',</div><div>            default=env('OS_USERNAME'),</div><div>            help='Defaults to env[OS_USERNAME]')</div>
</div><div><br></div>it doesn't affect the user's journey path as it is only interested in a valid token - not my options.</div><div>I can see a rationale for this - if you have a token already, then why authenticate.  But because I specifically asked for authentication on the command line by specifying a --username and --password it should use these instead?<br>
</div><div><br></div><div>Regards,</div><div><br></div><div>Kev</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On 11 March 2012 22:58, Dean Troyer <span dir="ltr"><<a href="mailto:dtroyer@gmail.com">dtroyer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Mar 11, 2012 at 2:35 PM, Kevin Jackson<br>
<<a href="mailto:kevin@linuxservices.co.uk">kevin@linuxservices.co.uk</a>> wrote:<br>
> Thanks Adam for clarifying the position of the ENVVARS: SERVICE_ENDPOINT and<br>
> SERVICE_TOKEN.<br>
> There are a couple of issues I have with this though:<br>
><br>
> 1) It's not clear that these are strictly over-riding envvars.<br>
<br>
</div>Actually, the environment variables (if set) are used for the default<br>
value of the command-line options, so the command-line option do in<br>
fact override the environment variables.<br>
<br>
<a href="https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/shell.py#L97" target="_blank">https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/shell.py#L97</a><br>
<span class="HOEnZb"><font color="#888888"><br>
dt<br>
<br>
--<br>
<br>
Dean Troyer<br>
<a href="mailto:dtroyer@gmail.com">dtroyer@gmail.com</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Kevin Jackson<br>@itarchitectkev<br>
</div>