
Tal Nisan has submitted this change and it was merged. Change subject: restapi: Don't figure out NIC profile during V3 update ...................................................................... restapi: Don't figure out NIC profile during V3 update Currently the V3 compatibility layer tries to figure out an appropriate NIC profile when a VM NIC is added or updated and no NIC profile is explicitly provided. This works fine for adding, but during updates it may select the wrong profile, thus randomly changing the network that the NIC is attached to. To avoid that this patch changes the V3 adapter so that it only tries to figure out the profile when the "network" or "port_mirroring" attributes are included in the update, as any change to those attributes requires a change of the VNIC profile. In addition, to make things less random, the patch also changes the logic to select the profile so that it sorts the candidates alphabetically by name and chooses the first one. Change-Id: Iaa953fcc200a1e175975e3dade9dc3a67d234f27 Bug-Url: https://bugzilla.redhat.com/1342054 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit da9f1e949abb98a80ab63b6c2a46cd2a8e7426b3) --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/helpers/V3NICHelper.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/servers/V3VmNicServer.java 2 files changed, 8 insertions(+), 2 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/59179 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa953fcc200a1e175975e3dade9dc3a67d234f27 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-4.0 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>