summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKien Nguyen <kiennt@vn.fujitsu.com>2017-06-26 14:27:11 +0700
committerKien Nguyen <kiennt@vn.fujitsu.com>2017-06-26 15:00:31 +0700
commitdf421a9b2e743f00ac27c030e5094f784f72599a (patch)
tree7bcd232244c53d454bfd22a630614f9e3be9b013
parent7446bc47ae44eb03d45da5b6e458fe1272d44510 (diff)
Add compatibility for pyroute2>=0.4.15
Pyroute2 was updated, its change make some testcases failed. This patch fix the problem with pyroute2 update. Change-Id: I300f9830927a8babf9112f9aff265ef4b2e5e03e Closes-Bug: #1700469
Notes
Notes (review): Code-Review+1: Kirill Zaitsev <k.zaitsev@me.com> Code-Review+1: Daniel Mellado <dmellado@redhat.com> Code-Review+1: Jaivish Kothari(janonymous) <jaivish.kothari@nectechnologies.in> Code-Review+2: Liping Mao <limao@cisco.com> Code-Review+2: Berezovsky Irena <irenab.dev@gmail.com> Workflow+1: Berezovsky Irena <irenab.dev@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sun, 02 Jul 2017 10:29:17 +0000 Reviewed-on: https://review.openstack.org/477427 Project: openstack/kuryr Branch: refs/heads/master
-rw-r--r--kuryr/lib/binding/drivers/ipvlan.py2
-rw-r--r--kuryr/tests/unit/binding/drivers/test_ipvlan.py4
-rw-r--r--kuryr/tests/unit/binding/drivers/test_macvlan.py4
-rw-r--r--kuryr/tests/unit/binding/drivers/test_utils.py4
-rw-r--r--kuryr/tests/unit/binding/drivers/test_veth.py4
-rw-r--r--kuryr/tests/unit/binding/drivers/test_vlan.py4
-rw-r--r--requirements.txt2
7 files changed, 12 insertions, 12 deletions
diff --git a/kuryr/lib/binding/drivers/ipvlan.py b/kuryr/lib/binding/drivers/ipvlan.py
index d7b4d04..a76e6dc 100644
--- a/kuryr/lib/binding/drivers/ipvlan.py
+++ b/kuryr/lib/binding/drivers/ipvlan.py
@@ -17,7 +17,7 @@ from kuryr.lib.binding.drivers import utils
17 17
18KIND = 'ipvlan' 18KIND = 'ipvlan'
19# We use L2 to allow broadcast frames 19# We use L2 to allow broadcast frames
20IPVLAN_MODE_L2 = ifinfmsg.ifinfo.ipvlan_data.modes['IPVLAN_MODE_L2'] 20IPVLAN_MODE_L2 = ifinfmsg.ifinfo.data_map['ipvlan'].modes['IPVLAN_MODE_L2']
21 21
22 22
23def port_bind(endpoint_id, port, subnets, network=None, vm_port=None, 23def port_bind(endpoint_id, port, subnets, network=None, vm_port=None,
diff --git a/kuryr/tests/unit/binding/drivers/test_ipvlan.py b/kuryr/tests/unit/binding/drivers/test_ipvlan.py
index b668cc1..1754ff9 100644
--- a/kuryr/tests/unit/binding/drivers/test_ipvlan.py
+++ b/kuryr/tests/unit/binding/drivers/test_ipvlan.py
@@ -28,9 +28,9 @@ class TestIpvlanDriver(base.TestCase):
28 """Unit tests for nested IPVLAN driver""" 28 """Unit tests for nested IPVLAN driver"""
29 29
30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface') 30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface')
31 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getattribute__', 31 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getattribute__',
32 return_value=mock_create) 32 return_value=mock_create)
33 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getitem__', 33 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getitem__',
34 return_value=mock_interface) 34 return_value=mock_interface)
35 def test_port_bind(self, mock_getitem, mock_getattribute, 35 def test_port_bind(self, mock_getitem, mock_getattribute,
36 mock_configure_container_iface): 36 mock_configure_container_iface):
diff --git a/kuryr/tests/unit/binding/drivers/test_macvlan.py b/kuryr/tests/unit/binding/drivers/test_macvlan.py
index 11ad409..20012dd 100644
--- a/kuryr/tests/unit/binding/drivers/test_macvlan.py
+++ b/kuryr/tests/unit/binding/drivers/test_macvlan.py
@@ -28,9 +28,9 @@ class TestMacvlanDriver(base.TestCase):
28 """Unit tests for nested MACVLAN driver""" 28 """Unit tests for nested MACVLAN driver"""
29 29
30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface') 30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface')
31 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getattribute__', 31 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getattribute__',
32 return_value=mock_create) 32 return_value=mock_create)
33 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getitem__', 33 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getitem__',
34 return_value=mock_interface) 34 return_value=mock_interface)
35 def test_port_bind(self, mock_getitem, mock_getattribute, 35 def test_port_bind(self, mock_getitem, mock_getattribute,
36 mock_configure_container_iface): 36 mock_configure_container_iface):
diff --git a/kuryr/tests/unit/binding/drivers/test_utils.py b/kuryr/tests/unit/binding/drivers/test_utils.py
index 333e32c..96abfbc 100644
--- a/kuryr/tests/unit/binding/drivers/test_utils.py
+++ b/kuryr/tests/unit/binding/drivers/test_utils.py
@@ -13,7 +13,7 @@ import ddt
13import mock 13import mock
14from oslo_utils import uuidutils 14from oslo_utils import uuidutils
15 15
16import pyroute2.ipdb.interface 16import pyroute2.ipdb.interfaces
17from pyroute2.netlink.rtnl import ifinfmsg 17from pyroute2.netlink.rtnl import ifinfmsg
18 18
19from kuryr.lib.binding.drivers import utils 19from kuryr.lib.binding.drivers import utils
@@ -104,7 +104,7 @@ class BindingDriversUtilsTest(base.TestCase):
104 'tenant_id': '51b66b97a12f42a990452967d2c555ac', 104 'tenant_id': '51b66b97a12f42a990452967d2c555ac',
105 'updated_at': '2016-09-27T08:57:13'}] 105 'updated_at': '2016-09-27T08:57:13'}]
106 106
107 fake_iface = mock.Mock(spec=pyroute2.ipdb.interface.Interface) 107 fake_iface = mock.Mock(spec=pyroute2.ipdb.interfaces.Interface)
108 _set_mtu = mock.Mock() 108 _set_mtu = mock.Mock()
109 _set_address = mock.Mock() 109 _set_address = mock.Mock()
110 fake_iface.attach_mock(_set_mtu, 'set_mtu') 110 fake_iface.attach_mock(_set_mtu, 'set_mtu')
diff --git a/kuryr/tests/unit/binding/drivers/test_veth.py b/kuryr/tests/unit/binding/drivers/test_veth.py
index 46562f2..77ef64e 100644
--- a/kuryr/tests/unit/binding/drivers/test_veth.py
+++ b/kuryr/tests/unit/binding/drivers/test_veth.py
@@ -30,9 +30,9 @@ class TestVethDriver(base.TestCase):
30 @mock.patch('os.path.exists', return_value=True) 30 @mock.patch('os.path.exists', return_value=True)
31 @mock.patch('oslo_concurrency.processutils.execute', 31 @mock.patch('oslo_concurrency.processutils.execute',
32 return_value=('fake_stdout', 'fake_stderr')) 32 return_value=('fake_stdout', 'fake_stderr'))
33 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getattribute__', 33 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getattribute__',
34 return_value=mock_create) 34 return_value=mock_create)
35 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getitem__', 35 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getitem__',
36 return_value=mock_interface) 36 return_value=mock_interface)
37 def test_port_bind(self, mock_getitem, mock_getattribute, 37 def test_port_bind(self, mock_getitem, mock_getattribute,
38 mock_execute, mock_path_exists): 38 mock_execute, mock_path_exists):
diff --git a/kuryr/tests/unit/binding/drivers/test_vlan.py b/kuryr/tests/unit/binding/drivers/test_vlan.py
index d2a5ac1..8e8083d 100644
--- a/kuryr/tests/unit/binding/drivers/test_vlan.py
+++ b/kuryr/tests/unit/binding/drivers/test_vlan.py
@@ -28,9 +28,9 @@ class TestVlanDriver(base.TestCase):
28 """Unit tests for nested vlan driver""" 28 """Unit tests for nested vlan driver"""
29 29
30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface') 30 @mock.patch('kuryr.lib.binding.drivers.utils._configure_container_iface')
31 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getattribute__', 31 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getattribute__',
32 return_value=mock_create) 32 return_value=mock_create)
33 @mock.patch('pyroute2.ipdb.interface.InterfacesDict.__getitem__', 33 @mock.patch('pyroute2.ipdb.interfaces.InterfacesDict.__getitem__',
34 return_value=mock_interface) 34 return_value=mock_interface)
35 def test_port_bind(self, mock_getitem, mock_getattribute, 35 def test_port_bind(self, mock_getitem, mock_getattribute,
36 mock_configure_container_iface): 36 mock_configure_container_iface):
diff --git a/requirements.txt b/requirements.txt
index ecbcf31..23c4918 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,6 +11,6 @@ oslo.i18n>=2.1.0 # Apache-2.0
11oslo.log>=3.22.0 # Apache-2.0 11oslo.log>=3.22.0 # Apache-2.0
12oslo.utils>=3.20.0 # Apache-2.0 12oslo.utils>=3.20.0 # Apache-2.0
13pbr!=2.1.0,>=2.0.0 # Apache-2.0 13pbr!=2.1.0,>=2.0.0 # Apache-2.0
14pyroute2>=0.4.12 # Apache-2.0 (+ dual licensed GPL2) 14pyroute2>=0.4.15 # Apache-2.0 (+ dual licensed GPL2)
15python-neutronclient>=5.1.0 # Apache-2.0 15python-neutronclient>=5.1.0 # Apache-2.0
16six>=1.9.0 # MIT 16six>=1.9.0 # MIT