Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
688bb3e
fix index links
k0ka Jan 17, 2024
ebf3ad6
check adding index to toc
k0ka Jan 17, 2024
179be75
check adding index to toc
k0ka Jan 17, 2024
ef5df8a
playing with toc
k0ka Jan 17, 2024
807a13b
add OpenStack creation
k0ka Jan 17, 2024
23d1685
add OpenStack creation
k0ka Jan 17, 2024
692b514
fix OpenStack creation
k0ka Jan 17, 2024
ef887d4
fix OpenStack creation
k0ka Jan 17, 2024
09c629f
fix OpenStack creation
k0ka Jan 17, 2024
7cc793c
doc fixes
k0ka Jan 17, 2024
70f27c3
add collapsible auth code
k0ka Jan 17, 2024
dc8d9d6
add collapsible auth code
k0ka Jan 17, 2024
34b838e
add collapsible auth code
k0ka Jan 17, 2024
074efe4
add collapsible auth code
k0ka Jan 17, 2024
6e851df
fix styling
k0ka Jan 17, 2024
4773de8
Merge branch 'master' into rewrite-docs
k0ka Jan 17, 2024
b545ad3
typo
k0ka Jan 17, 2024
d23c1e4
add collapsible auth code
k0ka Jan 18, 2024
67a36de
add collapsible auth code
k0ka Jan 18, 2024
3971434
fix docs
k0ka Jan 18, 2024
200360e
fix docs
k0ka Jan 18, 2024
a8da1e0
fix docs
k0ka Jan 18, 2024
8b2f4e6
remove code example
k0ka Jan 18, 2024
e2da944
testing docs
k0ka Jan 18, 2024
51e45c7
testing docs
k0ka Jan 18, 2024
0f00809
testing docs
k0ka Jan 18, 2024
4287776
testing docs
k0ka Jan 18, 2024
8e9c1b5
testing docs
k0ka Jan 18, 2024
b12a1a0
show authentication samples
k0ka Jan 18, 2024
9cabf4c
fix link
k0ka Jan 18, 2024
92d48d2
credentials doc
k0ka Jan 18, 2024
ee326c7
- add osdoc
k0ka Jan 18, 2024
a313d7c
fix osdoc
k0ka Jan 18, 2024
9cc4929
check include
k0ka Jan 18, 2024
404f581
added service.rst
k0ka Jan 18, 2024
933bf4b
fix documentation for identity v2 and v3
k0ka Jan 19, 2024
a3d2792
clarify auth docs
k0ka Jan 19, 2024
3572575
fix samples
k0ka Jan 19, 2024
090571a
- Block Storage
k0ka Jan 19, 2024
d349536
fix sample name
k0ka Jan 19, 2024
fdfd5b6
fix compute v2
k0ka Jan 19, 2024
a14ea62
Apply php-cs-fixer changes
k0ka Jan 19, 2024
d22523e
images service doc
k0ka Jan 19, 2024
fa2bcd9
unify create-service docs
k0ka Jan 20, 2024
7af31ed
upgrade object store docs
k0ka Jan 21, 2024
52df2be
Merge branch 'master' into rewrite-docs
k0ka Jan 27, 2024
8eba760
new docs for networking
k0ka Jan 30, 2024
e4fe49c
final fixes
k0ka Jan 30, 2024
6b4feae
run tests
k0ka Jan 30, 2024
c8b197e
fix test
k0ka Jan 30, 2024
2a0446c
fix test
k0ka Jan 30, 2024
82d75b5
fix tests
k0ka Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix compute v2
  • Loading branch information
k0ka committed Jan 19, 2024
commit fdfd5b65ef8810982c76874bc5af6fbebebd0c4a
5 changes: 5 additions & 0 deletions doc/services/block-storage/v3/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Block Storage v3
================

OpenStack Block Storage API v3 (Cinder). Cinder is the OpenStack Block Storage service for providing volumes
to Nova virtual machines, Ironic bare metal hosts, containers and more.

.. osdoc:: https://docs.openstack.org/api-ref/block-storage/v3/

.. toctree::
:maxdepth: 3

Expand Down
2 changes: 1 addition & 1 deletion doc/services/block-storage/v3/snapshots.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Snapshots
=========

a read-only point in time copy of a volume. The snapshot can be created from a volume that is currently in use
A snapshot is read-only point in time copy of a volume. The snapshot can be created from a volume that is currently in use
or in an available state. The snapshot can then be used to create a new volume.

.. osdoc:: https://docs.openstack.org/api-ref/block-storage/v3/#volume-snapshots-snapshots
Expand Down
12 changes: 12 additions & 0 deletions doc/services/compute/v2/create.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Create Service
==============

In order to work with the service you have to :doc:`setup the client </setup>` first.

Service can be created via ``blockStorageV3()`` method of the ``OpenStack`` object.

.. sample:: BlockStorage/v3/create.php

A list of additional options can be passed to the method. For example, to change the region:

