标签:vim nova list bin open delete interface amp router Opens
#!/bin/bash
#delete vm
for vim in `nova list |awk '{if( NR > 2 ) {print $2}}'`;do
nova delete $vim &
done
#Unbundling router
for port in `neutron port-list --all |awk '{if( NR > 2 ) {print $2}}'`;do
for router in `neutron router-list --all | awk '{if( NR > 2 ) {print $2}}'`;do
neutron router-interface-delete $router port=$port &
done
done
sleep 60
# delete port
for port_d in `neutron port-list --all |awk '{if( NR > 2 ) {print $2}}'`;do
neutron port-delete $port_d &
done
sleep 60
#delete subnet
for subnet in `neutron subnet-list --all|awk '{if( NR > 2 ) {print $2}}'`;do
neutron subnet-delete $subnet &
done
sleep 60
#delete net
for net in `neutron net-list --all |awk '{if( NR > 2 ) {print $2}}'`;do
neutron net-delete $net &
done
#delete route
for router_d in `neutron router-list --all|awk '{print $2}'`;do
neutron router-delete $router_d &
done
标签:vim nova list bin open delete interface amp router Opens
原文地址:https://www.cnblogs.com/mrwuzs/p/9668988.html