aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/infra-openstack/vagrant/test/create_host.test
blob: d36e288e9753a8a7dd9929d814ae5dbf73bf9319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

export HOST_NAME='operator0'

export VAGRANT_CWD='..'

set_up() {
    vagrant up --provision-with=run_playbook_destroy
    vagrant up --provision-with=run_playbook_create
}

check() {
    local host="$1"
    vagrant ssh operator --no-tty -c \
        "export OS_CLOUD=openstack; openstack server list -fcsv" \
        | grep "$host" \
        | cut -d',' -f2
}

set_up >/dev/null # drop provisioning output
check "$HOST_NAME"