Documentation - API QuickStart tenant_id unclear

Bug #1392948 reported by N Dillon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Anne Gentle

Bug Description

The API QuickStart documentation currently states:

>Use the Identity API to request a list of endpoints, as follows:
>
>$ curl -i -X GET http://166.78.21.23:35357/v2.0/endpoints -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: token"

And the next example is

>Use the Compute API to list servers, as follows:
>
>$ curl -v -H "X-Auth-Token:token" http://208.123.85.197:8774/v2/tenant_id/servers

1) There could be better consistency between commands (the -H X-Auth-Token options both being in the same place, one command uses -i, the other -v, are these necessary per API or can we use just -i or just -v (or neither?), and finally the IP addresses are different between the two - I'm on DevStack, so I'm not sure if this is expected with a full deploy or not - even if this is expected it could be documented; and some of the curl requests from earlier on this page use 127.0.01....)

2) Even modifying for my token and IP, the 'Use the Compute API to list servers' command fails. I believe I need a <tenant_id> but the documentation does not make it clear as to what should go in there. I believe the method for determining the tenant_ids should be included as well.

-----------------------------------
Built: 2014-11-14T18:54:30 00:00
git SHA: 7ab9996f2b8287ef3291a2c81da3ebf989aa04f1
URL: http://docs.openstack.org/api/quick-start/content/
source File: file:/home/jenkins/workspace/api-site-tox-doc-publishdocs/api-quick-start/src/docbkx/api-quick-start-onepager.xml
xml:id: openstack-api-quick-start

Tom Fifield (fifieldt)
affects: openstack-manuals → openstack-api-site
Revision history for this message
Anne Gentle (annegentle) wrote :

The API Quick Start should work with Trystack, and I haven't tested with Devstack.

That said, I've noticed that the Trystack call may not be quite right either, and I agree about consistency.

I know this will work with Trystack:

curl -s -X POST $OS_AUTH_URL/tokens \
  -H "Content-Type: application/json" \
  -d '{"auth": {"tenantName": "$OS_TENANT_NAME", "passwordCredentials": {"username": "$OS_USERNAME", "password": "$OS_PASSWORD"}}}'

I also want to add the tip that if you don't know the Tenant, you can send a request with a "" for the tenantName like so:

curl -s -X POST http://8.21.28.222:5000/v2.0/tokens \
  -H "Content-Type: application/json" \
  -d '{"auth": {"tenantName": "", "passwordCredentials": {"username": "$OS_USERNAME", "password": "$OS_PASSWORD"}}}'

Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Anne Gentle (annegentle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143549

Changed in openstack-api-site:
status: Confirmed → In Progress
Tom Fifield (fifieldt)
Changed in openstack-api-site:
milestone: none → kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/143549
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=59d09166162721afa8f49f83305812be7cbbcd2a
Submitter: Jenkins
Branch: master

commit 59d09166162721afa8f49f83305812be7cbbcd2a
Author: Anne Gentle <email address hidden>
Date: Mon Dec 22 15:58:55 2014 -0600

    Tested samples against Trystack; added more samples

    Change-Id: I5e68d03e8fff85e1d83454a05a8625fb22fe0def
    Closes-bug: 1392948

Changed in openstack-api-site:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.