Another helpful article about your question :-)

http://www.ibm.com/developerworks/cloud/library/cl-openstack-pythonapis/index.html


2014-03-11 17:15 GMT+08:00 Dmitry Mescheryakov <[email protected]>:

> Hello Nader,
>
> You should use python-keystoneclient [1] to obtain the token. You can
> find example usage in helper script [2].
>
> Dmitry
>
> [1] https://github.com/openstack/python-keystoneclient
> [2]
> https://github.com/openstack/savanna/blob/master/tools/get_auth_token.py#L74
>
>
>
> 2014-03-10 21:25 GMT+04:00 Nader Lahouti <[email protected]>:
> > Hi All,
> >
> >
> > I have a question regarding using novaclient API.
> >
> >
> > I need to use it for getting a list of instances for an user/project.
> >
> > In oder to do that I tried to use :
> >
> >
> > from novaclient.v1_1 import client
> >
> > nc = client.Client(username,token_id, project_id,
> auth_url,insecure,cacert)
> >
> > nc.servers.list()
> >
> >
> > ( however, the comment on the code/document says different thing which as
> > far as tried it didn't work.
> >
> >>>> client = Client(USERNAME, PASSWORD, PROJECT_ID, AUTH_URL)
> >
> >
> > so it seems token_id has to be provided.
> >
> > I can get the token_id using keystone REST API
> > (http://localhost:5000/v2.0/tokens ...-d ' the credentials ...username and
> > password'.
> >
> > And my question is: how to get credentials for an user in the code when
> > using the keystone's REST API? Is there any api to get such an info?
> >
> >
> > Appreciate your comments.
> >
> >
> > Regards,
> >
> > Nader.
> >
> >
> >
> > _______________________________________________
> > OpenStack-dev mailing list
> > [email protected]
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> _______________________________________________
> OpenStack-dev mailing list
> [email protected]
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
ChangBo Guo(gcb)
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to