Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
db03906
Support volume_type in server create
obi12341 Jun 27, 2019
84919d9
allow wildcard region; syntax fix with == instead of =
TheDigitalOrchard Jul 27, 2019
8bf49a8
Merge pull request #288 from TheDigitalOrchard/issue-287
haphan Jan 7, 2020
c209a19
Build for php 7.3 and 7.4
Jan 7, 2020
88037a5
Applied php-cs-fixer
Jan 7, 2020
43e2c1c
Removed php7.0
Jan 7, 2020
68f1c35
Fixed Guzzle Missing header delimiter unit tests
Jan 7, 2020
5d73ff5
Merge pull request #296 from php-opencloud/travis
haphan Jan 7, 2020
1555111
Update Guzzle in composer.json
jbeales Oct 7, 2020
f754c13
Make HandlerStack::create signature match Guzzle's HandlerStack::crea…
jbeales Oct 7, 2020
67012e3
Use the separate guzzlehttp/uri-template for templating URLs.
jbeales Oct 7, 2020
c7fc82d
Move the samples/object_store directory to samples/objectstore so int…
jbeales Oct 8, 2020
4e4454f
Throw more granular exceptions from SampleManager.php
jbeales Oct 8, 2020
ebafd9a
Remove unused use statement from file header.
jbeales Oct 8, 2020
517b860
Cast Guzzle Response Body as String so that GuzzleHttp\json_decode() …
jbeales Oct 9, 2020
4959f98
PSR2 Fixes
jbeales Oct 9, 2020
2a03cd0
Switch to using our own \OpenStack\Common\Transport\Utils::jsonDecode…
jbeales Oct 9, 2020
ed5286f
Bump PHP version requirement to match Guzzle 7
jbeales Oct 9, 2020
4eb841f
Remove PHP 7.1 from travis.yml
jbeales Oct 9, 2020
e2f728a
Rename samples/block_strorage to samples/blockstorage
haphan Oct 11, 2020
a37b032
Display errors during in phpunit tests
haphan Oct 11, 2020
7d1409b
Added more unit tests
haphan Oct 11, 2020
64f4ac7
Fixed integration tests
haphan Oct 11, 2020
cafac36
Allow type community and shared for image
haphan Oct 11, 2020
b0a83f1
Added name for logging middleware
haphan Oct 11, 2020
376450e
Replaced uri_for with GuzzleUtils::uriFor
haphan Oct 11, 2020
4e8e2a5
Adding available params for integration test command
haphan Oct 11, 2020
7bb2716
Updated project version support
haphan Oct 11, 2020
4c4a10a
Added waiting for status
haphan Oct 11, 2020
2cbfc51
Improved integration tests for Compute
haphan Oct 11, 2020
73b1616
Merge pull request #313 from jbeales/issue-312
haphan Oct 11, 2020
15cfc47
Merge branch 'master' into feature/create-server-volume-type
haphan Oct 11, 2020
904401e
Update Params.php
haphan Oct 11, 2020
7b0eeb6
Merge pull request #284 from mobilistics/feature/create-server-volume…
haphan Oct 11, 2020
6407651
Update README.md
haphan Oct 12, 2020
2bbe999
Update README.md
haphan Oct 12, 2020
52528bb
Allow user to provide Guzzle options in requests
chapa Feb 22, 2020
0af98cd
Fix documentation about StorageObject::download()
chapa Feb 22, 2020
b6c670a
Rename `guzzle` option to `requestOptions`
chapa Oct 26, 2020
862c51d
Added integration test for download object using stream
haphan Oct 27, 2020
e6d8d32
Merge pull request #299 from chapa/master
haphan Oct 28, 2020
1c695df
Added Ai.net sponsorship logo and link
haphan Dec 15, 2020
caf17ca
Replace the deprecated linter package
ChristophWurst Jan 5, 2021
a80067f
Update phpunit and allow php8
ChristophWurst Jan 5, 2021
6b5853d
Remove deprecated Travis container infra
ChristophWurst Jan 5, 2021
af57678
Re-format the code
ChristophWurst Jan 6, 2021
e4cb7e2
Update friendsofphp/php-cs-fixer to a version compatible with php8
ChristophWurst Jan 6, 2021
0fc440c
Make the cs-fixer pass on php8
ChristophWurst Jan 6, 2021
43864e9
Update friendsofphp/php-cs-fixer for php8
ChristophWurst Jan 18, 2021
682c7c2
Merge pull request #325 from ChristophWurst/enhancement/php8
jamiehannaford Apr 1, 2021
1296815
v3.2 to support PHP 8.0
haphan Apr 2, 2021
8a6a6a7
Fix Call to undefined function GuzzleHttp\Psr7\modify_request()
alcalyn Apr 23, 2021
8723ea4
Remove deprecated calls to Guzzle/Psr7 functions in unit tests
alcalyn Apr 23, 2021
42e2d09
Merge pull request #331 from alcalyn/patch-1
haphan Jul 21, 2021
de8da53
allow uri-templae 1.0 to be compatible with the latest Laravel
k0ka Apr 8, 2023
2a534ca
Merge pull request #358 from php-opencloud/issue-355
k0ka Apr 8, 2023
3f84692
Unit test (#360)
k0ka Jun 24, 2023
aef36ab
change \GuzzleHttp\Promise\all to \GuzzleHttp\Promise\Utils::all (#361)
k0ka Jun 24, 2023
ac606a4
Add .gitattributes file (#367)
alamirault Sep 24, 2023
cba8dc5
GitHub workflows (#368)
k0ka Sep 24, 2023
42e66d8
format segment name, close #365 (#366)
vpecinka Sep 25, 2023
b6f959a
GitHub workflows (#369)
k0ka Dec 7, 2023
b49c6a6
always recheck all tests on push to master (#370)
k0ka Dec 7, 2023
184990e
Restore read the docs (#371)
k0ka Dec 12, 2023
e1c63af
Fix documentation (#372)
k0ka Dec 12, 2023
3c85b6f
Fix documentation (#373)
k0ka Dec 12, 2023
5712c30
Fix sort_key and sort_dir parameters for BlockStorage/v2/listSnapshot…
k0ka Dec 20, 2023
0421764
fix list formating in documentation (#375)
k0ka Dec 20, 2023
a5ecd54
added phpdocs for better type hinting (#376)
k0ka Dec 20, 2023
1cad223
one integration workflow (#377)
k0ka Dec 20, 2023
47c8ed9
create BlockStorage v3 as copy of v2 (#378)
k0ka Jan 5, 2024
7651038
Chores (#379)
k0ka Jan 5, 2024
aeb5012
Application credentials (#380)
k0ka Jan 7, 2024
cb8caff
fix doc for application credentials (#381)
k0ka Jan 7, 2024
ac3ca5c
Handler stack factory (#382)
k0ka Jan 7, 2024
2804874
Fix testing class namespaces (#383)
k0ka Jan 7, 2024
45bd478
Refactor tests (#384)
k0ka Jan 8, 2024
2335c75
Move integration tests to phpunit (#387)
k0ka Jan 17, 2024
f5ca4e9
License: add full text, remove rackspace (#388)
k0ka Jan 17, 2024
e351554
added bigger rescue timeouts (#390)
k0ka Jan 17, 2024
f3b3c6f
return HandlerStack for BC (#391)
k0ka Jan 18, 2024
b5d1fc6
Merge network services (#392)
k0ka Jan 27, 2024
857fcc8
Clarify docs (#389)
k0ka Jan 30, 2024
b0e560d
Resume suspend server (#394)
k0ka Jan 30, 2024
9f817df
fix resume/suspend doc (#395)
k0ka Jan 30, 2024
ba44841
refactor unit tests: use `mockRequest` for all requests (#397)
k0ka Feb 1, 2024
c32ab23
Fix Swift container requests with "tokens" in its name (#396)
k0ka Feb 1, 2024
d823be3
add errorVerbosity (#400)
k0ka Feb 5, 2024
cb7fcc8
add docs for volume attachement (#401)
k0ka Feb 5, 2024
8f2ba03
fix doc links (#402)
k0ka Feb 5, 2024
38a6860
enchance error builder: output body only for json, limit body to 5 Kb…
k0ka Feb 10, 2024
2ed9c10
make swift metadata header case insensitive (#407)
k0ka Apr 2, 2024
e32dcf1
return unmaintaned openstack versions into ci (#408)
k0ka Apr 4, 2024
a7ae9d0
new openstack versions (#416)
k0ka Nov 8, 2024
989f5ed
increase sleep before testing detach. The VM must be completely up. (…
k0ka Nov 9, 2024
d305fb6
revert sleep time, add more debug to the failed test (#418)
k0ka Nov 9, 2024
998e5c0
feat: Add PHP 8.4 support (#415)
nickvergessen Nov 20, 2024
842981a
antelope unmaintained (#420)
k0ka Dec 14, 2024
9886899
extend FloatingIP with description and subnet_id (#421)
antondollmaier Jan 7, 2025
c934255
fix github actions (#423)
k0ka Mar 16, 2025
2a23c7b
Support json-schema v6 for nimbusoft/flysystem-openstack-swift . (#424)
evs-xsarus Apr 30, 2025
94bac6d
remove wallaby and yoga due to ubuntu 20.04 deprecation (#425)
k0ka Apr 30, 2025
b92ea55
merge headers in `OperatorTrait::sendRequest` (#427)
k0ka May 30, 2025
46bc05b
fix integration tests, add epoxy release (#428)
k0ka Jun 2, 2025
9ddc578
Merge remote-tracking branch 'upstream/master' into MAD-15408_v3_open…
davemednick Jul 24, 2025
90815bc
Normalize composer.json
davemednick Jul 24, 2025
50e2bba
Apply php-cs-fixer changes
davemednick Jul 24, 2025
908ce68
fix: add commits
davemednick Jul 24, 2025
1da9369
Merge remote-tracking branch 'fork/MAD-15408_v3_openstack' into MAD-1…
davemednick Jul 24, 2025
bce05c0
Apply php-cs-fixer changes
davemednick Jul 24, 2025
3039e87
fix: Params dupe methods test fixes
davemednick Jul 24, 2025
ef8a4f2
chore: add tests
davemednick Jul 24, 2025
9a77217
chore: add tests
davemednick Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.github export-ignore
/doc export-ignore
/samples export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/.readthedocs.yaml export-ignore
/.scrutinizer.yml export-ignore
/phpunit.sample.xml.dist export-ignore
/phpunit.xml.dist export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage/
vendor/
*.pyc
phpunit.xml
.phpunit.result.cache
coverage.xml
composer.lock
env_test.sh
2 changes: 1 addition & 1 deletion .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exit(0);
}

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(
[
'@PSR2' => true,
Expand Down
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the "doc/" directory with Sphinx
sphinx:
configuration: doc/conf.py

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

80 changes: 41 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The second argument to `setupMockResponse` is an external file, storing a string
We use phpunit, so you run this at the project root:

```bash
phpunit
vendor/bin/phpunit
```

### Integration tests
Expand All @@ -203,29 +203,46 @@ service charges from your provider. Although most tests handle their own
teardown procedures, it is always worth manually checking that resources are
deleted after the test suite finishes.

It is recommended to run integration test in a separate OpenStack project, so that you can easily clean up all resources.

We use all of our sample files as live integration tests, achieving the dual aim of reducing code duplication and
ensuring that our samples actually work.

### Setting up dev environment

In order to run integration tests, you need to have a working OpenStack environment.
You can use [DevStack](http://docs.openstack.org/developer/devstack/) to set up a local OpenStack environment.
DevStack will make substantial changes to your system during installation. Only run DevStack on servers or
virtual machines that are dedicated to this purpose.

Installation is pretty straightforward. You can use guide on their [website](http://docs.openstack.org/developer/devstack/).

Here is currently used `local.conf` for DevStack:

```ini
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=root
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
SWIFT_HASH=1234123412341234
LOGFILE=/tmp/devstack-logs/devstack.log
USE_PYTHON3=True
INSTALL_TEMPEST=False
GIT_BASE=https://github.com
ENABLED_SERVICES+=,-horizon,-dstat,-tempest,s-account,s-container,s-object,s-proxy,s-bak
SWIFT_ENABLE_TEMPURLS=True
SWIFT_TEMPURL_KEY=secretkey

[[post-config|$SWIFT_CONFIG_PROXY_SERVER]]
[filter:versioned_writes]
allow_object_versioning = true
```

### Setting up environment variables

Rename `env_test.sh.dist` as `env_test.sh` and replace values according to your OpenStack instance configuration.
Completed file may look as following.


```bash
#!/usr/bin/env bash
export OS_AUTH_URL="http://1.2.3.4:5000/v3"
export OS_REGION="RegionOne"
export OS_REGION_NAME="RegionOne"
export OS_USER_ID="536068bcb1b946ff8e2f10eff6543f9c"
export OS_USERNAME="admin"
export OS_PASSWORD="2251639ecaea442b"
export OS_PROJECT_ID="b62b3bebf9e84e4eb11aafcd8c58db3f"
export OS_PROJECT_NAME="admin"
export OS_RESIZE_FLAVOR=2 #Must be a valid flavor ID
export OS_FLAVOR=1 #Must be a valid flavor ID
export OS_DOMAIN_ID="default"
```
If you are using DevStack with config file above, the values would be filled automatically.

To export environment variables, run
```bash
Expand All @@ -236,23 +253,12 @@ Additionally, integration tests require image called `cirros` exists.

### Running integration tests

You interact with integration tests through a runner script:
We use phpunit, so you run this at the project root:

```bash
php ./tests/integration/run.php
vendor/bin/phpunit --configuration ./phpunit.sample.xml.dist
```

It supports these command-line flags:

| Flag | Description | Example |
| ---- | ----------- | ------- |
| `-s` `--service` | Allows you to refine tests by a particular service. A service corresponds to top-level directories in the `./integration` directory, meaning that `compute` and `identity` are services because they exist as sub-directories there. If omitted, all services are run.|Run compute service: `php ./tests/integration/run.php -s compute` Run all tests: `php ./tests/integration/run.php`|
| `-v` `--version` | Allows you to refine by a particular service version. A version corresponds to the sub-directories inside a service directory, meaning that `v2` is a supported version of `compute` because it exists as a sub-directory inside the `compute` directory. If omitted, all versions are run.|Run v2 Compute tests: `php ./tests/integration/run.php -s compute -v v2` Run all compute tests: `php ./tests/integration/run.php -s compute`|
| `-t` `--test` | Allows you to refine by a particular test. Tests are defined in classes like `integration\OpenStack\Compute\v2`. Each test method manually references a sample file. To refine which tests are run, list the name of the method in this class. If omitted, all tests are run.|Run create server test: `php ./tests/integration/run.php -s compute -v v2 -t createServer` Run all compute v2 tests: `php ./tests/integration/run.php -s compute -v v2`|
| `--debug` |||
| `--help` | A help screen is returned and no tests run | `php ./tests/integration/run.php --help`


## Style guide

We follow [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) for our
Expand Down Expand Up @@ -281,14 +287,11 @@ required to adhere to:

### 1. Providing feedback

On of the easiest ways to get readily involved in our project is to let us know
One of the easiest ways to get readily involved in our project is to let us know
about your experiences using our SDK. Feedback like this is incredibly useful
to us, because it allows us to refine and change features based on what our
users want and expect of us. There are a bunch of ways to get in contact! You
can [ping us](https://developer.rackspace.com/support/) via e-mail, talk to us on irc
(#rackspace-dev on freenode), [tweet us](https://twitter.com/rackspace), or
submit an issue on our [bug tracker](/issues). Things you might like to tell us
are:
users want and expect of us. You can submit an issue on our [bug tracker](/issues).
Things you might like to tell us are:

* how easy was it to start using our SDK?
* did it meet your expectations? If not, why not?
Expand All @@ -309,8 +312,7 @@ breakthroughs on it so far.
We have three forms of documentation:

* short README documents that briefly introduce a topic
* reference documentation
* user documentation on http://docs.php-opencloud.com that includes
* user documentation on https://php-openstack-sdk.readthedocs.io that includes
getting started guides, installation guides and code samples

If you feel that a certain section could be improved - whether it's to clarify
Expand Down
39 changes: 22 additions & 17 deletions COVERAGE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# OpenStack versions coverage

While we strive to support all versions of OpenStack, we can only test limited number of versions. The current set:
* 2024.2 Dalmatian
* 2024.1 Caracal
* 2023.2 Bobcat
* 2023.1 Antelope
* Zed
* Yoga
* Wallaby - as the latest version which had BlockStorage v2 API

# OpenStack services coverage

|Name|PHP classes|API definition|Unit tests|Sample files|Integration tests|Documentation|
|---|:--:|:--:|:--:|:--:|:--:|:--:|
|Block Storage v2|✓|✓|✓|✓|✓|✓|
|Compute v2|✓|✓|✓|✓|✓|✓|
|Compute v2 exts|||||||
|Data Processing v1|||||||
|Database v1|||||||
|Identity v2|✓|✓|✓||||
|Identity v2 exts|||||||
|Identity v3|✓|✓|✓|✓|✓|✓|
|Identity v3 exts|||||||
|Images v2|✓|✓|✓|✓|✓|✓|
|Networking v2|✓|✓|✓|✓|✓|✓|
|Networking v2 exts|||||||
|Object Storage v1|✓|✓|✓|✓|✓|✓|
|Orchestration v1|||||||
|Telemetry v2|||||||
| Name |PHP classes|API definition|Unit tests|Sample files|Integration tests|Documentation|
|--------------------|:--:|:--:|:--:|:--:|:--:|:--:|
| Block Storage v2 |✓|✓|✓||✓||
| Block Storage v3 |✓|✓|✓|✓|✓|✓|
| Compute v2 |✓|✓|✓|✓|✓|✓|
| Identity v2 |✓|✓|✓||||
| Identity v3 |✓|✓|✓|✓|✓|✓|
| Images v2 |✓|✓|✓|✓|✓|✓|
| Networking v2 |✓|✓|✓|✓|✓|✓|
| Object Storage v1 |✓|✓|✓|✓|✓|✓|

## Key

Expand Down Expand Up @@ -54,3 +58,4 @@ In order for this to be marked complete, every public operation needs to be docu
have all their keys defined. All types must be defined. Any required options must be marked.
* a human-readable description
* a code sample

Loading