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

[UPI on OSP] make remove network and port more faster #3696

Merged
merged 1 commit into from Jun 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions upi/openstack/down-network.yaml
Expand Up @@ -32,13 +32,13 @@

- name: 'List ports'
command:
cmd: "openstack port list --tags {{ cluster_id_tag }} -f value -c id "
cmd: "openstack port list --tags {{ cluster_id_tag }} -f value -c id"
register: ports

- name: 'Remove the cluster ports'
command:
cmd: "openstack port delete {{ item.1}}"
with_indexed_items: "{{ ports.stdout_lines }}"
cmd: "openstack port delete {{ ports.stdout_lines | join(' ') }}"
when: ports.stdout != ""

- name: 'Remove the cluster router'
os_router:
Expand All @@ -47,14 +47,13 @@

- name: 'List cluster networks'
command:
cmd: "openstack network list --tags {{ cluster_id_tag }} -f value -c Name"
cmd: "openstack network list --tags {{ cluster_id_tag }} -f value -c ID"
register: networks

- name: 'Remove the cluster networks'
os_network:
name: "{{ item.1}}"
state: absent
with_indexed_items: "{{ networks.stdout_lines }}"
command:
cmd: "openstack network delete {{ networks.stdout_lines | join(' ') }}"
when: networks.stdout != ""

- name: 'List the cluster subnet pool'
command:
Expand Down