Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub workflows #368

Merged
merged 14 commits into from
Sep 24, 2023
67 changes: 67 additions & 0 deletions .github/workflows/integration_identity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run Identity Integration Tests
on:
pull_request:
paths:
- '**Identity**'
jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
openstack_version: [ "stable/zed" ]
php_version: [ 8.1 ]
ubuntu_version: [ 20.04 ]
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Deploy OpenStack ${{ matrix.name }} and run Identity integration tests with php ${{matrix.php_version}}
steps:
- uses: actions/checkout@v2
- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
with:
path: |
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php_version }}-
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: curl
tools: composer:v2
coverage: none
- run: composer install --prefer-dist --no-interaction --no-progress
- name: Restore devstack cache
uses: actions/cache@v3
with:
path: |
/opt/stack/*
!/opt/stack/data
~/devstack/
key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }}
- name: Deploy devstack
uses: EmilienM/[email protected]
with:
branch: ${{ matrix.openstack_version }}
- name: Set env variables
run: |
{
echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3"
echo OS_REGION=RegionOne
echo OS_REGION_NAME=RegionOne
echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id)
echo OS_USERNAME=admin
echo OS_PASSWORD=secret
echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id)
echo OS_PROJECT_NAME=admin
echo OS_RESIZE_FLAVOR=2
echo OS_FLAVOR=1
echo OS_DOMAIN_ID=default
} >> "$GITHUB_ENV"
- name: Execute integration tests
run: php ./tests/integration/run.php -s=Identity

74 changes: 74 additions & 0 deletions .github/workflows/integration_object_storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Run Object Storage Integration Tests
on:
pull_request:
paths:
- '**ObjectStore**'
jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
openstack_version: [ "stable/zed" ]
php_version: [ 8.1 ]
ubuntu_version: [ 20.04 ]
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Deploy OpenStack ${{ matrix.name }} and run ObjectStore integration tests with php ${{matrix.php_version}}
steps:
- uses: actions/checkout@v2
- name: get cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
with:
path: |
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php_version }}-${{ hashFiles('**.composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php_version }}-
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: curl
tools: composer:v2
coverage: none
- run: composer install --prefer-dist --no-interaction --no-progress
- name: Restore devstack cache
uses: actions/cache@v3
with:
path: |
/opt/stack/*
!/opt/stack/data
~/devstack/
key: ${{ runner.os }}-openstack-${{ matrix.openstack_version }}-${{ github.workflow }}
- name: Deploy devstack
uses: EmilienM/[email protected]
with:
branch: ${{ matrix.openstack_version }}
conf_overrides: |
SWIFT_ENABLE_TEMPURLS=True
SWIFT_TEMPURL_KEY=secretkey
[[post-config|\$SWIFT_CONFIG_PROXY_SERVER]]
[filter:versioned_writes]
allow_object_versioning = true
enabled_services: 's-account,s-container,s-object,s-proxy'
- name: Set env variables
run: |
{
echo OS_AUTH_URL="$(grep -oP -m 1 "(?<=auth_url: )(.*)\$" /etc/openstack/clouds.yaml)/v3"
echo OS_REGION=RegionOne
echo OS_REGION_NAME=RegionOne
echo OS_USER_ID=$(openstack --os-cloud=devstack-admin user show admin -f value -c id)
echo OS_USERNAME=admin
echo OS_PASSWORD=secret
echo OS_PROJECT_ID=$(openstack --os-cloud=devstack-admin project show admin -f value -c id)
echo OS_PROJECT_NAME=admin
echo OS_RESIZE_FLAVOR=2
echo OS_FLAVOR=1
echo OS_DOMAIN_ID=default
} >> "$GITHUB_ENV"
- name: Execute integration tests
run: php ./tests/integration/run.php -s=ObjectStore

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:: blockstoragev2/volume_types/list.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volume_types/create.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volume_types/get.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volume_types/update.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volume_types/delete.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/list.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/list_detail.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/create.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/create_from_image.php
.. sample:: BlockStorage/v2/volumes/create_from_image.php

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

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

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

.. sample:: blockstoragev2/volumes/create_from_source_volume.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/get.php
.. sample:: BlockStorage/v2/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:: blockstoragev2/volumes/update.php
.. sample:: BlockStorage/v2/volumes/update.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_update

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

To permanently delete a volume:

.. sample:: blockstoragev2/volumes/delete.php
.. sample:: BlockStorage/v2/volumes/delete.php
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_delete
4 changes: 2 additions & 2 deletions doc/services/compute/v2/flavors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Flavors
List flavors
------------

.. sample:: compute/v2/flavors/list_flavors.php
.. sample:: Compute/v2/flavors/list_flavors.php
.. refdoc:: OpenStack/Compute/v2/Service.html#method_listFlavors

Each iteration will return a :php:class:`Flavor` instance <OpenStack/Compute/v2/Models/Flavor.html>.
Expand All @@ -26,7 +26,7 @@ for a flavor, you must pass ``true`` as the last parameter, like so:
Retrieve a flavor
-----------------

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

When retrieving a flavor, sometimes you only want to operate on it. If this is the case,
Expand Down
10 changes: 5 additions & 5 deletions doc/services/compute/v2/images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Images
List images
-----------

.. sample:: compute/v2/images/list_images.php
.. sample:: Compute/v2/images/list_images.php

Each iteration will return an :apiref:Image instance <OpenStack/Compute/v2/Models/Image.html>_.

Expand All @@ -27,7 +27,7 @@ Retrieve an image
When retrieving an image, 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 server:

.. sample:: compute/v2/images/get_image.php
.. 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 @@ -41,7 +41,7 @@ which will update the state of the local object. This gives you an element of co
Delete an image
---------------

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

Retrieve metadata
Expand All @@ -58,7 +58,7 @@ This operation will retrieve the existing metadata for an image:
Reset metadata
--------------

.. sample:: compute/v2/images/reset_image_metadata.php
.. sample:: Compute/v2/images/reset_image_metadata.php

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.
Expand Down Expand Up @@ -95,5 +95,5 @@ Delete image metadata item

This operation allows you to remove a specific metadata item:

.. sample:: compute/v2/images/delete_image_metadata_item.php
.. sample:: Compute/v2/images/delete_image_metadata_item.php
.. refdoc:: OpenStack/Compute/v2/Models/Image.html#method_deleteMetadataItem
Loading
Loading