Feature mgmtapi add sha256 to softwaremodules (#918)
* Add sha256 hash to softwaremodules in mgmt api Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Adapt rest docs Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Edit comments Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com> * Add proper license header Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
0e9caf3a88
commit
5feb5873c4
@@ -23,6 +23,9 @@ public class MgmtArtifactHash {
|
||||
@JsonProperty
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
private String sha256;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
@@ -33,9 +36,10 @@ public class MgmtArtifactHash {
|
||||
/**
|
||||
* Public constructor.
|
||||
*/
|
||||
public MgmtArtifactHash(final String sha1, final String md5) {
|
||||
public MgmtArtifactHash(final String sha1, final String md5, final String sha256) {
|
||||
this.sha1 = sha1;
|
||||
this.md5 = md5;
|
||||
this.sha256 = sha256;
|
||||
}
|
||||
|
||||
public String getSha1() {
|
||||
@@ -46,4 +50,8 @@ public class MgmtArtifactHash {
|
||||
return md5;
|
||||
}
|
||||
|
||||
public String getSha256() {
|
||||
return sha256;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
* checksum for uploaded content check
|
||||
* @param sha1Sum
|
||||
* checksum for uploaded content check
|
||||
* @param sha256Sum
|
||||
* checksum for uploaded content check
|
||||
*
|
||||
* @return In case all sets could successful be created the ResponseEntity
|
||||
* with status code 201 - Created but without ResponseBody. In any
|
||||
@@ -64,7 +66,8 @@ public interface MgmtSoftwareModuleRestApi {
|
||||
@RequestPart("file") final MultipartFile file,
|
||||
@RequestParam(value = "filename", required = false) final String optionalFileName,
|
||||
@RequestParam(value = "md5sum", required = false) final String md5Sum,
|
||||
@RequestParam(value = "sha1sum", required = false) final String sha1Sum);
|
||||
@RequestParam(value = "sha1sum", required = false) final String sha1Sum,
|
||||
@RequestParam(value = "sha256sum", required = false) final String sha256sum);
|
||||
|
||||
/**
|
||||
* Handles the GET request of retrieving all meta data of artifacts assigned
|
||||
|
||||
Reference in New Issue
Block a user