Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for download status of ddi feedback #985

Merged
merged 5 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/apis/ddi_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand All @@ -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")
Expand Down