]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix ip_lib get_gateway for default gateway on an iface
authorsridhargaddam <sridhar.gaddam@enovance.com>
Mon, 22 Jun 2015 14:13:56 +0000 (14:13 +0000)
committersridhargaddam <sridhar.gaddam@enovance.com>
Fri, 26 Jun 2015 12:35:35 +0000 (12:35 +0000)
commit82fddfbb651911c7cb6818428ff7604c9745499c
tree1d076f33f53b64c5bb50fb926db903ed81279e03
parent1b1d07823d86d74efa77eb01c3369a3df00c9822
Fix ip_lib get_gateway for default gateway on an iface

Currently get_gateway() of IpRouteCommand class always assumes
the presence of gateway_ip when default_route is seen.
Since we can also have interface routes without the gw_ip,
this patch fixes the issue by parsing the output accordingly.

Closes-Bug: #1467531
Change-Id: Icf988994b61cbdeb1261c5a0887f29ced41ada07
neutron/agent/linux/dhcp.py
neutron/agent/linux/ip_lib.py
neutron/tests/unit/agent/linux/test_ip_lib.py