<div dir="ltr">Hello Udi,<div><br></div><div>I don't see anything wrong in principle with your code.</div><div>This said, the main use case I had in mind when I wrote the auth providers and credentials classes was to abstract authentication for all tests, so that it is possible to configure and target identity api version to be used for authentication, and all tests will use that to obtain a token.</div>
<div><br></div><div>Identity tests are a bit different though, because when running an identity tests you typically want to specify which version of the identity API is to be used - like you did in your code.</div><div>Nonetheless you you should be able to use the same code from auth provider and credentials classes - but because identity tests have use more complex scenarios you may find issues or restrictions in the current implementation.</div>
<div>I see that your credentials do not have a tenant - even though there is a simple unit test for that case, that case is not used in any other test atm, so you may as well have hit a bug.<br></div><div><br></div><div>I think it would be helpful if you could push a WIP change - it would be easier to see what is going wrong.</div>
<div><br></div><div>andrea</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 August 2014 10:41, Udi Kalifon <span dir="ltr"><<a href="mailto:ukalifon@redhat.com" target="_blank">ukalifon@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I am writing a tempest scenario for keystone. In this scenario I create a domain, project and a user with admin rights on the project. I then try to instantiate a Manager so I can call keystone using the new user credentials:<br>
<br>
creds = KeystoneV3Credentials(username=dom1proj1admin_name, password=dom1proj1admin_name, domain_name=dom1_name, user_domain_name=dom1_name)<br>
auth_provider = KeystoneV3AuthProvider(creds)<br>
creds = auth_provider.fill_credentials()<br>
admin_client = clients.Manager(interface=self._interface, credentials=creds)<br>
<br>
The problem is that I get "unauthorized" return codes for every call I make with this client. I verified that the user is created properly and has the needed credentials, by manually authenticating and getting a token with his credentials and then using that token. Apparently, in my code I don't create the creds properly or I'm missing another step. How can I use the new user in tempest properly?<br>
<br>
Thanks in advance,<br>
Udi Kalifon.<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div>