blob: 96be42c893c39af557322054775bb51d24066508 [file] [log] [blame]
Vasyl Saienko775c1da2023-07-13 11:34:25 +00001EXAMPLES_DIR=$(cd $(dirname "$0")/.. && pwd)
2WORKDIR=$(cd $(dirname "$0") && pwd)
3source ${EXAMPLES_DIR}/lib.sh
4
5command=$1
6
7function run {
8 echo "Creating VM"
9 kubectl apply -f cirros-boot-vm.yaml
10
11 echo "Starting VM"
12 virtctl start cirros-boot-vm
13
14 echo "Waiting VM is Running."
15 wait_vm_state cirros-boot-vm Running
16}
17
18function cleanup {
19 kubectl delete -f cirros-boot-vm.yaml
20}
21
22pushd $WORKDIR
23$command
24popd