X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fopenstack-cleanup-orphaned-volumes.sh;h=f6d7534326337c9a5c57c4bdc94e09f7511e580e;hb=04853ec1c27444d494afae28e8c181b711280f4b;hp=51b4e58a9a96b79e64c1b8cf28d084207be9b028;hpb=629c7f5421eb198902cbed38ecafe3411782f037;p=releng%2Fglobal-jjb.git diff --git a/shell/openstack-cleanup-orphaned-volumes.sh b/shell/openstack-cleanup-orphaned-volumes.sh index 51b4e58a..f6d75343 100644 --- a/shell/openstack-cleanup-orphaned-volumes.sh +++ b/shell/openstack-cleanup-orphaned-volumes.sh @@ -15,6 +15,17 @@ os_cloud="${OS_CLOUD:-vex}" set -eux -o pipefail +# shellcheck disable=SC1090 +source ~/lf-env.sh + +lf-activate-venv --python python3 "lftools[openstack]" \ + kubernetes \ + niet \ + python-heatclient \ + python-openstackclient \ + python-magnumclient \ + yq + mapfile -t os_volumes < <(openstack --os-cloud "$os_cloud" volume list -f value -c ID --status Available) if [ ${#os_volumes[@]} -eq 0 ]; then