.. sample:: BlockStorage/v3/create_with_region.php
46 changes: 18 additions & 28 deletions doc/services/compute/v2/flavors.rst
Original file line number Diff line number Diff line change
@@ -1,46 +1,36 @@
Flavors
=======

List flavors
------------
Flavors define the compute, memory, and storage capacity of nova computing instances. To put it simply, a flavor is
an available hardware configuration for a server. It defines the size of a virtual server that can be launched.

.. sample:: Compute/v2/flavors/list_flavors.php
.. refdoc:: OpenStack/Compute/v2/Service.html#method_listFlavors
.. osdoc:: https://docs.openstack.org/nova/latest/user/flavors.html

Each iteration will return a :php:class:`Flavor` instance <OpenStack/Compute/v2/Models/Flavor.html>.

.. include:: /common/generators.rst

Detailed information
~~~~~~~~~~~~~~~~~~~~
.. |models| replace:: flavors

By default, only the ``id``, ``links`` and ``name`` attributes are returned. To return *all* information
for a flavor, you must pass ``true`` as the last parameter, like so:
.. include:: /common/service.rst

.. code-block:: php
Read
----

$flavors = $service->listFlavors([], function ($flavor) {
return $flavor;
}, true);
.. sample:: Compute/v2/flavors/read.php

Retrieve a flavor
-----------------
List
----

.. sample:: Compute/v2/flavors/get_flavor.php
.. refdoc:: OpenStack/Compute/v2/Service.html#method_getFlavor
.. sample:: Compute/v2/flavors/list.php

When retrieving a flavor, sometimes you only want to operate on it. If this is the case,
then there is no need to perform an initial ``GET`` request to the server:
Each iteration will return a :php:class:`Flavor` instance <OpenStack/Compute/v2/Models/Flavor.html>.

.. code-block:: php
.. include:: /common/generators.rst

// Get an unpopulated object
$flavor = $service->getFlavor(['id' => '{flavorId}']);
Detailed information
~~~~~~~~~~~~~~~~~~~~

If, however, you *do* want to retrieve all the details of a remote flavor from the API, you just call:
By default, only the ``id``, ``links`` and ``name`` attributes are returned. To return *all* information
for a flavor, you must pass ``true`` as the last parameter, like so:

.. code-block:: php

$flavor->retrieve();
$flavors = $service->listFlavors([], null, true);

which will update the state of the local object. This gives you an element of control over your app's performance.
18 changes: 6 additions & 12 deletions doc/services/compute/v2/images.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Images
======

.. warning::
These APIs are proxy calls to the :doc:`/services/images/v2/`Image service.
Nova has deprecated all the proxy APIs and users should use the native APIs instead.

.. osdoc:: https://docs.openstack.org/api-ref/compute/#images-deprecated

List images
-----------

Expand All @@ -9,7 +15,6 @@ List images
Each iteration will return an :apiref:Image instance <OpenStack/Compute/v2/Models/Image.html>_.

.. include:: /common/generators.rst
.. refdoc:: OpenStack/Compute/v2/Service.html#method_listImages

Detailed information
~~~~~~~~~~~~~~~~~~~~
Expand All @@ -28,7 +33,6 @@ When retrieving an image, sometimes you only want to operate on it - say to upda
then there is no need to perform an initial GET request to the server:

.. sample:: Compute/v2/images/get_image.php
.. refdoc:: OpenStack/Compute/v2/Service.html#method_getImage

If, however, you *do* want to retrieve all the details of a remote image from the API, you just call:

Expand All @@ -42,7 +46,6 @@ Delete an image
---------------

.. sample:: Compute/v2/images/delete_image.php
.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_delete

Retrieve metadata
-----------------
Expand All @@ -53,8 +56,6 @@ This operation will retrieve the existing metadata for an image:

$metadata = $image->getMetadata();

.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_getMetadata

Reset metadata
--------------

Expand All @@ -63,8 +64,6 @@ Reset metadata
This operation will _replace_ all existing metadata with whatever is provided in the request. Any existing metadata
not specified in the request will be deleted.

.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_resetMetadata

Merge metadata
--------------

Expand All @@ -77,8 +76,6 @@ will be added. Any existing keys that are not specified in the request will rema
'foo' => 'bar',
]);

.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_mergeMetadata

Retrieve image metadata item
----------------------------

Expand All @@ -88,12 +85,9 @@ This operation allows you to retrieve the value for a specific metadata item:

$itemValue = $image->getMetadataItem('key');

.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_getMetadataItem

Delete image metadata item
--------------------------

This operation allows you to remove a specific metadata item:

.. sample:: Compute/v2/images/delete_image_metadata_item.php
.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_deleteMetadataItem
6 changes: 6 additions & 0 deletions doc/services/compute/v2/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Compute v2
==========

OpenStack Compute (Nova) API Version 2. Nova is the OpenStack project that provides a way to provision compute instances
(aka virtual servers).

.. osdoc:: https://docs.openstack.org/api-ref/compute/

.. toctree::
:maxdepth: 3

create
servers
flavors
images
Expand Down
Loading