Changes to TryStack endpoint for Compute API

Change-Id: I32ad8b54ade199f0d5742ab832b097dc76e5ff90
This commit is contained in:
annegentle 2012-02-14 22:58:20 -06:00
parent aef56ae791
commit ae53e96cbe
1 changed files with 14 additions and 32 deletions

View File

@ -33,9 +33,9 @@
this: </para>
<orderedlist>
<listitem><para>Begin API requests by asking for an authorization token from the endpoint your cloud
administrator gave you, typically http://hostname:5000/v2.0/tokens. You send your
administrator gave you, typically http://hostname:port/v2.0/tokens. You send your
username, password, and what group or account you are with (the "tenant" in auth-speak). </para>
<para><programlisting>curl -X 'POST' -v http://trystack.org:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}' -H 'Content-type: application/json'</programlisting></para></listitem>
<para><programlisting>curl -X 'POST' -v https://nova-api.trystack.org:5443/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}' -H 'Content-type: application/json'</programlisting></para></listitem>
<listitem><para>The server returns a response in which the 24-hours token is
contained. Use that token to send API requests
with the X-Auth-Token included as an header
@ -55,38 +55,20 @@
<para>For a typical OpenStack deployment running the Identity
Service you can request a token with this command in
cURL:<programlisting>
$ curl -X 'POST' -v http://trystack.org:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'
$ curl -X 'POST' -v https://nova-api.trystack.org:5443/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'
</programlisting></para>
<para>In return, you should get a 200 OK response with a token in the form of "id": "cd427a33-bb4a-4079-a6d7-0ae148bdeda9" and an expiration date 24 hours from now. Here's what it looks like:</para>
<para>
<programlisting>
* Connected to trystack.org (8.21.28.251) port 5000 (#0)
> POST /v2.0/tokens HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: trystack.org:5000
> Accept: */*
> Content-type: application/json
> Content-Length: 100
>
} [data not shown]
&lt; HTTP/1.1 200 OK
&lt; Content-Type: application/json; charset=UTF-8
&lt; Content-Length: 1042
&lt; Date: Wed, 08 Feb 2012 02:58:56 GMT
&lt;
{ [data not shown]
100 1142 100 1042 100 100 4772 458 --:--:-- --:--:-- --:--:-- 7834* Connection #0 to host trystack.org left intact
* Closing connection #0
{
"access": {
"serviceCatalog": [
{
"endpoints": [
{
"adminURL": "http://nova-api.trystack.org:8774/v1.1/1",
"internalURL": "http://nova-api.trystack.org:8774/v1.1/1",
"publicURL": "http://nova-api.trystack.org:8774/v1.1/1",
"adminURL": "https://nova-api.trystack.org:9774/v1.1/1",
"internalURL": "https://nova-api.trystack.org:9774/v1.1/1",
"publicURL": "https://nova-api.trystack.org:9774/v1.1/1",
"region": "RegionOne"
}
],
@ -96,9 +78,9 @@ $ curl -X 'POST' -v http://trystack.org:5000/v2.0/tokens -d '{"auth":{"passwordC
{
"endpoints": [
{
"adminURL": "http://glance.trystack.org:9292/v1.1/1",
"internalURL": "http://glance.trystack.org:9292/v1.1/1",
"publicURL": "http://glance.trystack.org:9292/v1.1/1",
"adminURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/1",
"internalURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/1",
"publicURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/1",
"region": "RegionOne"
}
],
@ -108,9 +90,9 @@ $ curl -X 'POST' -v http://trystack.org:5000/v2.0/tokens -d '{"auth":{"passwordC
{
"endpoints": [
{
"adminURL": "http://keystone.trystack.org:5001/v2.0",
"internalURL": "http://keystone.trystack.org:5000/v2.0",
"publicURL": "http://keystone.trystack.org:5000/v2.0",
"adminURL": "https://nova-api.trystack.org:5443/v2.0",
"internalURL": "https://keystone.thefreecloud.org:5000/v2.0",
"publicURL": "https://keystone.thefreecloud.org:5000/v2.0",
"region": "RegionOne"
}
],
@ -119,8 +101,8 @@ $ curl -X 'POST' -v http://trystack.org:5000/v2.0/tokens -d '{"auth":{"passwordC
}
],
"token": {
"expires": "2012-02-08T16:46:16",
"id": "e587ad13-3112-4077-96b9-7eaf299f7031",
"expires": "2012-02-15T19:32:21",
"id": "5df9d45d-d198-4222-9b4c-7a280aa35666",
"tenant": {
"id": "1",
"name": "admin"