get vpn router:
vpn_routers=(`neutron vpn-service-list -c router_id | head -n -1 | tail -n +4 | awk ‘{print $2}‘ | sort`)
get router without gateway:
no_ext_routers=(`neutron router-list -c id -c external_gateway_info | grep "null" | awk ‘{print $2}‘ | sort`)
for vpn_router in ${vpn_routers[@]}; do
if [ $vpn_router = $no_ext_router ]; then
fi
done
vpn_service=`neutron vpn-service-list -c id -c router_id | grep $router | awk ‘{print $2}‘`
tenant=`neutron vpn-service-list -c id -c tenant_id | grep $vpn_service | awk ‘{print $4}‘`
hostname=`neutron l3-agent-list-hosting-router $router | head -n -1 | tail -n +4 | awk ‘{print $4}‘`
flg=`neutron ipsec-site-connection-list -c id -c vpnservice_id | grep $vpn_service > /dev/null 2>&1;echo $?`
site_connection=`neutron ipsec-site-connection-list -c id -c vpnservice_id | grep $vpn_service | awk ‘{print $2}‘`