diff --git a/neutron/templates/bin/_neutron-test-force-cleanup.sh.tpl b/neutron/templates/bin/_neutron-test-force-cleanup.sh.tpl index 12ce3136a7..924eea16fb 100644 --- a/neutron/templates/bin/_neutron-test-force-cleanup.sh.tpl +++ b/neutron/templates/bin/_neutron-test-force-cleanup.sh.tpl @@ -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 diff --git a/neutron/templates/pod-rally-test.yaml b/neutron/templates/pod-rally-test.yaml index 362d2aa273..1e3c4f15b9 100644 --- a/neutron/templates/pod-rally-test.yaml +++ b/neutron/templates/pod-rally-test.yaml @@ -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