Bug 7119: gw arp didn't resolve
[netvirt.git] / resources / openstack / pingvm.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2013 Cisco Systems, Inc.
4 #
5 # This program and the accompanying materials are made available under the
6 # terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 # and is available at http://www.eclipse.org/legal/epl-v10.html
8 #
9 # Authors : Thomas Bachman
10
11
12 #
13 # Ping an instance created by DevStack
14 #
15
16 # get the prefix
17 ip=$1
18 uuid=`neutron net-list | grep $(echo $ip | awk 'BEGIN {FS="."} {print $1 "." $2 "." $3}') | awk '{print $2}'`
19 dhcp_server="qdhcp-$uuid"
20 foo="ip netns exec $dhcp_server ping $ip"
21 sudo $foo