Python 3: fix test_ovs_tunnel

In Python 3, this happens:

>>> d = {}
>>> a = d.values()
>>> b = d.values()
>>> a == b
False

And anyway we're not really willing to pass dict_values objects around; we are
expecting lists, just like in Python 2, so let's just do the conversion.

Change-Id: I62ef32d50ba5ce64a653ffc62ba18c53cab9b15c
Blueprint: neutron-python3
This commit is contained in:
Cyril Roelandt 2015-08-04 14:27:48 +02:00
parent 8452ded4df
commit 59531d9d11
2 changed files with 2 additions and 2 deletions

View File

@ -596,7 +596,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
if network_type in constants.TUNNEL_NETWORK_TYPES:
if self.enable_tunneling:
# outbound broadcast/multicast
ofports = self.tun_br_ofports[network_type].values()
ofports = list(self.tun_br_ofports[network_type].values())
if ofports:
self.tun_br.install_flood_to_tun(lvid,
segmentation_id,

View File

@ -294,7 +294,7 @@ class TunnelTest(object):
self._verify_mock_calls()
def test_provision_local_vlan(self):
ofports = TUN_OFPORTS[p_const.TYPE_GRE].values()
ofports = list(TUN_OFPORTS[p_const.TYPE_GRE].values())
self.mock_tun_bridge_expected += [
mock.call.install_flood_to_tun(LV_ID, LS_ID, ofports),
mock.call.provision_local_vlan(