mirror of https://github.com/apache/cloudstack.git
security group: fix component test test_multiple_nic_support.py failures (#5348)
This PR fixes component test failure with test_multiple_nic_support.py, in advanced zone with security groups. Co-authored-by: dahn <daan.hoogland@gmail.com>
This commit is contained in:
parent
c1fc002359
commit
f9fe9da734
|
|
@ -1453,7 +1453,7 @@ def verify_iptables_rules_for_bridge(brname):
|
|||
expected_rules.append("-A %s -m state --state RELATED,ESTABLISHED -j ACCEPT" % (brfw))
|
||||
expected_rules.append("-A %s -m physdev --physdev-is-in --physdev-is-bridged -j %s" % (brfw, brfwin))
|
||||
expected_rules.append("-A %s -m physdev --physdev-is-out --physdev-is-bridged -j %s" % (brfw, brfwout))
|
||||
phydev = execute("ip link show type bridge | awk '/^%s[ \t]/ {print $4}'" % brname ).strip()
|
||||
phydev = get_bridge_physdev(brname)
|
||||
expected_rules.append("-A %s -m physdev --physdev-out %s --physdev-is-bridged -j ACCEPT" % (brfw, phydev))
|
||||
|
||||
rules = execute("iptables-save |grep -w %s |grep -v \"^:\"" % brfw).split('\n')
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
|||
cls.virtual_machine1.default_network_id = nic.networkid
|
||||
break
|
||||
except Exception as e:
|
||||
cls.fail("Exception while deploying virtual machine: %s" % e)
|
||||
cls.fail(f"Exception while deploying virtual machine: {e}")
|
||||
|
||||
try:
|
||||
cls.virtual_machine2 = VirtualMachine.create(
|
||||
|
|
@ -243,7 +243,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
|||
cls.virtual_machine2.default_network_id = nic.networkid
|
||||
break
|
||||
except Exception as e:
|
||||
cls.fail("Exception while deploying virtual machine: %s" % e)
|
||||
cls.fail(f"Exception while deploying virtual machine: {e}")
|
||||
|
||||
cls._cleanup.append(cls.virtual_machine1)
|
||||
cls._cleanup.append(cls.virtual_machine2)
|
||||
|
|
@ -306,7 +306,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
|||
if len(result) > 0:
|
||||
self.fail("The iptables/ebtables rules for nic %s on vm %s on host %s are not correct" %(nic.ipaddress, vm.instancename, host.name))
|
||||
|
||||
@attr(tags=["adeancedsg"], required_hardware="false")
|
||||
@attr(tags=["advancedsg"], required_hardware="false")
|
||||
def test_01_create_vm_with_multiple_nics(self):
|
||||
"""Create Vm with multiple NIC's
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue