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