Added support for cdn download url for mgmt API and tests

Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
This commit is contained in:
Shruthi Manavalli Ramanna
2023-06-02 19:09:31 +02:00
parent 43b54b4c36
commit 0759fd80b0
12 changed files with 115 additions and 16 deletions

View File

@@ -271,6 +271,12 @@ public final class MgmtRestConstants {
*/
public static final String AUTH_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/userinfo";
/**
* The artifact download URL type
*/
public static final String ARTIFACT_DOWNLOAD_URL_TYPE = "downloadurltype";
// constant class, private constructor.
private MgmtRestConstants() {

View File

@@ -98,9 +98,10 @@ public interface MgmtSoftwareModuleRestApi {
@GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING
+ "/{softwareModuleId}/artifacts/{artifactId}", produces = { MediaTypes.HAL_JSON_VALUE,
MediaType.APPLICATION_JSON_VALUE })
@ResponseBody
ResponseEntity<MgmtArtifact> getArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId);
@ResponseBody ResponseEntity<MgmtArtifact> getArtifact(
@PathVariable("softwareModuleId") final Long softwareModuleId,
@PathVariable("artifactId") final Long artifactId,
@RequestParam(value = MgmtRestConstants.ARTIFACT_DOWNLOAD_URL_TYPE, required = false) final String artifactDownloadUrlType);
/**
* Handles the DELETE request for a single SoftwareModule.