Skip to content

Commit

Permalink
Merge branch 'php-opencloud:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
giogurto-grande authored Dec 8, 2021
2 parents 72a46c9 + 42e2d09 commit 258c0ed
Show file tree
Hide file tree
Showing 233 changed files with 1,261 additions and 1,737 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
language: php

sudo: false
dist: bionic

cache:
directories:
- $HOME/.composer/cache

matrix:
include:
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: 8.0
- php: nightly
allow_failures:
- php: nightly
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Additionally, integration tests require image called `cirros` exists.
You interact with integration tests through a runner script:

```bash
php ./tests/integration/run.php
php ./tests/integration/run.php [-s=BlockStorage|Compute|Identity|Images|Networking|ObjectStore] [--debug=1|2]
```

It supports these command-line flags:
Expand Down
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,45 @@
`php-opencloud/openstack` is an SDK which allows PHP developers to easily connect to OpenStack APIs in a simple and
idiomatic way. This binding is specifically designed for OpenStack APIs, but other provider SDKs are available. Multiple
OpenStack services, and versions of services, are supported.

## Links

* [Official documentation](https://php-openstack-sdk.readthedocs.io/en/latest/)
* [Reference documentation](http://refdocs.os.php-opencloud.com)
* [Contributing guide](/CONTRIBUTING.md)
* [Code of Conduct](/CODE_OF_CONDUCT.md)

## Getting help

## We need your help :smiley:

We invest a large amount of work to ensure this SDK works with many OpenStack distributions via running end-to-end
integration tests with a real cluster.

If you or your organization are in a position that can help us access popular distributions as listed below, do reach
out by open an issue in github.

| Distribution | |
|------------------------------------|-------------------------|
|OpenStack RDO<br>MicroStack Openstack | Sponsored by [![Ai.net](https://i.imgur.com/wsFRFuX.png)](https://www.ai.net/) |
|Red Hat OpenStack | Need sponsor! |
|OVH OpenStack | Need sponsor! |
|SUSE OpenStack | Need sponsor! |
|RackSpace OpenStack | Need sponsor! |

## Join the community

- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
- Report an issue: https://github.com/php-opencloud/openstack/issues


## Version Guidance

| Version | Status | PHP Version | End of life |
| --------- | --------------------------- | ------------- | ----------------------- |
| `^3.0` | Latest | `>=7.0` | March 2020 |
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2018 |
| Version | Status | PHP Version | Support until |
| --------- | --------------------------- | ---------------- | ----------------------- |
| `^3.2` | Latest | `>=7.2.5, >=8.0` | Current |
| `^3.1` | Latest | `>=7.2.5` | Current |
| `^3.0` | Bug fixed only | `>=7.0` | Oct 2020 |
| `^2.0` | End of life | `>=7.0,<7.2` | March 2018 |


## Upgrade from 2.x to 3.x

Expand Down Expand Up @@ -54,4 +73,4 @@ taken the time to write a [contributing guide](CONTRIBUTING.md) for folks intere
If you're not sure how you can get involved, feel free to
[submit an issue](https://github.com/php-opencloud/openstack/issues/new) or
[contact us](https://developer.rackspace.com/support/). You don't need to be a PHP expert - all members of the
community are welcome!
community are welcome!
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@
}
},
"require": {
"php": "~7.0",
"guzzlehttp/guzzle": "^6.1",
"php": "^7.2.5|^8.0",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/uri-template": "0.2",
"justinrainbow/json-schema": "^5.2"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"phpunit/phpunit": "^8.0",
"psr/log": "^1.0",
"php-coveralls/php-coveralls": "^2.0",
"jakub-onderka/php-parallel-lint": "^1.0",
"friendsofphp/php-cs-fixer": "^2.13"
"friendsofphp/php-cs-fixer": "^2.18",
"php-parallel-lint/php-parallel-lint": "^1.2"
},
"extra": {
"branch-alias": {
Expand Down
10 changes: 5 additions & 5 deletions doc/services/block-storage/v2/volume-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Volume Types

Listing volume types
--------------------
.. sample:: block_storage/v2/volume_types/list.php
.. sample:: blockstoragev2/volume_types/list.php
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_listVolumeTypes

Each iteration will return a :php:class:`VolumeType` instance <OpenStack/BlockStorage/v2/Models/VolumeType.html>.
Expand All @@ -17,7 +17,7 @@ Create volume type
The only attributes that are required when creating a volume are a name. The simplest example
would therefore be this:

.. sample:: block_storage/v2/volume_types/create.php
.. sample:: blockstoragev2/volume_types/create.php
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_createVolumeType


Expand All @@ -27,7 +27,7 @@ Retrieve details of a volume type
When retrieving a volume type, sometimes you only want to operate on it - say to update or delete it. If this is the
case, then there is no need to perform an initial GET request to the API:

.. sample:: block_storage/v2/volume_types/get.php
.. sample:: blockstoragev2/volume_types/get.php

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

Expand All @@ -46,7 +46,7 @@ Update a volume type
The first step when updating a volume type is modifying the attributes you want updated. By default, only a volume
type's name can be edited.

.. sample:: block_storage/v2/volume_types/update.php
.. sample:: blockstoragev2/volume_types/update.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/VolumeType.html#method_update


Expand All @@ -55,5 +55,5 @@ Delete volume type

To permanently delete a volume type:

.. sample:: block_storage/v2/volume_types/delete.php
.. sample:: blockstoragev2/volume_types/delete.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/VolumeType.html#method_delete
18 changes: 9 additions & 9 deletions doc/services/block-storage/v2/volumes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Volumes
List volumes
------------

.. sample:: block_storage/v2/volumes/list.php
.. sample:: blockstoragev2/volumes/list.php
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_listVolumes

Each iteration will return a php:class:`Volume` instance <OpenStack/BlockStorage/v2/Models/Volume.html>.
Expand All @@ -17,15 +17,15 @@ Detailed information
By default, only the ``id``, ``links`` and ``name`` attributes are returned. To return *all* information
for a flavor, you must enable detailed information, like so:

.. sample:: block_storage/v2/volumes/list_detail.php
.. sample:: blockstoragev2/volumes/list_detail.php

Create volume
-------------

The only attributes that are required when creating a volume are a size in GiB. The simplest example
would therefore be this:

.. sample:: block_storage/v2/volumes/create.php
.. sample:: blockstoragev2/volumes/create.php

You can further configure your new volume, however, by following the below sections, which instruct you how to add
specific functionality.
Expand All @@ -35,17 +35,17 @@ specific functionality.
Create from image
~~~~~~~~~~~~~~~~~

.. sample:: block_storage/v2/volumes/create_from_image.php
.. sample:: blockstoragev2/volumes/create_from_image.php

Create from snapshot
~~~~~~~~~~~~~~~~~~~~

.. sample:: block_storage/v2/volumes/create_from_snapshot.php
.. sample:: blockstoragev2/volumes/create_from_snapshot.php

Create from source volume
~~~~~~~~~~~~~~~~~~~~~~~~~

.. sample:: block_storage/v2/volumes/create_from_source_volume.php
.. sample:: blockstoragev2/volumes/create_from_source_volume.php


Retrieve volume details
Expand All @@ -54,7 +54,7 @@ Retrieve volume details
When retrieving a volume, sometimes you only want to operate on it - say to update or delete it. If this is the case,
then there is no need to perform an initial GET request to the API:

.. sample:: block_storage/v2/volumes/get.php
.. sample:: blockstoragev2/volumes/get.php

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

Expand All @@ -73,13 +73,13 @@ Update volume
The first step when updating a volume is modifying the attributes you want updated. By default, only a volume's name
and description can be edited.

.. sample:: block_storage/v2/volumes/update.php
.. sample:: blockstoragev2/volumes/update.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_update

Delete volume
-------------

To permanently delete a volume:

.. sample:: block_storage/v2/volumes/delete.php
.. sample:: blockstoragev2/volumes/delete.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_delete
8 changes: 4 additions & 4 deletions doc/services/object-store/v1/account.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Show account details

To work with an Object Store account, you must first retrieve an account object like so:

.. sample:: object_store/v1/account/get.php
.. sample:: objectstore/v1/account/get.php
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getAccount

Get account metadata
--------------------

.. sample:: object_store/v1/account/get_metadata.php
.. sample:: objectstore/v1/account/get_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_getMetadata

Replace all metadata with new values
Expand Down Expand Up @@ -43,7 +43,7 @@ the metadata of the account will now be:

To merge metadata, you must run:

.. sample:: object_store/v1/account/reset_metadata.php
.. sample:: objectstore/v1/account/reset_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_resetMetadata

Merge new metadata values with existing
Expand Down Expand Up @@ -75,5 +75,5 @@ the metadata of the account will now be:

To reset metadata, you must run:

.. sample:: object_store/v1/account/merge_metadata.php
.. sample:: objectstore/v1/account/merge_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_mergeMetadata
12 changes: 6 additions & 6 deletions doc/services/object-store/v1/containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Containers
Show details for a container
----------------------------

.. sample:: object_store/v1/containers/get.php
.. sample:: objectstore/v1/containers/get.php
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getContainer

At this point, the object returned is *empty* because we did not execute a HTTP request to receive the state of the
Expand All @@ -25,7 +25,7 @@ and all of the local properties will match those of the remote resource.
List containers
---------------

.. sample:: object_store/v1/containers/list.php
.. sample:: objectstore/v1/containers/list.php
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_listContainers

When listing containers, you must be aware that not *all* information about a container is returned in a collection.
Expand All @@ -46,7 +46,7 @@ container.
Delete container
----------------

.. sample:: object_store/v1/containers/delete.php
.. sample:: objectstore/v1/containers/delete.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_delete

The API will only accept DELETE requests on containers when they are empty. If you have a container with any objects
Expand All @@ -55,7 +55,7 @@ inside, the operation will fail.
Get metadata
------------

.. sample:: object_store/v1/containers/get_metadata.php
.. sample:: objectstore/v1/containers/get_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_getMetadata

The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
Expand All @@ -65,7 +65,7 @@ correspond to the values set either when the container was created, or when a pr
Replace all metadata with new values
------------------------------------

.. sample:: object_store/v1/containers/reset_metadata.php
.. sample:: objectstore/v1/containers/reset_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_resetMetadata

In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
Expand Down Expand Up @@ -95,7 +95,7 @@ the metadata of the account will now be:
Merge new metadata values with existing
---------------------------------------

.. sample:: object_store/v1/containers/merge_metadata.php
.. sample:: objectstore/v1/containers/merge_metadata.php
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_mergeMetadata

In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing
Expand Down
Loading

0 comments on commit 258c0ed

Please sign in to comment.