Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # set -x |
| 3 | |
| 4 | source ../../setup/admin-openrc.sh |
| 5 | |
| 6 | get_ip () { |
| 7 | LABEL=$1 |
| 8 | NETWORK=$2 |
| 9 | nova list --all-tenants|grep $LABEL|sed "s/^.*$NETWORK=//g"|sed 's/; .*$//g'|awk '{print $1}' |
| 10 | } |
| 11 | |
| 12 | cat <<EOF |
| 13 | onos_vbng ansible_ssh_host=$( get_ip mysite_onos_vbng flat-lan-1-net) |
| 14 | switch_vbng ansible_ssh_host=$( get_ip mysite_vbng flat-lan-1-net) wan_ip=$( get_ip mysite_vbng wan_network) public_ip=$( get_ip mysite_vbng tun0-net ) |
| 15 | |
| 16 | onos_volt ansible_ssh_host=$( get_ip mysite_onos_volt flat-lan-1-net) |
| 17 | switch_volt ansible_ssh_host=$( get_ip mysite_volt flat-lan-1-net) subscriber_ip=$( get_ip mysite_volt subscriber_network) lan_ip=$( get_ip mysite_volt lan_network) |
| 18 | |
| 19 | client ansible_ssh_host=$( get_ip mysite_clients flat-lan-1-net) subscriber_ip=$( get_ip mysite_clients subscriber_network) |
| 20 | vcpe ansible_ssh_host=$( get_ip mysite_vsg flat-lan-1-net) lan_ip=$( get_ip mysite_vsg lan_network) |
| 21 | EOF |