Alona Kaplan has posted comments on this change.

Change subject: engine: Calculate "true" host network usage
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/31000/1/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VdsNetworkInterface.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VdsNetworkInterface.java:

Line 248:      * Checks whether an interface is a VLAN device.
Line 249:      *
Line 250:      * @return whether an interface is a VLAN device.
Line 251:      */
Line 252:     public boolean isVlanDevice() {
NetowrkUtils.isVlan(VdsNetworkInterface nic) is used for this purpose.
So whether refactor all the others to use your method and remove the method 
from NetworkUtils (prefered:)), or remove your new method.
Line 253:         return vlanId != null;
Line 254:     }
Line 255: 
Line 256:     /**


http://gerrit.ovirt.org/#/c/31000/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java:

Line 697:                     
iface.getStatistics().setTransmitDropRate(tx_dropped != null ? tx_dropped : 0);
Line 698:                     iface.setSpeed(AssignIntValue(dict, 
VdsProperties.INTERFACE_SPEED));
Line 699:                     
iface.getStatistics().setStatus(AssignInterfaceStatusValue(dict, 
VdsProperties.iface_status));
Line 700: 
Line 701:                     if (!Boolean.TRUE.equals(iface.getBonded()) && 
!iface.isVlanDevice()) {
why not-

if (!iface.getBondSlave() && !iface.isVlanDevice()) {
   usageNics.add(iface.getName());
}

?
Line 702:                         usageNics.add(iface.isBondSlave() ? 
iface.getBondName() : iface.getName());
Line 703:                     }
Line 704:                 }
Line 705:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I71adf32f76414fe34d433177741e73529959992b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Moti Asayag <[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