CPERF: Add clean up to CSIT 21/61021/1
authorTim Rozet <trozet@redhat.com>
Thu, 16 Aug 2018 18:43:10 +0000 (14:43 -0400)
committerTim Rozet <trozet@redhat.com>
Thu, 16 Aug 2018 18:43:10 +0000 (14:43 -0400)
Now that we promote Apex artifacts after running CSIT, the snapshots
will be tainted with the flavor and image used during the CSIT test. We
should remove those after running CSIT as it may conflict with other
test suites or user interaction with the snapshots later.

Change-Id: I874ef145f9df20a9d1471e38698549cbe58dea43
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/cperf/cperf-robot-netvirt-csit.sh
jjb/cperf/csit-clean.yaml.ansible [new file with mode: 0644]

index d3a8cd9..13d3be3 100755 (executable)
@@ -167,3 +167,6 @@ docker run -i --net=host \
   /bin/bash -c "source /tmp/overcloudrc; mkdir -p \$HOME/.ssh; cp /tmp/id_rsa \$HOME/.ssh; \
   cd /home/opnfv/repos/odl_test/ && git pull origin master; \
   ${robot_cmd} ${suites};"
+
+echo "Running post CSIT clean"
+ansible-playbook -i ${CONTROLLER_1_IP}, -u heat-admin --key-file ${WORKSPACE}/id_rsa ${REL_PATH}/csit-clean.yaml.ansible -vvv
diff --git a/jjb/cperf/csit-clean.yaml.ansible b/jjb/cperf/csit-clean.yaml.ansible
new file mode 100644 (file)
index 0000000..0151dd8
--- /dev/null
@@ -0,0 +1,11 @@
+---
+- hosts: all
+  tasks:
+    - name: Delete cirros glance image
+      shell: >
+        source /home/heat-admin/overcloudrc && openstack image delete
+        cirros-0.3.5-x86_64-disk
+    - name: Delete nano flavor
+      shell: >
+        source /home/heat-admin/overcloudrc && openstack flavor delete
+        m1.nano