|
|
|
|
@@ -39,17 +39,17 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* Returns all artifacts of a given software module and target.
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* of the client
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target that matches to controller id
|
|
|
|
|
* @param softwareModuleId
|
|
|
|
|
* of the software module
|
|
|
|
|
* @return the response
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{targetid}/softwaremodules/{softwareModuleId}/artifacts", produces = {
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{controllerId}/softwaremodules/{softwareModuleId}/artifacts", produces = {
|
|
|
|
|
"application/hal+json", MediaType.APPLICATION_JSON_VALUE })
|
|
|
|
|
ResponseEntity<List<org.eclipse.hawkbit.ddi.json.model.DdiArtifact>> getSoftwareModulesArtifacts(
|
|
|
|
|
@PathVariable("tenant") final String tenant, @PathVariable("targetid") final String targetid,
|
|
|
|
|
ResponseEntity<List<DdiArtifact>> getSoftwareModulesArtifacts(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("controllerId") final String controllerId,
|
|
|
|
|
@PathVariable("softwareModuleId") final Long softwareModuleId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -57,16 +57,16 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target that matches to controller id
|
|
|
|
|
* @param request
|
|
|
|
|
* the HTTP request injected by spring
|
|
|
|
|
* @return the response
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{targetid}", produces = { "application/hal+json",
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{controllerId}", produces = { "application/hal+json",
|
|
|
|
|
MediaType.APPLICATION_JSON_VALUE })
|
|
|
|
|
ResponseEntity<DdiControllerBase> getControllerBase(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("targetid") final String targetid);
|
|
|
|
|
@PathVariable("controllerId") final String controllerId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handles GET {@link DdiArtifact} download request. This could be full or
|
|
|
|
|
@@ -74,8 +74,8 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* of the related target
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target
|
|
|
|
|
* @param softwareModuleId
|
|
|
|
|
* of the parent software module
|
|
|
|
|
* @param fileName
|
|
|
|
|
@@ -89,9 +89,9 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* {@link HttpStatus#OK} or in case of partial download
|
|
|
|
|
* {@link HttpStatus#PARTIAL_CONTENT}.
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{targetid}/softwaremodules/{softwareModuleId}/artifacts/{fileName}")
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/{fileName}")
|
|
|
|
|
ResponseEntity<InputStream> downloadArtifact(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("targetid") final String targetid,
|
|
|
|
|
@PathVariable("controllerId") final String controllerId,
|
|
|
|
|
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
|
|
|
|
@PathVariable("fileName") final String fileName);
|
|
|
|
|
|
|
|
|
|
@@ -100,8 +100,8 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* of the related target
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target
|
|
|
|
|
* @param softwareModuleId
|
|
|
|
|
* of the parent software module
|
|
|
|
|
* @param fileName
|
|
|
|
|
@@ -114,10 +114,10 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* @return {@link ResponseEntity} with status {@link HttpStatus#OK} if
|
|
|
|
|
* successful
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{targetid}/softwaremodules/{softwareModuleId}/artifacts/{fileName}"
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/{controllerId}/softwaremodules/{softwareModuleId}/artifacts/{fileName}"
|
|
|
|
|
+ DdiRestConstants.ARTIFACT_MD5_DWNL_SUFFIX, produces = MediaType.TEXT_PLAIN_VALUE)
|
|
|
|
|
ResponseEntity<Void> downloadArtifactMd5(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("targetid") final String targetid,
|
|
|
|
|
@PathVariable("controllerId") final String controllerId,
|
|
|
|
|
@PathVariable("softwareModuleId") final Long softwareModuleId,
|
|
|
|
|
@PathVariable("fileName") final String fileName);
|
|
|
|
|
|
|
|
|
|
@@ -126,8 +126,8 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* of the target that matches to controller id
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target
|
|
|
|
|
* @param actionId
|
|
|
|
|
* of the {@link DdiDeploymentBase} that matches to active
|
|
|
|
|
* actions.
|
|
|
|
|
@@ -139,10 +139,10 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* the HTTP request injected by spring
|
|
|
|
|
* @return the response
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/{targetid}/" + DdiRestConstants.DEPLOYMENT_BASE_ACTION
|
|
|
|
|
@RequestMapping(value = "/{controllerId}/" + DdiRestConstants.DEPLOYMENT_BASE_ACTION
|
|
|
|
|
+ "/{actionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
ResponseEntity<DdiDeploymentBase> getControllerBasedeploymentAction(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("targetid") @NotEmpty final String targetid,
|
|
|
|
|
@PathVariable("controllerId") @NotEmpty final String controllerId,
|
|
|
|
|
@PathVariable("actionId") @NotEmpty final Long actionId,
|
|
|
|
|
@RequestParam(value = "c", required = false, defaultValue = "-1") final int resource);
|
|
|
|
|
|
|
|
|
|
@@ -150,10 +150,10 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* This is the feedback channel for the {@link DdiDeploymentBase} action.
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* of the client
|
|
|
|
|
* @param feedback
|
|
|
|
|
* to provide
|
|
|
|
|
* @param targetid
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* of the target that matches to controller id
|
|
|
|
|
* @param actionId
|
|
|
|
|
* of the action we have feedback for
|
|
|
|
|
@@ -162,37 +162,37 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @return the response
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/{targetid}/" + DdiRestConstants.DEPLOYMENT_BASE_ACTION + "/{actionId}/"
|
|
|
|
|
@RequestMapping(value = "/{controllerId}/" + DdiRestConstants.DEPLOYMENT_BASE_ACTION + "/{actionId}/"
|
|
|
|
|
+ DdiRestConstants.FEEDBACK, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
ResponseEntity<Void> postBasedeploymentActionFeedback(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@Valid final DdiActionFeedback feedback, @PathVariable("targetid") final String targetid,
|
|
|
|
|
ResponseEntity<Void> postBasedeploymentActionFeedback(@Valid final DdiActionFeedback feedback,
|
|
|
|
|
@PathVariable("tenant") final String tenant, @PathVariable("controllerId") final String controllerId,
|
|
|
|
|
@PathVariable("actionId") @NotEmpty final Long actionId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This is the feedback channel for the config data action.
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* of the client
|
|
|
|
|
* @param configData
|
|
|
|
|
* as body
|
|
|
|
|
* @param targetid
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* to provide data for
|
|
|
|
|
* @param request
|
|
|
|
|
* the HTTP request injected by spring
|
|
|
|
|
*
|
|
|
|
|
* @return status of the request
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/{targetid}/"
|
|
|
|
|
@RequestMapping(value = "/{controllerId}/"
|
|
|
|
|
+ DdiRestConstants.CONFIG_DATA_ACTION, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
ResponseEntity<Void> putConfigData(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@Valid final DdiConfigData configData, @PathVariable("targetid") final String targetid);
|
|
|
|
|
ResponseEntity<Void> putConfigData(@Valid final DdiConfigData configData,
|
|
|
|
|
@PathVariable("tenant") final String tenant, @PathVariable("controllerId") final String controllerId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RequestMethod.GET method for the {@link DdiCancel} action.
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* @param targetid
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* ID of the calling target
|
|
|
|
|
* @param actionId
|
|
|
|
|
* of the action
|
|
|
|
|
@@ -201,10 +201,10 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
*
|
|
|
|
|
* @return the {@link DdiCancel} response
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/{targetid}/" + DdiRestConstants.CANCEL_ACTION
|
|
|
|
|
@RequestMapping(value = "/{controllerId}/" + DdiRestConstants.CANCEL_ACTION
|
|
|
|
|
+ "/{actionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
ResponseEntity<DdiCancel> getControllerCancelAction(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("targetid") @NotEmpty final String targetid,
|
|
|
|
|
@PathVariable("controllerId") @NotEmpty final String controllerId,
|
|
|
|
|
@PathVariable("actionId") @NotEmpty final Long actionId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -212,10 +212,10 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* the target.
|
|
|
|
|
*
|
|
|
|
|
* @param tenant
|
|
|
|
|
* of the request
|
|
|
|
|
* of the client
|
|
|
|
|
* @param feedback
|
|
|
|
|
* the {@link DdiActionFeedback} from the target.
|
|
|
|
|
* @param targetid
|
|
|
|
|
* @param controllerId
|
|
|
|
|
* the ID of the calling target
|
|
|
|
|
* @param actionId
|
|
|
|
|
* of the action we have feedback for
|
|
|
|
|
@@ -225,10 +225,11 @@ public interface DdiRootControllerRestApi {
|
|
|
|
|
* @return the {@link DdiActionFeedback} response
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/{targetid}/" + DdiRestConstants.CANCEL_ACTION + "/{actionId}/"
|
|
|
|
|
@RequestMapping(value = "/{controllerId}/" + DdiRestConstants.CANCEL_ACTION + "/{actionId}/"
|
|
|
|
|
+ DdiRestConstants.FEEDBACK, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
ResponseEntity<Void> postCancelActionFeedback(@PathVariable("tenant") final String tenant,
|
|
|
|
|
@Valid final DdiActionFeedback feedback, @PathVariable("targetid") @NotEmpty final String targetid,
|
|
|
|
|
ResponseEntity<Void> postCancelActionFeedback(@Valid final DdiActionFeedback feedback,
|
|
|
|
|
@PathVariable("tenant") final String tenant,
|
|
|
|
|
@PathVariable("controllerId") @NotEmpty final String controllerId,
|
|
|
|
|
@PathVariable("actionId") @NotEmpty final Long actionId);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|