Ori Liel has posted comments on this change. Change subject: restapi: Add Reboot support ......................................................................
Patch Set 13: (3 comments) .................................................... File backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd Line 2227: <xs:sequence> Line 2228: <xs:element name="enabled" type="xs:boolean" minOccurs="0" maxOccurs="1"/> Line 2229: <xs:element name="priority" type="xs:int" minOccurs="0" maxOccurs="1"/> Line 2230: <xs:element name="powerdown_forced" type="xs:boolean" minOccurs="0" maxOccurs="1" /> Line 2231: <xs:element name="graceful_timeout" type="xs:int" minOccurs="0" maxOccurs="1" /> still no reuse of grace-period Also, in Patch-Set 10 you add graceful_timeout twice, and here only once. Is this on purpose? Line 2232: </xs:sequence> Line 2233: </xs:complexType> Line 2234: Line 2235: <xs:element name="display" type="Display"/> .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java Line 214: public Response shutdown(Action action) { Line 215: // REVISIT add waitBeforeShutdown Action paramater Line 216: // to api schema before next sub-milestone Line 217: Line 218: org.ovirt.engine.core.common.businessentities.VM vm = getEntity(entityType, I agree with Michael's comment that this should be done in the engine. I think using 'null' in the API between clients (GUI, REST) and engine isn't a great idea. Clients may naively activate the action without initializing the grace-period. Having 'null' mean something can be very confusing. Perhaps you could add a flag to the parameters class instead? ('useGlobalSettings=true/false)? I f the API between engine and clients does not change, then indedd you would have to fetch the VM from the engine, as you're doing now. Line 219: VdcQueryType.GetVmByVmId, Line 220: new IdQueryParameters(guid), Line 221: "VM"); Line 222: return doAction(VdcActionType.ShutdownVm, .................................................... File backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmResourceTest.java Line 559: PowerDownVmParameters.class, Line 560: new String[] { "VmId" }, Line 561: new Object[] { GUIDS[0] })); Line 562: Line 563: verifyActionResponse(resource.reboot(new Action())); no checking flow when user sets grace period in the action Line 564: } Line 565: Line 566: @Test Line 567: public void testPowerCycle() throws Exception { -- To view, visit http://gerrit.ovirt.org/16194 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9a5007a1364392830e4112e57ec54a7025fee02 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches