Yair Zaslavsky has posted comments on this change.
Change subject: core: Adds custom properties to VmNetworkInterface
......................................................................
Patch Set 12: (3 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,
Would be awesome if this code that repeats itself in several places can go to
some "VmNetworkInterfaceValidator" (see StoragePoolValidator as reference)
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 184: return builder.toString();
Line 185: }
Line 186:
Line 187: @Override
Line 188: public int hashCode() {
please add to hashcode and equals
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"));
the addition of this should be reflected also at fixtures.xml
Line 43:
entity.setPortMirroring(rs.getBoolean("port_mirroring"));
Line 44: entity.setLinked(rs.getBoolean("linked"));
Line 45: return entity;
Line 46: }
--
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches