Moti Asayag has posted comments on this change.

Change subject: engine: read 'interface' property on from HostDevListByCaps 
result
......................................................................


Patch Set 2: Code-Review-1

(7 comments)

http://gerrit.ovirt.org/#/c/37385/2//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2015-02-03 14:09:20 +0200
Line 4: Commit:     Alona Kaplan <[email protected]>
Line 5: CommitDate: 2015-02-03 14:09:20 +0200
Line 6: 
Line 7: engine: read 'interface' property on from HostDevListByCaps result
please delete the "on"
Line 8: 
Line 9: Change-Id: Id4deae6a655fa1db96411a99a9189f975e3667dd


http://gerrit.ovirt.org/#/c/37385/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/HostDevice.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/HostDevice.java:

Line 14:     private String productId;
Line 15:     private String vendorName;
Line 16:     private String vendorId;
Line 17:     private String parentPhysicalFunction;
Line 18:     private Integer totalVirtualFunctions;
wouldn't it be better to have NetworkHostDevice which extends this entity with 
the new field ?
Line 19:     private String networkInterfaceName;
Line 20:     private Guid vmId;
Line 21: 
Line 22:     public Guid getHostId() {


Line 178: 
Line 179:     @Override
Line 180:     public String toString() {
Line 181:         return String.format("HostDevice{hostId=%s, deviceName='%s', 
parentDeviceName='%s', capability='%s', iommuGroup=%d, " +
Line 182:                 "productName='%s', productId='%s', vendorName='%s', 
vendorId='%s', parentPhysicalFunction='%s', totalVirtualFunctions=%s, 
networkInterfaceName='%s', vmId=%s}",
the lines are two big. please reformat / split to additional line.
Line 183:                 hostId, deviceName, parentDeviceName, capability, 
iommuGroup, productName, productId, vendorName, vendorId, 
parentPhysicalFunction, totalVirtualFunctions, networkInterfaceName, vmId);
Line 184:     }


http://gerrit.ovirt.org/#/c/37385/2/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/FixturesTool.java
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/FixturesTool.java:

Line 720:     public static final Guid CPU_PROFILE_1 = new 
Guid("fd81f1e1-785b-4579-ab75-1419ebb87052");
Line 721:     public static final Guid CPU_PROFILE_2 = new 
Guid("fd81f1e1-785b-4579-ab75-1419ebb87053");
Line 722: 
Line 723:     public static final Guid NETWORK_HOST_DEVICE_HOST_ID = new 
Guid("afce7a39-8e8c-4819-ba9c-796d316592e6");
Line 724:     public static final String NETWORK_HOST_DEVICE_DEVICE_NAME = 
"net_enp5s16f4_3e_fa_b0_f6_48_a3";
s/NETWORK_HOST_DEVICE_DEVICE_NAME/NETWORK_HOST_DEVICE_NAME


http://gerrit.ovirt.org/#/c/37385/2/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/HostDeviceDaoTest.java
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/HostDeviceDaoTest.java:

Line 50:     }
Line 51: 
Line 52:     @Test
Line 53:     public void saveNetworkDevice() {
Line 54: 
please delete the first empty line
Line 55:         HostDevice netDevice = generateNewEntity();
Line 56: 
Line 57:         netDevice.setCapability("net");
Line 58:         netDevice.setNetworkInterfaceName("eth1");


http://gerrit.ovirt.org/#/c/37385/2/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 1959:             if (params.containsKey(VdsProperties.TOTAL_VFS)) {
Line 1960:                 
device.setTotalVirtualFunctions(Integer.parseInt(params.get(VdsProperties.TOTAL_VFS).toString()));
Line 1961:             }
Line 1962:             if 
(params.containsKey(VdsProperties.NET_INTERFACE_NAME)) {
Line 1963:                 
device.setNetworkInterfaceName(params.get(VdsProperties.NET_INTERFACE_NAME).toString());
no chance for the key to be null ?
Line 1964:             }
Line 1965: 
Line 1966:             // if the device is attached to running VM, the `vmId` 
property will be set
Line 1967:             if (entry.getValue().containsKey(VdsProperties.VM_ID)) {


http://gerrit.ovirt.org/#/c/37385/2/packaging/dbscripts/upgrade/03_06_0870_add_iface_column_to_host_device_table.sql
File 
packaging/dbscripts/upgrade/03_06_0870_add_iface_column_to_host_device_table.sql:

Line 1: select fn_db_add_column('host_device', 'net_iface_name', 
'VARCHAR(255)');
isn't 255 too long ?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id4deae6a655fa1db96411a99a9189f975e3667dd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Betak <[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