Use iproute instead of nameserver to get gw
The nameserver line is only included when a vm fails
to ping the gw and you see the below messages in the
console log:
=== pinging gateway failed, debugging connection ===
The iproute line is always included:
ip-route:169.254.169.254 via 10.20.20.2 dev eth0
The old code worked because at least one of the vms
in the list would hit the gateway failed block and
get the gw from the nameserver line. The old code
also would only copy the gw address once for all
the vms because it kept a list with size 1 for
the address. The new Get VM IPs tries to get the
gw for each vm and not just one for the whole list
of vms. Timing differences might end up not getting
the nameserver line, so instead use the metadata
line which is always present.
Change-Id: I72637575b5171d3eaad6110ed2e8bc2cefed25ed
Signed-off-by: Sam Hague <shague@redhat.com>