]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
OVS agent don't hard code tunnel bridge name
authorrossella <rsblendido@suse.com>
Fri, 21 Aug 2015 12:52:11 +0000 (12:52 +0000)
committerrossella <rsblendido@suse.com>
Mon, 24 Aug 2015 11:15:32 +0000 (11:15 +0000)
In setup_tunnel_br the name of the tunnel bridge
should not be hard coded

Change-Id: I7aebc27eb8d9dd347b34e31f7810fbffd6edf49a
Closes-bug: #1487435

neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py

index 734d29af59ee4e6ea31d88eac828369251cdf8cf..0c590e38c8e50378ccc4185dd1ac682f5b44607e 100644 (file)
@@ -938,7 +938,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
             self.tun_br = self.br_tun_cls(tun_br_name)
         self.tun_br.set_agent_uuid_stamp(self.agent_uuid_stamp)
 
-        if not self.tun_br.bridge_exists('br-tun'):
+        if not self.tun_br.bridge_exists(self.tun_br.br_name):
             self.tun_br.create(secure_mode=True)
         self.tun_br.setup_controllers(self.conf)
         if (not self.int_br.port_exists(self.conf.OVS.int_peer_patch_port) or
index 9bdd731081ec14dc02247b9ba96f93533d5283fe..72cef8cfb16e530b799bdde7e2d4ba4995f4b7de 100644 (file)
@@ -212,7 +212,7 @@ class TunnelTest(object):
 
         self.mock_tun_bridge_expected = [
             mock.call.set_agent_uuid_stamp(mock.ANY),
-            mock.call.bridge_exists('br-tun'),
+            mock.call.bridge_exists(mock.ANY),
             nonzero(mock.call.bridge_exists()),
             mock.call.setup_controllers(mock.ANY),
             mock.call.port_exists('patch-int'),
@@ -621,7 +621,7 @@ class TunnelTestUseVethInterco(TunnelTest):
 
         self.mock_tun_bridge_expected = [
             mock.call.set_agent_uuid_stamp(mock.ANY),
-            mock.call.bridge_exists('br-tun'),
+            mock.call.bridge_exists(mock.ANY),
             nonzero(mock.call.bridge_exists()),
             mock.call.setup_controllers(mock.ANY),
             mock.call.port_exists('patch-int'),