summaryrefslogtreecommitdiffhomepage
path: root/test/lib/base.py
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-08 16:29:37 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-11 00:31:35 +0900
commit4ee18568a07ce51bf3399a1814ebec82e7d961ad (patch)
tree6ce5915d54bedb559f23e6acca44f65a431a0fe3 /test/lib/base.py
parent318b3af291c5c1ed36f630fced6a521b136d4d54 (diff)
test: better name for bridge when TEST_PREFIX is not specified
e.g _br01 => br01 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/lib/base.py')
-rw-r--r--test/lib/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lib/base.py b/test/lib/base.py
index 139cecc4..8d27e996 100644
--- a/test/lib/base.py
+++ b/test/lib/base.py
@@ -100,7 +100,9 @@ def make_gobgp_ctn(tag='gobgp', local_gobgp_path='', from_image='osrg/quagga'):
class Bridge(object):
def __init__(self, name, subnet='', with_ip=True, self_ip=False):
- self.name = '{0}_{1}'.format(TEST_PREFIX, name)
+ self.name = name
+ if TEST_PREFIX != '':
+ self.name = '{0}_{1}'.format(TEST_PREFIX, name)
self.with_ip = with_ip
if with_ip:
self.subnet = netaddr.IPNetwork(subnet)