From 88145928bda97f548f132afd2264fbed62813b29 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Fri, 9 Nov 2018 21:45:53 +0000 Subject: [PATCH] networking --- lib/helpers/ovirt.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/helpers/ovirt.rb b/lib/helpers/ovirt.rb index 90f306737..625ef38c4 100644 --- a/lib/helpers/ovirt.rb +++ b/lib/helpers/ovirt.rb @@ -227,6 +227,8 @@ class OVirtFunctions # save profile changes nic.vnic_profile = selected_profile update = {} + nics_service.nic_service(nic.id).update(nic, update) + nic.interface = OvirtSDK4::NicInterface::E1000 # if the vm is up we need to unplug the nic while we change the interface if vm.status != 'down' @@ -237,7 +239,7 @@ class OVirtFunctions nics_service.nic_service(nic.id).update(nic, update) # check if changes saved - nic_updated = nics_service.list.last + nic_updated = nics_service.list.first Print.info "#{nic_updated.vnic_profile.name}" if nic_updated.vnic_profile != selected_profile Print.err "NIC profile may not have saved correctly... trying again."