Add quota option to tobiko IR plugin

The quota option can be used to set quota values for the different
openstack resources

E.g.: --quota routers=50 --quota secgroups=-1

Change-Id: Iacbe083fe768715dba717a8e0661f7c3ddfe054a
This commit is contained in:
Eduardo Olivares 2022-04-06 18:57:33 +02:00
parent 9f3db2f26a
commit d519f43417
4 changed files with 25 additions and 0 deletions

View File

@ -225,6 +225,17 @@ subparsers:
type: Flag
help: Ignore flaky test cases
ansible_variable: test_flaky
quota:
type: NestedDict
action: append
ansible_variable: quota
help: |
Configure quota values for different resources
These quotas will be applied to the admin openstack project
Example:
--quota routers=30
--quota secgroups=50
Check "openstack quota set --help" for more information
- title: Cleanup stage
options:

View File

@ -0,0 +1,4 @@
---
# OpenStack client credentials
stackrc_file: '{{ ansible_user_dir }}/overcloudrc'

View File

@ -0,0 +1,7 @@
---
- name: apply quotas to the openstack admin project
shell: |
source {{ stackrc_file }}
openstack quota set --{{ item.key }} {{ item.value }} $OS_PROJECT_NAME
with_dict: "{{ quota | default({}) }}"

View File

@ -63,6 +63,9 @@
name: validations-common
state: present
- name: apply pre-requisites before tests run
include_role: name=tobiko-ir-before-run
- name: "initialize test execution"
include_role: name=tobiko-configure