Skip to content

Commit

Permalink
fix OpenStack creation
Browse files Browse the repository at this point in the history
  • Loading branch information
k0ka committed Jan 17, 2024
1 parent ef887d4 commit 09c629f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
11 changes: 5 additions & 6 deletions doc/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
13 changes: 13 additions & 0 deletions doc/services/identity/v3/create.rst
Original file line number Diff line number Diff line change
@@ -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}']);
16 changes: 3 additions & 13 deletions doc/services/identity/v3/index.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 09c629f

Please sign in to comment.