Skip to content

Commit 39c6848

Browse files
committed
Fix security_groups for c8/suse
1 parent 0390281 commit 39c6848

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/vm/network/security_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,13 +1369,13 @@ def verify_network_rules(vm_name, vm_id, vm_ip, vm_ip6, vm_mac, vif, brname, sec
13691369
vm_id = vm_name.split("-")[-2]
13701370

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

13771377
if vif is None:
1378-
vif = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f1" % (vm_name, vm_mac)).strip()
1378+
vif = execute("virsh domiflist %s |grep -w '%s' | awk '{print $1}'" % (vm_name, vm_mac)).strip()
13791379
if not vif:
13801380
print("Cannot find vif")
13811381
sys.exit(1)

0 commit comments

Comments
 (0)