| juju remove-machine --force 12 |
| juju remove-machine --force 11 |
| juju remove-machine --force 10 |
| while [ $RETRY -gt 0 -a $(juju status --format=tabular | grep "^10\|^11\|^12" | wc -l) -ne 0 ]; do |
| test -z $UVT || uvt-kvm list | xargs uvt-kvm destroy |
| sudo apt-get remove --purge -y $(dpkg --get-selections | grep "nagioas\|juju\|nova\|neutron" | awk '{print $1}') &&sudo apt-get autoremove -y && sudo rm -rf /etc/juju /etc/neutron /home/ubuntu/.juju && sudo find / -name "*juju*" -exec rm -r \{\} \; |
| sudo ovs-vsctl del-br br-int |
| IP=$(ifconfig fabric | grep "inet addr" | awk '{print $2}' | cut -d: -f2) |
| case $(echo "$IP" | cut -d. -f3) in |
| TO=$(echo "$IP" | awk -F. '{printf("%s.%s.2.0/24", $1, $2)}') |
| GW=$(echo "$IP" | awk -F. '{printf("%s.%s.%s.254", $1, $2, $3)}') |
| TO=$(echo "$IP" | awk -F. '{printf("%s.%s.1.0/24", $1, $2)}') |
| GW=$(echo "$IP" | awk -F. '{printf("%s.%s.%s.254", $1, $2, $3)}') |
| sudo route add -net $TO gw $GW |