Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenStack: Dev

curl command

 

 

OpenStack dev RSS feed   Index | Next | Previous | View Threaded


andrei_tall at yahoo

Apr 19, 2012, 10:11 PM

Post #1 of 3 (187 views)
Permalink
curl command

Hi!

A have made a devstack instalation of openstack, and now i am trying to deploy new images but curl command doesn't work.

when i give ths command :

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
No JSON object could be decoded

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?
Thanks.


Andrei-Cosmin Ion
telefon: 0727 768 281
email: andrei_tall [at] yahoo
Munceste ca si cum n-ai muri niciodata, dar ingrijeste-te de sufletul tau ca si cum ai muri maine!


harlowja at yahoo-inc

Apr 19, 2012, 10:22 PM

Post #2 of 3 (178 views)
Permalink
Re: curl command [In reply to]

I've made a devstackPY tool that helps with this:

https://github.com/yahoo/Openstack-DevstackPy/blob/master/tools/upload-img.py

It will figure out how to extract the image archive (if any), upload it to glance...

On 4/19/12 10:11 PM, "andrei cosmin" <andrei_tall [at] yahoo> wrote:

Hi!

A have made a devstack instalation of openstack, and now i am trying to deploy new images but curl command doesn't work.

when i give ths command :
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
No JSON object could be decoded

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?
Thanks.

Andrei-Cosmin Ion
telefon: 0727 768 281
email: andrei_tall [at] yahoo
Munceste ca si cum n-ai muri niciodata, dar ingrijeste-te de sufletul tau ca si cum ai muri maine!


dtroyer at gmail

Apr 19, 2012, 11:12 PM

Post #3 of 3 (187 views)
Permalink
Re: curl command [In reply to]

On Fri, Apr 20, 2012 at 12:11 AM, andrei cosmin <andrei_tall [at] yahoo> 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 [at] gmail

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack [at] lists
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp

OpenStack dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.