Skip to content

Commit

Permalink
Add 2 more method into modify_vm_iface()
Browse files Browse the repository at this point in the history
Add "del_target" and "del_alias" into the modify_vm_iface().

Signed-off-by: Yalan <[email protected]>
  • Loading branch information
yalzhang authored and ana committed Aug 9, 2021
1 parent 578e8bc commit 28855a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions virttest/utils_test/libvirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3562,6 +3562,8 @@ def modify_vm_iface(vm_name, oper, iface_dict, index=0, virsh_instance=virsh):
del_port = iface_dict.get('del_port')
del_mac = iface_dict.get('del_mac')
del_coalesce = iface_dict.get('del_coalesce')
del_alias = iface_dict.get('del_alias')
del_target = iface_dict.get('del_target')
if iface_type:
iface.type_name = iface_type
if iface_driver:
Expand Down Expand Up @@ -3601,6 +3603,10 @@ def modify_vm_iface(vm_name, oper, iface_dict, index=0, virsh_instance=virsh):
iface.del_mac_address()
if del_coalesce:
iface.xmltreefile.remove_by_xpath('coalesce')
if del_alias:
iface.del_alias()
if del_target:
iface.del_target()
if iface_filter:
if iface_filter_parameters:
iface.filterref = iface.new_filterref(name=iface_filter, parameters=iface_filter_parameters)
Expand Down

0 comments on commit 28855a4

Please sign in to comment.