Give docker bridges test-specific names
We have seen in Dragonflow tempest tests that docker bridges do not always clean-up correctly, and this causes false-positive errors. This change modifies the name of the bridge to be unique for each test. This way, if a test fails to clean up, it will not affect the other tests. Change-Id: I869c6dc798cd1cc20376023481518e7a03b71fde
This commit is contained in:
parent
fb06d1d91f
commit
f505a0b7f7
@ -68,7 +68,7 @@ class BgpSpeakerBasicTestJSONBase(base.BgpSpeakerScenarioTestJSONBase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup_container(cls):
|
def resource_setup_container(cls):
|
||||||
cls.brdc = ctn_base.Bridge(name='br-docker',
|
cls.brdc = ctn_base.Bridge(name='br-docker-basic',
|
||||||
subnet='192.168.10.0/24',
|
subnet='192.168.10.0/24',
|
||||||
start_ip='192.168.10.128',
|
start_ip='192.168.10.128',
|
||||||
end_ip='192.168.10.254',
|
end_ip='192.168.10.254',
|
||||||
@ -80,7 +80,7 @@ class BgpSpeakerBasicTestJSONBase(base.BgpSpeakerScenarioTestJSONBase):
|
|||||||
# This keeps data which passes to a quagga container.
|
# This keeps data which passes to a quagga container.
|
||||||
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
||||||
router_id=cls.L_AS.router_id)
|
router_id=cls.L_AS.router_id)
|
||||||
cls.dr.set_addr_info(bridge='br-docker', ipv4=cls.public_gw)
|
cls.dr.set_addr_info(bridge='br-docker-basic', ipv4=cls.public_gw)
|
||||||
# quagga container
|
# quagga container
|
||||||
cls.dockerimg = ctn_base.DockerImage()
|
cls.dockerimg = ctn_base.DockerImage()
|
||||||
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
||||||
|
@ -30,7 +30,7 @@ class BgpSpeakerIpv4Test(test_base.BgpSpeakerProtoTestBase):
|
|||||||
|
|
||||||
RAS_MAX = 3
|
RAS_MAX = 3
|
||||||
ip_version = 4
|
ip_version = 4
|
||||||
public_gw = '192.168.10.1'
|
public_gw = '192.168.11.1'
|
||||||
MyScope = base.Scope(name='my-scope')
|
MyScope = base.Scope(name='my-scope')
|
||||||
PNet = base.Net(name='', net='172.24.6.0', mask=24,
|
PNet = base.Net(name='', net='172.24.6.0', mask=24,
|
||||||
cidr='172.24.6.0/24', router=None)
|
cidr='172.24.6.0/24', router=None)
|
||||||
@ -76,10 +76,10 @@ class BgpSpeakerIpv4Test(test_base.BgpSpeakerProtoTestBase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup_container(cls):
|
def resource_setup_container(cls):
|
||||||
cls.brdc = ctn_base.Bridge(name='br-docker',
|
cls.brdc = ctn_base.Bridge(name='br-docker-ipv4',
|
||||||
subnet='192.168.10.0/24',
|
subnet='192.168.11.0/24',
|
||||||
start_ip='192.168.10.128',
|
start_ip='192.168.11.128',
|
||||||
end_ip='192.168.10.254',
|
end_ip='192.168.11.254',
|
||||||
self_ip=True,
|
self_ip=True,
|
||||||
fixed_ip=cls.public_gw + '/24',
|
fixed_ip=cls.public_gw + '/24',
|
||||||
br_type=base.BRIDGE_TYPE)
|
br_type=base.BRIDGE_TYPE)
|
||||||
@ -88,7 +88,7 @@ class BgpSpeakerIpv4Test(test_base.BgpSpeakerProtoTestBase):
|
|||||||
# This keeps data which passes to a quagga container.
|
# This keeps data which passes to a quagga container.
|
||||||
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
||||||
router_id=cls.L_AS.router_id)
|
router_id=cls.L_AS.router_id)
|
||||||
cls.dr.set_addr_info(bridge='br-docker', ipv4=cls.public_gw)
|
cls.dr.set_addr_info(bridge='br-docker-ipv4', ipv4=cls.public_gw)
|
||||||
# quagga container
|
# quagga container
|
||||||
cls.dockerimg = ctn_base.DockerImage()
|
cls.dockerimg = ctn_base.DockerImage()
|
||||||
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
||||||
|
@ -76,7 +76,7 @@ class BgpSpeakerIpv6Test(test_base.BgpSpeakerProtoTestBase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup_container(cls):
|
def resource_setup_container(cls):
|
||||||
cls.brdc = ctn_base.Bridge(name='br-docker',
|
cls.brdc = ctn_base.Bridge(name='br-docker-ipv6',
|
||||||
subnet='2001:db8:a000::/64',
|
subnet='2001:db8:a000::/64',
|
||||||
start_ip='2001:db8:a000::8000',
|
start_ip='2001:db8:a000::8000',
|
||||||
end_ip='2001:db8:a000::fffe',
|
end_ip='2001:db8:a000::fffe',
|
||||||
@ -88,7 +88,7 @@ class BgpSpeakerIpv6Test(test_base.BgpSpeakerProtoTestBase):
|
|||||||
# This keeps data which passes to a quagga container.
|
# This keeps data which passes to a quagga container.
|
||||||
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
cls.dr = ctn_base.BGPContainer(name='dr', asn=int(cls.L_AS.asn),
|
||||||
router_id=cls.L_AS.router_id)
|
router_id=cls.L_AS.router_id)
|
||||||
cls.dr.set_addr_info(bridge='br-docker', ipv6=cls.public_gw)
|
cls.dr.set_addr_info(bridge='br-docker-ipv6', ipv6=cls.public_gw)
|
||||||
# quagga container
|
# quagga container
|
||||||
cls.dockerimg = ctn_base.DockerImage()
|
cls.dockerimg = ctn_base.DockerImage()
|
||||||
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
cls.q_img = cls.dockerimg.create_quagga(check_exist=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user