blob: 42132b34709303ff89e8d5aec564ca5cc47e8bd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
export KEYPAIR_NAME='onap_ci_lab'
export VAGRANT_CWD='..'
set_up() {
vagrant up
vagrant provision --provision-with=run_playbook_create
vagrant provision --provision-with=run_playbook_destroy
}
check() {
local key="$1"
vagrant ssh operator --no-tty -c \
"export OS_CLOUD=openstack; openstack keypair list -fcsv" \
| grep "$key" \
|| echo "Keypair ${key} not found."
}
set_up >/dev/null # drop provisioning output
check "$KEYPAIR_NAME"
|