diff --git a/docs/content/apis/ddi_api.md b/docs/content/apis/ddi_api.md index 0424f6386b..c062e91034 100644 --- a/docs/content/apis/ddi_api.md +++ b/docs/content/apis/ddi_api.md @@ -25,6 +25,8 @@ DDI `status.execution` type | handling by update server CANCELED | This is send by the target as confirmation of a cancellation request by the update server. | CANCELED REJECTED | This is send by the target in case an update of a cancellation is rejected, i.e. cannot be fulfilled at this point in time. Note: the target should send a CLOSED->ERROR if it believes it will not be able to proceed the action at all. | WARNING CLOSED | Target completes the action either with `status.result.finished` SUCCESS or FAILURE as result. Note: DDI defines also a status NONE which will not be interpreted by the update server and handled like SUCCESS. | ERROR (DDI FAILURE) or FINISHED (DDI SUCCESS or NONE) +DOWNLOAD | This can be used by the target to inform that it is downloading artifacts of the action. | DOWNLOAD +DOWNLOADED | This can be used by the target to inform that it has downloaded artifacts of the action. | DOWNLOADED PROCEEDING | This can be used by the target to inform that it is working on the action. | RUNNING SCHEDULED | This can be used by the target to inform that it scheduled on the action. | RUNNING RESUMED | This can be used by the target to inform that it continued to work on the action. | RUNNING diff --git a/hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/ddi/documentation/RootControllerDocumentationTest.java b/hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/ddi/documentation/RootControllerDocumentationTest.java index b596e86212..8470d55f3b 100644 --- a/hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/ddi/documentation/RootControllerDocumentationTest.java +++ b/hawkbit-rest/hawkbit-rest-docs/src/test/java/org/eclipse/hawkbit/rest/ddi/documentation/RootControllerDocumentationTest.java @@ -64,7 +64,7 @@ public void setUp() { } @Test - @Description("This base resource can be regularly polled by the controller on the provisiong target or device " + @Description("This base resource can be regularly polled by the controller on the provisioning target or device " + "in order to retrieve actions that need to be executed. In this case including a config pull request and a deployment. The resource supports Etag based modification " + "checks in order to save traffic.") @WithUser(tenantId = "TENANT_ID", authorities = "ROLE_CONTROLLER", allSpPermissions = true) @@ -91,7 +91,7 @@ public void getControllerBaseWithOpenDeplyoment() throws Exception { } @Test - @Description("This base resource can be regularly polled by the controller on the provisiong target or device " + @Description("This base resource can be regularly polled by the controller on the provisioning target or device " + "in order to retrieve actions that need to be executed. In this case including a config pull request and a cancellation. " + "Note: as with deployments the cancel action has to be confirmed or rejected in order to move on to the next action.") @WithUser(tenantId = "TENANT_ID", authorities = "ROLE_CONTROLLER", allSpPermissions = true) @@ -120,8 +120,8 @@ public void getControllerBaseWithOpenDeploymentCancellation() throws Exception { } @Test - @Description("The SP server might cancel an operation, e.g. an unfinished update has a sucessor. " - + "It is up to the provisiong target to decide either to accept the cancelation or reject it.") + @Description("The SP server might cancel an operation, e.g. an unfinished update has a successor. " + + "It is up to the provisioning target to decide either to accept the cancellation or reject it.") @WithUser(tenantId = "TENANT_ID", authorities = "ROLE_CONTROLLER", allSpPermissions = true) public void getControllerCancelAction() throws Exception { final DistributionSet set = testdataFactory.createDistributionSet("one"); @@ -187,7 +187,7 @@ public void postCancelActionFeedback() throws Exception { requestFieldWithPath("status.execution") .description(DdiApiModelProperties.TARGET_EXEC_STATUS).type("enum") .attributes(key("value").value( - "['closed', 'proceeding', 'canceled','scheduled', 'rejected', 'resumed']")), + "['closed', 'proceeding', 'download', 'downloaded', 'canceled','scheduled', 'rejected', 'resumed']")), requestFieldWithPath("status.result") .description(DdiApiModelProperties.TARGET_RESULT_VALUE), requestFieldWithPath("status.result.finished") @@ -390,7 +390,7 @@ public void postBasedeploymentActionFeedback() throws Exception { + DdiRestConstants.DEPLOYMENT_BASE_ACTION + "/{actionId}/feedback", tenantAware.getCurrentTenant(), target.getControllerId(), actionId) .content( - JsonBuilder.deploymentActionFeedback(actionId.toString(), "closed", "Feddback message")) + JsonBuilder.deploymentActionFeedback(actionId.toString(), "closed", "Feedback message")) .contentType(MediaType.APPLICATION_JSON_UTF8).accept(MediaTypes.HAL_JSON_VALUE)) .andDo(MockMvcResultPrinter.print()).andExpect(status().isOk()) .andDo(this.document.document( @@ -404,7 +404,7 @@ public void postBasedeploymentActionFeedback() throws Exception { requestFieldWithPath("status.execution") .description(DdiApiModelProperties.TARGET_EXEC_STATUS).type("enum") .attributes(key("value").value( - "['closed', 'proceeding', 'canceled','scheduled', 'rejected', 'resumed']")), + "['closed', 'proceeding', 'download', 'downloaded', 'canceled','scheduled', 'rejected', 'resumed']")), requestFieldWithPath("status.result") .description(DdiApiModelProperties.TARGET_RESULT_VALUE), requestFieldWithPath("status.result.finished")