|
|
|
|
@ -106,13 +106,13 @@ public class EdgeSWUploadService {
|
|
|
|
|
jsonBody.put("creation_datetime", edgeSWVO.getCreation_datetime());
|
|
|
|
|
jsonBody.put("download_location", edgeSWVO.getDownload_location());
|
|
|
|
|
|
|
|
|
|
if (sw_type == 0){
|
|
|
|
|
jsonBody.put("ed_pkg_serial", edgeSWVO.getPkg_serial());
|
|
|
|
|
}
|
|
|
|
|
else if (sw_type == 1) {
|
|
|
|
|
jsonBody.put("ad_pkg_serial", edgeSWVO.getPkg_serial());
|
|
|
|
|
switch (sw_type) {
|
|
|
|
|
case 0 -> jsonBody.put("ad_pkg_serial", edgeSWVO.getPkg_serial());
|
|
|
|
|
case 1 -> jsonBody.put("ed_pkg_serial", edgeSWVO.getPkg_serial());
|
|
|
|
|
default -> throw new IllegalArgumentException("Invalid sw_type: " + sw_type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonBody.put("sw_id", edgeSWVO.getSw_id());
|
|
|
|
|
jsonBody.put("sw_version", edgeSWVO.getSw_version());
|
|
|
|
|
jsonBody.put("sw_name", edgeSWVO.getSw_name());
|
|
|
|
|
@ -128,6 +128,7 @@ public class EdgeSWUploadService {
|
|
|
|
|
jsonBody.put("file_type", edgeSWVO.getFile_type());
|
|
|
|
|
jsonBody.put("file_size", edgeSWVO.getFile_size());
|
|
|
|
|
|
|
|
|
|
log.info(jsonBody.toString());
|
|
|
|
|
|
|
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
|