Mike Kolesnik has posted comments on this change.

Change subject: core: methods to migrate macPool content to another instance.
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.ovirt.org/#/c/26794/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/MacPoolManagerRanges.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/MacPoolManagerRanges.java:

Line 383:             }
Line 384:             return null;
Line 385:         }
Line 386: 
Line 387:         private void copyAllocatedCustomMacs(MacPoolManagerStrategy 
macPoolManagerStrategy) {
The parameter would be source then, or dest?

Seems logical that it will be the source to copy from..
Line 388:             for (Long mac : customMacs) {
Line 389:                 final int count = customMacs.count(mac);
Line 390:                 final String macString = 
MacAddressRangeUtils.macAddressToString(mac);
Line 391: 


Line 385:         }
Line 386: 
Line 387:         private void copyAllocatedCustomMacs(MacPoolManagerStrategy 
macPoolManagerStrategy) {
Line 388:             for (Long mac : customMacs) {
Line 389:                 final int count = customMacs.count(mac);
This can be inlined
Line 390:                 final String macString = 
MacAddressRangeUtils.macAddressToString(mac);
Line 391: 
Line 392:                 for (int i = 0; i < count; i++) {
Line 393:                     macPoolManagerStrategy.forceAddMac(macString);


Line 394:                 }
Line 395:             }
Line 396:         }
Line 397: 
Line 398:         private void copyAllocatedMacs(MacPoolManagerStrategy 
macPoolManagerStrategy) {
Same here..
Line 399:             for (Range range : ranges) {
Line 400:                 range.copyAllocatedMacs(macPoolManagerStrategy);
Line 401:             }
Line 402:         }


Line 543: 
Line 544:                 return result;
Line 545:             }
Line 546: 
Line 547:             public void copyAllocatedMacs(MacPoolManagerStrategy 
macPoolManagerStrategy) {
Same here..
Line 548:                 for (int macIndex = 0; macIndex < size; macIndex++) {
Line 549:                     int count = macUsageCount[macIndex];
Line 550:                     long mac = offset + macIndex;
Line 551:                     final String macString = 
MacAddressRangeUtils.macAddressToString(mac);


-- 
To view, visit http://gerrit.ovirt.org/26794
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I72aa0f673811731cce0affd8a3d48cf75944e189
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to