Lior Vernia has posted comments on this change.

Change subject: engine: Extract data from network entry once
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/37079/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 1308: 
Line 1309:         if (networks != null) {
Line 1310:             vds.getNetworks().clear();
Line 1311:             for (Entry<String, Object> entry : networks.entrySet()) {
Line 1312:                 Map<String, Object> network = (Map<String, Object>) 
entry.getValue();
> improper name
Fixed in the succeeding patch changing other existing variable names.
Line 1313:                 if (network != null) {
Line 1314:                     String interfaceName = (String) 
network.get(VdsProperties.INTERFACE);
Line 1315:                     VdsNetworkInterface networkIface = 
vdsInterfaces.get(interfaceName);
Line 1316:                     Map<String, Object> bridge =


Line 1310:             vds.getNetworks().clear();
Line 1311:             for (Entry<String, Object> entry : networks.entrySet()) {
Line 1312:                 Map<String, Object> network = (Map<String, Object>) 
entry.getValue();
Line 1313:                 if (network != null) {
Line 1314:                     String interfaceName = (String) 
network.get(VdsProperties.INTERFACE);
> I'm not familiar with data flowing through here, but from previous version 
They can occur, but the checks are still happening.

* If interfaceName is null, then networkIface will be null, and the same flow 
should occur.

* If bridges is null, then bridge will be null, and the same flow should occur.

Please check that I haven't made any errors.
Line 1315:                     VdsNetworkInterface networkIface = 
vdsInterfaces.get(interfaceName);
Line 1316:                     Map<String, Object> bridge =
Line 1317:                             (bridges == null) ? null : (Map<String, 
Object>) bridges.get(interfaceName);
Line 1318: 


Line 1312:                 Map<String, Object> network = (Map<String, Object>) 
entry.getValue();
Line 1313:                 if (network != null) {
Line 1314:                     String interfaceName = (String) 
network.get(VdsProperties.INTERFACE);
Line 1315:                     VdsNetworkInterface networkIface = 
vdsInterfaces.get(interfaceName);
Line 1316:                     Map<String, Object> bridge =
> improper name
Done
Line 1317:                             (bridges == null) ? null : (Map<String, 
Object>) bridges.get(interfaceName);
Line 1318: 
Line 1319:                     boolean bridgedNetwork = 
isBridgedNetwork(network);
Line 1320:                     HostNetworkQos qos = new 
HostNetworkQosMapper(network).deserialize();


Line 1321:                     Network net = createNetworkData(entry.getKey(), 
network);
Line 1322: 
Line 1323:                     List<VdsNetworkInterface> interfaces =
Line 1324:                             findNetworkInterfaces(vdsInterfaces, 
bridgesReported, networkIface,
Line 1325:                                     bridgesReported ? bridge : 
network);
> • 'bridge' is obtained from bridges map even if 'bridgesReported' is false,
Done
Line 1326:                     for (VdsNetworkInterface iface : interfaces) {
Line 1327:                         updateNetworkDetailsInInterface(iface,
Line 1328:                                 network,
Line 1329:                                 bridgedNetwork,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0dda9426feba172ce54a467c89628a0328edbc8
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: Martin Mucha <[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