Juan Hernandez has posted comments on this change. Change subject: restapi: Move VM remove from collection to entity ......................................................................
Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/42074/1/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java: Line 173: Line 174: @Override Line 175: public Response remove() { Line 176: get(); Line 177: return performAction(VdcActionType.RemoveVm, new RemoveVmParameters(asGuid(id), false)); Use "guid" instead of "asGuid(id)". Line 178: } Line 179: Line 180: @Override Line 181: @Consumes({ "application/xml", "application/json", "application/x-yaml" }) Line 177: return performAction(VdcActionType.RemoveVm, new RemoveVmParameters(asGuid(id), false)); Line 178: } Line 179: Line 180: @Override Line 181: @Consumes({ "application/xml", "application/json", "application/x-yaml" }) Remove this @Consumes annotation, is part of the interface already. Line 182: public Response remove(Action action) { Line 183: get(); Line 184: boolean forceRemove = action != null && action.isSetForce() ? action.isForce() : false; Line 185: RemoveVmParameters params = new RemoveVmParameters(asGuid(id), forceRemove); Line 181: @Consumes({ "application/xml", "application/json", "application/x-yaml" }) Line 182: public Response remove(Action action) { Line 183: get(); Line 184: boolean forceRemove = action != null && action.isSetForce() ? action.isForce() : false; Line 185: RemoveVmParameters params = new RemoveVmParameters(asGuid(id), forceRemove); Use "guid" instead of "asGuid(id)". Line 186: // If detach only is set we do not remove the VM disks Line 187: if (action != null && action.isSetVm() && action.getVm().isSetDisks() Line 188: && action.getVm().getDisks().isSetDetachOnly()) { Line 189: params.setRemoveDisks(false); -- To view, visit https://gerrit.ovirt.org/42074 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1d653075475a136eccf4c2ea0bf3921dae3e1bb8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ori Liel <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
