From 09c629fc62f73c40e7ab0734a52200c7fb5dce78 Mon Sep 17 00:00:00 2001 From: Konstantin Babushkin Date: Wed, 17 Jan 2024 17:15:00 +0100 Subject: [PATCH] fix OpenStack creation --- doc/quick-start.rst | 11 +++++------ doc/services/identity/v3/create.rst | 13 +++++++++++++ doc/services/identity/v3/index.rst | 16 +++------------- 3 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 doc/services/identity/v3/create.rst diff --git a/doc/quick-start.rst b/doc/quick-start.rst index 1492a093..24ebaa5a 100644 --- a/doc/quick-start.rst +++ b/doc/quick-start.rst @@ -39,15 +39,15 @@ To create a client, you will need to provide the following information: * The identity service URL (``authUrl``) * The region in which you want to operate (``region``) -* The credentials of the user you want to authenticate (``user``), (``tokenId``), (``cachedToken``) -or (``application_credential``) +* The credentials of the user you want to authenticate: ``user``, ``tokenId``, ``cachedToken`` + or ``application_credential`` Only the ``authUrl`` is mandatory to create a client. But you will have to provide the ``region`` and ``user`` to each service you create. So it is recommended to provide them when creating the client. -There are different ways to provide the authentication credentials. See the `Token generation`_ section for -the full list of options. You should provide credentials to the `OpenStack` constructor as an array the same way -you provide options to `generateToken` method of the `Identity` service. +There are different ways to provide the authentication credentials. See the :doc:`services/identity/v3/tokens` +section for the full list of options. You should provide credentials to the `OpenStack` constructor as an array +the same way you provide options to ``generateToken`` method of the ``Identity`` service. Here is an example of how to create a client with a user id and password: @@ -76,4 +76,3 @@ Here is an example of how to create a client with application credentials: ]); .. _Composer installation instructions: https://getcomposer.org/doc/00-intro.md -.. _Token generation: services/identity/v3/tokens diff --git a/doc/services/identity/v3/create.rst b/doc/services/identity/v3/create.rst new file mode 100644 index 00000000..57dd890c --- /dev/null +++ b/doc/services/identity/v3/create.rst @@ -0,0 +1,13 @@ +Creating the service +==================== + +Service can be created via ``identityV3`` method of ``OpenStack`` object: + +.. code-block:: php + + $service = $openstack->identityV3(); + +A list of additional options can be passed to the method. For example, to change the region: + +.. code-block:: php + $service = $openstack->identityV3(['region' => '{region}']); diff --git a/doc/services/identity/v3/index.rst b/doc/services/identity/v3/index.rst index 8c161650..e282b0b0 100644 --- a/doc/services/identity/v3/index.rst +++ b/doc/services/identity/v3/index.rst @@ -1,24 +1,14 @@ Identity v3 =========== -Creating the service --------------------- -Service can be created via `identityV3` method of `OpenStack` object: - -.. code-block:: php - - $service = $openstack->identityV3(); - -A list of additional options can be passed to the method. For example, to change the region: - -.. code-block:: php - - $service = $openstack->identityV3(['region' => '{region}']); +Service methods +--------------- .. toctree:: :maxdepth: 3 + create application-credentials credentials domains