Skip to content

Instantly share code, notes, and snippets.

@niedbalski
Created December 9, 2019 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niedbalski/66b7daaa164d9858f0c38206e75f71e5 to your computer and use it in GitHub Desktop.
Save niedbalski/66b7daaa164d9858f0c38206e75f71e5 to your computer and use it in GitHub Desktop.
LB_ID="6899b9b1-2bb7-4771-999f-6cced80cc321"
LB_DATA=$(neutron lbaas-loadbalancer-show ${LB_ID} --format yaml)
LB_LISTENERS_ID=$(echo -e "$LB_DATA" | awk -F'"' '/listeners/ {print $4}')
LB_POOL_ID=$(echo -e "$LB_DATA" | awk -F'"' '/pools/ {print $4}')
LB_HEALTH_ID=$(neutron lbaas-pool-show ${LB_POOL_ID} | awk '/healthmonitor_id/ {print $4}')
neutron lbaas-listener-delete "${LB_LISTENERS_ID}"
neutron lbaas-healthmonitor-delete "${LB_HEALTH_ID}"
neutron lbaas-pool-delete "${LB_POOL_ID}"
neutron lbaas-loadbalancer-delete "${LB_ID}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment