Merge "Exchange cURL examples for openstackclient"

This commit is contained in:
Jenkins 2017-03-02 15:13:28 +00:00 committed by Gerrit Code Review
commit 364285000e

View File

@ -367,19 +367,25 @@ projects and domains that are accessible.
Read more about `listing resources Read more about `listing resources
<https://developer.openstack.org/api-ref/identity/v3-ext/#list-projects-a-federated-user-can-access>`__. <https://developer.openstack.org/api-ref/identity/v3-ext/#list-projects-a-federated-user-can-access>`__.
~~~~~~~~~~~~ ~~~~~~~
Example cURL Example
~~~~~~~~~~~~ ~~~~~~~
.. code-block:: bash .. code-block:: bash
$ curl -X GET -H "X-Auth-Token: <unscoped token>" http://localhost:5000/v3/OS-FEDERATION/projects $ export OS_IDENTITY_API_VERSION=3
$ export OS_TOKEN=<unscoped token>
$ export OS_URL=http://localhost:5000/v3
$ openstack federation project list
or or
.. code-block:: bash .. code-block:: bash
$ curl -X GET -H "X-Auth-Token: <unscoped token>" http://localhost:5000/v3/OS-FEDERATION/domains $ export OS_IDENTITY_API_VERSION=3
$ export OS_TOKEN=<unscoped token>
$ export OS_URL=http://localhost:5000/v3
$ openstack federation domain list
Get a scoped token Get a scoped token
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
@ -391,13 +397,19 @@ sufficient to uniquely identify a project or domain.
Read more about `getting a scoped token Read more about `getting a scoped token
<https://developer.openstack.org/api-ref/identity/v3-ext/#request-a-scoped-os-federation-token>`__. <https://developer.openstack.org/api-ref/identity/v3-ext/#request-a-scoped-os-federation-token>`__.
~~~~~~~~~~~~ ~~~~~~~
Example cURL Example
~~~~~~~~~~~~ ~~~~~~~
.. code-block:: bash .. code-block:: bash
$ curl -X POST -H "Content-Type: application/json" -d '{"auth":{"identity":{"methods":["mapped"],"mapped":{"id":"<unscoped_token_id>"}},"scope":{"project":{"domain": {"name": "federated_domain"},"name":"federated_project"}}}}' -D - http://localhost:5000/v3/auth/tokens $ export OS_AUTH_TYPE=token
$ export OS_IDENTITY_API_VERSION=3
$ export OS_TOKEN=<unscoped token>
$ export OS_AUTH_URL=http://localhost:5000/v3
$ export OS_PROJECT_DOMAIN_NAME=federated_domain
$ export OS_PROJECT_NAME=federated_project
$ openstack token issue
-------------------------------------- --------------------------------------
Keystone as an Identity Provider (IdP) Keystone as an Identity Provider (IdP)