Tomas Jelinek has posted comments on this change. Change subject: restapi: added support for io_threads ......................................................................
Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/40094/4/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmBaseMapper.java File backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmBaseMapper.java: Line 182: model.setMemory((long) entity.getMemSizeMb() * BYTES_PER_MB); Line 183: Line 184: if (entity.getNumOfIoThreads() != 0) { Line 185: model.setNumOfIothreads(entity.getNumOfIoThreads()); Line 186: } > Yes, it is better to render the value returned by the backend, without any ok Line 187: Line 188: if (entity.getVdsGroupId() != null) { Line 189: Cluster cluster = new Cluster(); Line 190: cluster.setId(entity.getVdsGroupId().toString()); https://gerrit.ovirt.org/#/c/40094/4/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java File backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java: Line 168: staticVm.setMigrationDowntime(entity.getMigrationDowntime()); Line 169: staticVm.setMinAllocatedMem(entity.getMinAllocatedMem()); Line 170: if (FeatureSupported.isIoThreadsSupported(clusterVersion)) { Line 171: staticVm.setNumOfIoThreads(entity.getNumOfIoThreads()); Line 172: } > In that case, shouldn't the backend just ignore the setting of the IOThread in that case the backend could not really distinguish between the user setting the value up incorrectly so he has to be warned about it by validation error and between a proper use of the instance type/blank template on an older cluster. In other words, if you are creating a VM in old cluster and use a blank template and set 5 IO threads for your VM it is different than if you just use a blank template which has 5 IO Threads set. The first is a user mistake, the second is a supported use case. But the backend just gets a VM object. Line 173: return staticVm; Line 174: } Line 175: Line 176: @Mapping(from = VM.class, to = VmStatic.class) -- To view, visit https://gerrit.ovirt.org/40094 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e6f9b76d424027ef21e17cc3b3c9ffd7023b52d Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches