Merge "Neutron: Ensure test project purge targets correct project"

This commit is contained in:
Zuul 2019-09-26 20:34:32 +00:00 committed by Gerrit Code Review
commit 9ec26e182b
2 changed files with 7 additions and 3 deletions

View File

@ -16,7 +16,9 @@
set -ex
if openstack project show "${OS_TEST_PROJECT_NAME}"; then
ospurge --purge-project "${OS_TEST_PROJECT_NAME}"
openstack quota set "${OS_TEST_PROJECT_NAME}" --networks "${NETWORK_QUOTA}" --ports "${PORT_QUOTA}" --routers "${ROUTER_QUOTA}" --subnets "${SUBNET_QUOTA}" --secgroups "${SEC_GROUP_QUOTA}"
if openstack project show "${OS_TEST_PROJECT_NAME}" --domain="${OS_TEST_PROJECT_DOMAIN_NAME}" ; then
OS_TEST_PROJECT_ID=$(openstack project show "${OS_TEST_PROJECT_NAME}" -f value -c id --domain="${OS_TEST_PROJECT_DOMAIN_NAME}")
ospurge --purge-project "${OS_TEST_PROJECT_ID}"
openstack quota set "${OS_TEST_PROJECT_ID}" --networks "${NETWORK_QUOTA}" --ports "${PORT_QUOTA}" --routers "${ROUTER_QUOTA}" --subnets "${SUBNET_QUOTA}" --secgroups "${SEC_GROUP_QUOTA}"
fi

View File

@ -75,6 +75,8 @@ spec:
{{- end }}
- name: OS_TEST_PROJECT_NAME
value: {{ .Values.endpoints.identity.auth.test.project_name }}
- name: OS_TEST_PROJECT_DOMAIN_NAME
value: {{ .Values.endpoints.identity.auth.test.domain_name }}
- name: NETWORK_QUOTA
value: {{ (first (index .Values.conf.rally_tests.tests "NeutronNetworks.create_and_delete_networks")).context.quotas.neutron.network | quote }}
- name: PORT_QUOTA