Mike Kolesnik has posted comments on this change.
Change subject: engine: Save VM Guest Agent network devices
......................................................................
Patch Set 5: (3 inline comments)
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 162:
getDbFacade().getVmGuestAgentInterfaceDao().removeAllForVm(vmId);
Line 163: }
Line 164:
Line 165: for (List<VmGuestAgentInterface> nics :
vmGuestAgentNics.values()) {
Line 166: if (nics != null && !nics.isEmpty()) {
No reason to check 'is not empty'
Line 167: for (VmGuestAgentInterface nic :
nics) {
Line 168:
getDbFacade().getVmGuestAgentInterfaceDao().save(nic);
Line 169: }
Line 170: }
Line 895: if (_vmDynamicToSave.containsKey(vm.getId()))
{
Line 896:
_vmDynamicToSave.get(vm.getId()).setGuestAgentNicHash(guestAgentNicHash);
Line 897: _vmDynamicToSave.get(vm.getId())
Line 898:
.setvm_ip(extractVmIpsFromGuestAgentInterfaces(vmGuestAgentInterfaces));
Line 899: } else {
In this case then, how would it have the new IP & hash values?
Line 900: AddVmDynamicToList(vmDynamic);
Line 901: }
Line 902: }
Line 903: }
Line 911: }
Line 912:
Line 913: List<String> ips = new ArrayList<String>();
Line 914: for (VmGuestAgentInterface nic : nics) {
Line 915: if (nic.getIpv4Addresses() != null &&
!nic.getIpv4Addresses().isEmpty()) {
No need to check 'is not empty'
Line 916: ips.addAll(nic.getIpv4Addresses());
Line 917: }
Line 918: }
Line 919: return ips.isEmpty() ? null : StringUtils.join(ips, " ");
--
To view, visit http://gerrit.ovirt.org/10232
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9ffea1862feef78c25a71a3d1735d8fa630437f3
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches