From: Kevin Benton Date: Wed, 1 Jul 2015 20:06:38 +0000 (-0700) Subject: Change the half of the bridge name used for ports X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f1771131a85a2fe633126f354364205554ef71d1;p=openstack-build%2Fneutron-build.git Change the half of the bridge name used for ports The code to generate the names of the patch ports was based on a chunk of the bridge name starting from the beginning. With the long suffix, this ended up excluding all of the random characters in the name. (e.g. br-int374623235 would create an interface br-in-patch-tun). This meant that if two tests using patch interfaces ran together, they would have a name collision and one would fail. This patch updates the patch port name generation to use the randomized back portion of the name. Change-Id: I172e0b2c0b53e8c7151bd92f0915773ea62c0c6a Closes-Bug: #1470637 --- diff --git a/neutron/tests/functional/agent/test_l2_ovs_agent.py b/neutron/tests/functional/agent/test_l2_ovs_agent.py index 75614b20f..6deaab64e 100644 --- a/neutron/tests/functional/agent/test_l2_ovs_agent.py +++ b/neutron/tests/functional/agent/test_l2_ovs_agent.py @@ -60,8 +60,8 @@ class OVSAgentTestFramework(base.BaseOVSLinuxTestCase): self.br_tun = base.get_rand_name(n_const.DEVICE_NAME_MAX_LEN, prefix='br-tun') patch_name_len = n_const.DEVICE_NAME_MAX_LEN - len("-patch-tun") - self.patch_tun = "%s-patch-tun" % self.br_int[:patch_name_len] - self.patch_int = "%s-patch-int" % self.br_tun[:patch_name_len] + self.patch_tun = "%s-patch-tun" % self.br_int[patch_name_len:] + self.patch_int = "%s-patch-int" % self.br_tun[patch_name_len:] self.ovs = ovs_lib.BaseOVS() self.config = self._configure_agent() self.driver = interface.OVSInterfaceDriver(self.config)