Moti Asayag has posted comments on this change.
Change subject: core: Adds custom properties to VmDevice
......................................................................
Patch Set 13: Looks good to me, but someone else must approve
(2 inline comments)
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDeviceDAODbFacadeImpl.java
Line 50: .addValue("is_managed", entity.getIsManaged())
Line 51: .addValue("is_plugged", entity.getIsPlugged())
Line 52: .addValue("is_readonly", entity.getIsReadOnly())
Line 53: .addValue("alias", entity.getAlias())
Line 54: .addValue("custom_properties",
suggestion: how about extracting this into a method as exact code is being
invoked twice and probably once VM.customProperties will be modified from
String to Map it would be handy there as well ?
Line 55: entity.getCustomProperties() == null ? null :
SerializationFactory
Line 56: .getSerializer()
Line 57:
.serialize(entity.getCustomProperties()));
Line 58: }
Line 159: String customProperties =
rs.getString("custom_properties");
Line 160: if (StringUtils.isEmpty(customProperties)) {
Line 161: vmDevice.setCustomProperties(new
LinkedHashMap<String, String>());
Line 162: } else {
Line 163: vmDevice.setCustomProperties(SerializationFactory
same here.
Line 164: .getDeserializer()
Line 165: .deserialize(customProperties,
LinkedHashMap.class));
Line 166: }
Line 167:
--
To view, visit http://gerrit.ovirt.org/14814
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I07daa5cccbf8e3cbd6b4191bbc8ebf0729d9d9a0
Gerrit-PatchSet: 13
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: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches