diff options
Diffstat (limited to 'deployment/noheat/infra-openstack/vagrant/test/create_keypair.test')
-rwxr-xr-x | deployment/noheat/infra-openstack/vagrant/test/create_keypair.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deployment/noheat/infra-openstack/vagrant/test/create_keypair.test b/deployment/noheat/infra-openstack/vagrant/test/create_keypair.test new file mode 100755 index 000000000..3e1dbfe2b --- /dev/null +++ b/deployment/noheat/infra-openstack/vagrant/test/create_keypair.test @@ -0,0 +1,21 @@ +#!/bin/sh + +export KEYPAIR_NAME='onap_ci_lab' + +export VAGRANT_CWD='..' + +set_up() { + vagrant up --provision-with=run_playbook_destroy + vagrant up --provision-with=run_playbook_create +} + +check() { + local key="$1" + vagrant ssh operator --no-tty -c \ + "export OS_CLOUD=openstack; openstack keypair list -fcsv" \ + | grep "$key" \ + | cut -d',' -f1 +} + +set_up >/dev/null # drop provisioning output +check "$KEYPAIR_NAME" |