Use socket.AF_INET6 in ip_lib tests

Although AF_INET is always 2, AF_INET6 can vary
depending on the OS.  Use the system-defined
value so the routing table tests work on OSX.

Change-Id: I11dca8e4022b23282838799798f352beb2416881
This commit is contained in:
Brian Haley 2017-01-24 01:07:40 -05:00
parent ea9d837d55
commit 5c5badf365

View File

@ -21,6 +21,7 @@ from neutron_lib import exceptions
import pyroute2
from pyroute2.netlink.rtnl import ndmsg
from pyroute2 import NetlinkError
import socket
import testtools
from neutron.agent.common import utils # noqa
@ -1497,7 +1498,7 @@ class TestGetRoutingTable(base.BaseTestCase):
'metrics': {},
'oif': 2,
'dst_len': 64,
'family': 10,
'family': socket.AF_INET6,
'proto': 2,
'tos': 0,
'dst': '1111:1111:1111:1111::/64',
@ -1516,7 +1517,7 @@ class TestGetRoutingTable(base.BaseTestCase):
'metrics': {},
'oif': 2,
'dst_len': 64,
'family': 10,
'family': socket.AF_INET6,
'proto': 3,
'tos': 0,
'dst': '1111:1111:1111:1112::/64',