Ori Liel has posted comments on this change.
Change subject: restapi: Start VM not as RunOnce
......................................................................
Patch Set 2:
(1 comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
Line 224: public Response start(Action action) {
Line 225: if (action.isSetVm()) {
Line 226: validateEnums(VM.class, action.getVm());
Line 227: RunVmOnceParams params =
Line 228: map(map(getEntity(entityType,
VdcQueryType.GetVmByVmId, new IdQueryParameters(guid), id, true),
I didn't understand Michael's comment about the mapping, so I won't follow up
on that.
I have a different comment, which is 'nice-to-have' - I think the following
structure for the method is a bit better:
RunVmParams params; //(notice that RunVmOnceParams inherits RunVmParams)
VdcActionType actionType;
if (action.isSetVm()) {
params = ...//init RunVmOnceParams
actionType = VdcActionType.RunVmOnce;
} else {
params = ...//init RumVmParams
actionType = VdcActionType.RunVm;
}
setRunAndPause(params) .... //applies for both
doAction(actionType, params, action) .... applies for both
Line 229: new VM()),
Line 230: new RunVmOnceParams(guid));
Line 231: VM vm = action.getVm();
Line 232: params = map(vm, params);
--
To view, visit http://gerrit.ovirt.org/19267
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I40be200c8742d8b31b7881926c59deaf345992ec
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[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