Alona Kaplan has posted comments on this change. Change subject: core: Adds custom properties to VmNetworkInterface ......................................................................
Patch Set 12: (7 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/template/AddVmTemplateInterfaceCommand.java Line 93: } Line 94: Line 95: // validate custom properties Line 96: List<ValidationError> errors = Line 97: DevicePropertiesUtils.getInstance().validateProperties(clusterCompatibilityVersion, Done Line 98: VmDeviceGeneralType.INTERFACE, Line 99: getParameters().getInterface().getCustomProperties()); Line 100: if (!errors.isEmpty()) { Line 101: VmHandler.handleCustomPropertiesError(errors, getReturnValue().getCanDoActionMessages()); .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNetworkInterface.java Line 30: /** Line 31: * Device custom properties Line 32: */ Line 33: private String customProperties; Line 34: I discussed about it with them and we decided to do it in the next cleanup (and not as part of the feature). Line 35: /** Line 36: * Link State of the Nic. <BR> Line 37: * <code>true</code> if UP and <code>false</code> if DOWN. Line 38: */ Line 184: return builder.toString(); Line 185: } Line 186: Line 187: @Override Line 188: public int hashCode() { Done Line 189: final int prime = 31; Line 190: int result = super.hashCode(); Line 191: result = prime * result + (plugged ? 1231 : 1237); Line 192: result = prime * result + (linked ? 1231 : 1237); .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/VmNetworkInterfaceDaoDbFacadeImpl.java Line 38: entity.setVmName(rs.getString("vm_name")); Line 39: entity.setId(Guid.createGuidFromString(rs.getString("id"))); Line 40: entity.setSpeed((Integer) rs.getObject("speed")); Line 41: entity.setPlugged(rs.getBoolean("is_plugged")); Line 42: entity.setCustomProperties(rs.getString("custom_properties")); Custom properties is not a column in vmInterface table, just in the view. Therefore the addition shouldn't be reflected in fixtures.xml. Line 43: entity.setPortMirroring(rs.getBoolean("port_mirroring")); Line 44: entity.setLinked(rs.getBoolean("linked")); Line 45: return entity; Line 46: } .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java Line 61: } Line 62: Line 63: if (FeatureSupported.deviceCustomProperties(getParameters().getVm().getVdsGroupCompatibilityVersion())) { Line 64: map.put(VdsProperties.Custom, vmDevice.getCustomProperties()); Line 65: } Done Line 66: Line 67: VmInfoBuilder.addNetworkFiltersToNic(map, getParameters().getVm().getVdsGroupCompatibilityVersion()); Line 68: return map; Line 69: } .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/UpdateVmInterfaceVDSCommand.java Line 34: ? Collections.singletonList(nic.getNetworkName()) : Collections.<String> emptyList()); Line 35: Line 36: if (FeatureSupported.deviceCustomProperties(getParameters().getVm().getVdsGroupCompatibilityVersion())) { Line 37: deviceStruct.put(VdsProperties.Custom, getParameters().getVmDevice().getCustomProperties()); Line 38: } Done Line 39: Line 40: return deviceStruct; Line 41: } Line 42: .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java Line 487: } Line 488: Line 489: if (FeatureSupported.deviceCustomProperties(clusterVersion)) { Line 490: struct.put(VdsProperties.Custom, vmDevice.getCustomProperties()); Line 491: } Done Line 492: Line 493: addNetworkFiltersToNic(struct, clusterVersion); Line 494: } Line 495: -- To view, visit http://gerrit.ovirt.org/14815 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I218db49043ddf0524178f6ff903e605bc0fe661a Gerrit-PatchSet: 12 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches