Michael Pasternak has posted comments on this change.
Change subject: restapi: RFE-Adding External Tasks Support
......................................................................
Patch Set 5: (3 inline comments)
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
Line 3211: request:
Line 3212: body:
Line 3213: parameterType: Action
Line 3214: signatures:
Line 3215: - mandatoryArguments: {status.state: 'xs:string'}
action.status.state
Line 3216: optionalArguments: {action.force: 'xs:boolean'}
Line 3217: urlparams: {}
Line 3218: headers:
Line 3219: Content-Type: {value: application/xml|json, required: true}
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStepsResource.java
Line 40: @Override
Line 41: public Response add(Step step) {
Line 42: validateParameters(step, "type", "status.state" ,
"description");
Line 43: String id;
Line 44: if (step.isSetParentStep() && step.getParentStep().getId() !=
null) {
this way you'll go in to the 'else' while intention was different (if you
already have <paranet_step/> specified)
1. please remove new condition
2. add validateParameters(step, "type", "step.parentStep.id"); in this if()
Line 45: id = step.getParentStep().getId();
Line 46: }
Line 47: else {
Line 48: id = jobId.toString();
....................................................
File
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/StepMapper.java
Line 43: public static org.ovirt.engine.core.common.job.Step map(Step step,
Line 44: org.ovirt.engine.core.common.job.Step entity) {
Line 45: org.ovirt.engine.core.common.job.Step target =
Line 46: entity != null ? entity : new
org.ovirt.engine.core.common.job.Step();
Line 47: target.setId(new Guid(step.getId()));
use GuidUtils.asGuid() as it formats BAD_REQUEST on format exception, while new
Guid() just throws runtime exception
Line 48: if (step.isSetParentStep()) {
Line 49:
target.setParentStepId(Guid.createGuidFromString(step.getParentStep().getId()));
Line 50: }
Line 51: target.setJobId(GuidUtils.asGuid(step.getJob().getId()));
--
To view, visit http://gerrit.ovirt.org/16159
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id1b95a094dc586e6ebbdacd44e0a034e91601952
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[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