tripleo-ha-utils/tools/ha-test-suite/recovery/recovery_instance-creation
Raoul Scarazzini d9e9613a8b Integrate ha-test-suite into the repo
This commit puts the ha-test-suite under the tools directory instead of
having it downloaded from the outside (originally it was available at
the link https://github.com/rscarazz/tripleo-director-ha-test-suite.
At code level now the suite is copied directly from the local path
tools/ha-test-suite and the executable now is ha-test-suite.sh.

Change-Id: I087bc28a0afa3ede9b2fb698892b8306f56790a2
2017-05-05 04:34:22 -04:00

28 lines
1.1 KiB
Plaintext

# Recovery: Instance creation
STACKDIR=/home/stack
INSTANCE_NAME=cirros-1
source $STACKDIR/overcloudrc
floatingip=$(nova list | grep $INSTANCE_NAME | awk '{print $13}')
floatingip_id=$(neutron floatingip-list | grep $floatingip | awk '{print $2}')
port_id=$(neutron port-list | grep $floatingip | awk '{print $2}')
neutron floatingip-disassociate $floatingip_id $port_id
neutron floatingip-delete $floatingip_id
nova delete $INSTANCE_NAME
projectid=$(openstack project list | awk '/admin/ {print $2}')
glance --os-project-id=$projectid image-delete $(glance --os-project-id=$projectid image-list | grep CirrOS | awk '{print $2}')
rm /tmp/cirros-0.3.4-x86_64-disk.img
nova flavor-delete overcloud-instance-test-small-flavor
neutron router-gateway-clear floating-router floating-network
neutron router-interface-delete floating-router private-subnet
neutron router-delete floating-router
neutron security-group-delete pingandssh
neutron subnet-delete private-subnet
neutron subnet-delete floating-subnet
neutron net-delete floating-network
neutron net-delete private-network