openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #10296
Re: curl command
On Fri, Apr 20, 2012 at 12:11 AM, andrei cosmin <andrei_tall@xxxxxxxxx> wrote:
> curl -d '{"auth": {"tenantName": "openstackDemo",
> "passwordCredentials":{"username": "adminUser", "password": "secretword"}}}'
> -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens
> | python -mjson.tool
>
> i get the following error:
>
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
> 0curl: (7) couldn't connect to host
^^^^^^^^^^^^^^^^^^^^^^
This is the key bit, it looks like keystone may not be running?
> i used my ip and the rest i leaved as it is. Where do i find my tenantName
> and password credentials? What can be the problem?
By default devstack creates an 'admin' user and a 'demo' user, both
with the password of the value you set in $ADMIN_PASSWORD. There is a
matching tenant name for both accounts.
It may be easier to use the keystone command rather than curl to get
your token info. The equivalent command is:
keystone --os_tenant_name=openstackDemo --os_username=openstackDemo
--os_password=secretword
--os_auth_url=http://192.168.206.130:35357/v2.0/tokens token-get
And even better, the glance command also understands the --os_*
options for authentication so you do not necessarily need to get a
token first.
dt
--
Dean Troyer
dtroyer@xxxxxxxxx
References