Merge "Auto Update CSIT Jobs to run for neon"
[releng/builder.git] / jjb / odl-openstack-cleanup-stale-volumes.sh
index 09f7a5257fbcdd59eedcfc6efc88187c687097ad..3745eb25349b2974d1f0f65e05d044da6a46d19d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2018 The Linux Foundation and others.
 ##############################################################################
 # Scans OpenStack for orphaned volumes
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
 mapfile -t os_volumes < <(openstack volume list -f value -c ID --status Available)
-deactivate
 
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source "/tmp/v/lftools/bin/activate"
 echo "---> Orphaned volumes"
 if [ ${#os_volumes[@]} -eq 0 ]; then
     echo "No orphaned volumes found."
@@ -26,4 +21,3 @@ else
         lftools openstack --os-cloud vex volume remove --minutes 15 "$volume"
     done
 fi
-deactivate