Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/vm/network/security_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,13 +1369,13 @@ def verify_network_rules(vm_name, vm_id, vm_ip, vm_ip6, vm_mac, vif, brname, sec
vm_id = vm_name.split("-")[-2]

if brname is None:
brname = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f3" % (vm_name, vm_mac)).strip()
brname = execute("virsh domiflist %s |grep -w '%s' | awk '{print $3}'" % (vm_name, vm_mac)).strip()
if not brname:
print("Cannot find bridge")
sys.exit(1)

if vif is None:
vif = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f1" % (vm_name, vm_mac)).strip()
vif = execute("virsh domiflist %s |grep -w '%s' | awk '{print $1}'" % (vm_name, vm_mac)).strip()
if not vif:
print("Cannot find vif")
sys.exit(1)
Expand Down
4 changes: 2 additions & 2 deletions test/integration/component/test_multiple_nic_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def setUpClass(cls):
cls.virtual_machine1.default_network_id = nic.networkid
break
except Exception as e:
cls.fail(f"Exception while deploying virtual machine: {e}")
cls.fail("Exception while deploying virtual machine: %s" % {e})

try:
cls.virtual_machine2 = VirtualMachine.create(
Expand All @@ -243,7 +243,7 @@ def setUpClass(cls):
cls.virtual_machine2.default_network_id = nic.networkid
break
except Exception as e:
cls.fail(f"Exception while deploying virtual machine: {e}")
cls.fail("Exception while deploying virtual machine: %s" % {e})

cls._cleanup.append(cls.virtual_machine1)
cls._cleanup.append(cls.virtual_machine2)
Expand Down