Skip to content
Snippets Groups Projects
Unverified Commit 647092b4 authored by Kay Yan's avatar Kay Yan Committed by GitHub
Browse files

fix openstack cleanup (#11299)


Signed-off-by: default avatarKay Yan <kay.yan@daocloud.io>
parent 921b0c0b
Branches
Tags
No related merge requests found
......@@ -71,7 +71,7 @@ ci-not-authorized:
after_script: []
rules:
# LGTM or ok-to-test labels
- if: $PR_LABELS =~ /.*,(lgtm|ok-to-test).*|^(lgtm|ok-to-test).*/i
- if: $PR_LABELS =~ /.*,(lgtm|approved|ok-to-test).*|^(lgtm|approved|ok-to-test).*/i
variables:
CI_OK_TO_TEST: '0'
when: always
......
......@@ -38,6 +38,13 @@ def main():
conn.compute.servers())
print('Security groups...')
try:
map_if_old(conn.network.delete_security_group,
conn.network.security_groups())
except openstack.exceptions.ConflictException as ex:
# Need to delete port when security groups is in used
map_if_old(conn.network.delete_port,
conn.network.ports())
map_if_old(conn.network.delete_security_group,
conn.network.security_groups())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment