openstack——删除网络
Posted mrwuzs
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack——删除网络相关的知识,希望对你有一定的参考价值。
#!/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
以上是关于openstack——删除网络的主要内容,如果未能解决你的问题,请参考以下文章