File: clean.sh

package info (click to toggle)
golang-github-vmware-govmomi 0.24.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,848 kB
  • sloc: sh: 2,285; lisp: 1,560; ruby: 948; xml: 139; makefile: 54
file content (25 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#
# Cleanup any artifacts created by govc
#

. $(dirname $0)/test_helper.bash

teardown

datastore_rm() {
  name=$1
  govc datastore.rm $name 2> /dev/null
}

datastore_rm $GOVC_TEST_IMG
datastore_rm $GOVC_TEST_ISO
datastore_rm $GOVC_TEST_VMDK
datastore_rm $(echo $GOVC_TEST_VMDK | sed 's/.vmdk/-flat.vmdk/')
datastore_rm $(dirname $GOVC_TEST_VMDK)

# Recursively destroy all resource pools created by the test suite
govc ls host/*/Resources/govc-test-* | \
  xargs -rt govc pool.destroy -r

govc datastore.ls