Skip to content

Commit fccbf8d

Browse files
authored
Merge branch 'master' into feature/catalog_overrides
2 parents db12e22 + aeb5012 commit fccbf8d

File tree

441 files changed

+1950
-2291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

441 files changed

+1950
-2291
lines changed

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.github export-ignore
2+
/doc export-ignore
3+
/samples export-ignore
4+
/tests export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.php_cs.dist export-ignore
8+
/.scrutinizer.yml export-ignore
9+
/.travis.yml export-ignore
10+
/phpunit.xml.dist export-ignore

.github/workflows/format.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Format"
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
7+
jobs:
8+
composer-normalize:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: shivammathur/setup-php@v2
16+
with:
17+
coverage: none
18+
extensions: mbstring
19+
php-version: 8.2
20+
21+
- run: composer install --no-interaction --no-progress --no-suggest
22+
23+
- run: composer normalize
24+
25+
- uses: stefanzweifel/git-auto-commit-action@v4
26+
with:
27+
commit_message: Normalize composer.json
28+
29+
php-cs-fixer:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
with:
34+
ref: ${{ github.head_ref }}
35+
36+
- uses: shivammathur/setup-php@v2
37+
with:
38+
coverage: none
39+
extensions: mbstring
40+
php-version: 8.1
41+
42+
- run: composer install --no-interaction --no-progress --no-suggest
43+
44+
- run: vendor/bin/php-cs-fixer fix
45+
46+
- run: git pull
47+
48+
- uses: stefanzweifel/git-auto-commit-action@v4
49+
with:
50+
commit_message: Apply php-cs-fixer changes
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Integration Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
tests:
16+
if: |
17+
!contains(github.event.pull_request.body, 'skip ci')
18+
&& !contains(github.event.pull_request.body, 'skip integration')
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
openstack_version: [ "stable/wallaby", "stable/zed", "stable/2023.2" ]
23+
php_version: [ 8.1 ]
24+
include:
25+
- name: "bobcat"
26+
openstack_version: "stable/2023.2"
27+
ubuntu_version: "22.04"
28+
- name: "antelope"
29+
openstack_version: "stable/2023.1"
30+
ubuntu_version: "22.04"
31+
- name: "zed"
32+
openstack_version: "stable/zed"
33+
ubuntu_version: "20.04"
34+
- name: "yoga"
35+
openstack_version: "stable/yoga"
36+
ubuntu_version: "20.04"
37+
- name: "wallaby"
38+
openstack_version: "stable/wallaby"
39+
ubuntu_version: "20.04"
40+
block_storage_v2: true
41+
runs-on: ubuntu-${{ matrix.ubuntu_version }}
42+
name: Deploy OpenStack ${{ matrix.name }} and run integration tests with php ${{matrix.php_version}}
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: get cache directory
46+
id: composer-cache
47+
run: |
48+
echo "::set-output name=dir::$(composer config cache-files-dir)"
49+
- uses: actions/cache@v3
50+
with:
51+
path: |
52+
~/.php_cs.cache
53+
${{ steps.composer-cache.outputs.dir }}
54+
key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }}
55+
restore-keys: |
56+
${{ runner.os }}-composer-${{ matrix.php_version }}-
57+
- uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: ${{ matrix.php_version }}
60+
extensions: curl
61+
tools: composer:v2
62+
coverage: none
63+
- run: composer install --prefer-dist --no-interaction --no-progress
64+
- name: Restore devstack cache
65+
uses: actions/cache@v3
66+
with:
67+
path: |
68+
/opt/stack/*
69+
!/opt/stack/data
70+
~/devstack/
71+
key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }}
72+
- name: Deploy devstack
73+
uses: EmilienM/devstack-action@v0.11
74+
with:
75+
branch: ${{ matrix.openstack_version }}
76+
conf_overrides: |
77+
CINDER_ISCSI_HELPER=lioadm
78+
SWIFT_ENABLE_TEMPURLS=True
79+
SWIFT_TEMPURL_KEY=secretkey
80+
[[post-config|\$SWIFT_CONFIG_PROXY_SERVER]]
81+
[filter:versioned_writes]
82+
allow_object_versioning = true
83+
enabled_services: 's-account,s-container,s-object,s-proxy,s-bak'
84+
- name: Set env variables
85+
run: |
86+
{
87+
echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3"
88+
echo OS_REGION=RegionOne
89+
echo OS_REGION_NAME=RegionOne
90+
echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id)
91+
echo OS_USERNAME=admin
92+
echo OS_PASSWORD=secret
93+
echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id)
94+
echo OS_PROJECT_NAME=admin
95+
echo OS_RESIZE_FLAVOR=c1
96+
echo OS_FLAVOR=1
97+
echo OS_DOMAIN_ID=default
98+
} >> "$GITHUB_ENV"
99+
- name: Execute Block Storage v2 tests
100+
if: matrix.block_storage_v2 == true
101+
run: php ./tests/integration/run.php -s=BlockStorage -v=v2
102+
- name: Execute Block Storage v3 tests
103+
run: php ./tests/integration/run.php -s=BlockStorage -v=v3
104+
- name: Execute Compute tests
105+
run: php ./tests/integration/run.php -s=Compute
106+
- name: Execute Identity tests
107+
run: php ./tests/integration/run.php -s=Identity
108+
- name: Execute Images tests
109+
run: php ./tests/integration/run.php -s=Images
110+
- name: Execute Networking tests
111+
run: php ./tests/integration/run.php -s=Networking
112+
- name: Execute Object Storage tests
113+
run: php ./tests/integration/run.php -s=ObjectStore
114+

.github/workflows/unit_tests.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Unit Tests
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
tests:
15+
runs-on: ubuntu-22.04
16+
if: |
17+
!contains(github.event.pull_request.body, 'skip ci')
18+
&& !contains(github.event.pull_request.body, 'skip unit')
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php: [ 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 ]
23+
composer:
24+
- name: lowest
25+
arg: "--prefer-lowest --prefer-stable"
26+
- name: highest
27+
arg: "" # No args added as highest is default
28+
name: PHPUnit on PHP ${{ matrix.php }} with ${{ matrix.composer.name }} dependencies
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: get cache directory
33+
id: composer-cache
34+
run: |
35+
echo "::set-output name=dir::$(composer config cache-files-dir)"
36+
37+
- uses: actions/cache@v2
38+
with:
39+
path: |
40+
~/.php_cs.cache
41+
${{ steps.composer-cache.outputs.dir }}
42+
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ matrix.composer.name }}-${{ hashFiles('**.composer.lock') }}
43+
44+
- uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: ${{ matrix.php }}
47+
extensions: curl
48+
tools: composer:v2
49+
coverage: none
50+
51+
- run: composer update --prefer-dist --no-interaction --no-progress ${{ matrix.composer.arg }}
52+
53+
- run: vendor/bin/parallel-lint --exclude vendor .
54+
55+
- name: execute unit tests
56+
run: vendor/bin/phpunit --configuration phpunit.xml.dist
57+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ coverage/
44
vendor/
55
*.pyc
66
phpunit.xml
7+
.phpunit.result.cache
78
coverage.xml
89
composer.lock
910
env_test.sh

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
exit(0);
55
}
66

7-
return PhpCsFixer\Config::create()
7+
return (new PhpCsFixer\Config())
88
->setRules(
99
[
1010
'@PSR2' => true,

.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.12"
12+
13+
# Build documentation in the "doc/" directory with Sphinx
14+
sphinx:
15+
configuration: doc/conf.py
16+
17+
# Optional but recommended, declare the Python requirements required
18+
# to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: doc/requirements.txt

COVERAGE.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1+
# OpenStack versions coverage
2+
3+
While we strive to support all versions of OpenStack, we can only test limited number of versions. The current set:
4+
* 2023.2 Bobcat
5+
* 2023.1 Antelope
6+
* Zed
7+
* Yoga
8+
* Wallaby - as the latest version which had BlockStorage v2 API
9+
110
# OpenStack services coverage
211

3-
|Name|PHP classes|API definition|Unit tests|Sample files|Integration tests|Documentation|
4-
|---|:--:|:--:|:--:|:--:|:--:|:--:|
5-
|Block Storage v2|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
6-
|Compute v2|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
7-
|Compute v2 exts|||||||
8-
|Data Processing v1|||||||
9-
|Database v1|||||||
10-
|Identity v2|&#10003;|&#10003;|&#10003;||||
11-
|Identity v2 exts|||||||
12-
|Identity v3|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
13-
|Identity v3 exts|||||||
14-
|Images v2|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
15-
|Networking v2|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
16-
|Networking v2 exts|||||||
17-
|Object Storage v1|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
18-
|Orchestration v1|||||||
19-
|Telemetry v2|||||||
12+
| Name |PHP classes|API definition|Unit tests|Sample files|Integration tests|Documentation|
13+
|--------------------|:--:|:--:|:--:|:--:|:--:|:--:|
14+
| Block Storage v2 |&#10003;|&#10003;|&#10003;||&#10003;||
15+
| Block Storage v3 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
16+
| Compute v2 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
17+
| Identity v2 |&#10003;|&#10003;|&#10003;||||
18+
| Identity v3 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
19+
| Images v2 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
20+
| Networking v2 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
21+
| Object Storage v1 |&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|&#10003;|
2022

2123
## Key
2224

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

0 commit comments

Comments
 (0)