~james-page/ubuntu-openstack-ci/drop-tox-from-slave-config

« back to all changes in this revision

Viewing changes to operate/deprecated/950-delete-osci-nets-and-subs.sh

  • Committer: Ryan Beisner
  • Date: 2018-12-13 21:10:41 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: ryan.beisner@canonical.com-20181213211041-5xw4jn4u17ujbv6o
Actually remove the deprecated things

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
echo $0
3
 
 
4
 
# DANGEROUS!!  delete matching neutron networks and routers!
5
 
 
6
 
param=$1
7
 
 
8
 
if [ -z "$param" ]; then
9
 
  echo "Deletes matching neutron netowrks and routers!"
10
 
  echo "Potentially dangerous, so you must confirm with YES."
11
 
  echo "Usage:  delete_osci_networks_and_subnets.sh YES"
12
 
fi
13
 
 
14
 
for i in $(neutron net-list | awk '/osci/ {print $2}'); do
15
 
  if [ "$param" == "YES" ]; then
16
 
    neutron net-delete $i;
17
 
  else
18
 
        echo "Dry run, would have deleted net: ${i}!"
19
 
  fi
20
 
done;
21
 
for i in $(neutron subnet-list | awk '/osci/ {print $2}'); do
22
 
  if [ "$param" == "YES" ]; then
23
 
    neutron subnet-delete $i;
24
 
  else
25
 
        echo "Dry run, would have deleted subnet: ${i}!"
26
 
  fi
27
 
done;