diff options
Diffstat (limited to 'vid-app-common/src/main/java')
3 files changed, 17 insertions, 5 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java index 6bd98fff6..5eb315d1a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java @@ -37,6 +37,7 @@ import org.onap.vid.services.AsyncInstantiationBusinessLogic; import org.onap.vid.services.AuditService; import org.onap.vid.utils.SystemPropertiesWrapper; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -158,6 +159,11 @@ public class AsyncInstantiationController extends VidRestrictedBaseController { return new MsoResponseWrapper2(200, uuids); } + @GetMapping("templateTopology/{jobId}") + public ServiceInstantiation getTemplateTopology(HttpServletRequest request, @PathVariable(value="jobId") UUID jobId) { + return asyncInstantiationBL.getJobRequestAsTemplate(jobId); + } + @RequestMapping(value = "/auditStatusForRetry/{trackById}", method = RequestMethod.GET) public JobAuditStatus getResourceAuditStatus(HttpServletRequest request, @PathVariable(value="trackById") String trackById) { return auditService.getResourceAuditStatus(trackById); diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java index 1202fc9e3..e00758aa1 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java @@ -20,6 +20,10 @@ package org.onap.vid.services; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.function.Consumer; import org.onap.vid.aai.model.ResourceType; import org.onap.vid.job.Job; import org.onap.vid.job.impl.JobSharedData; @@ -28,11 +32,6 @@ import org.onap.vid.model.serviceInstantiation.ServiceInstantiation; import org.onap.vid.mso.RestObject; import org.onap.vid.mso.rest.AsyncRequestStatus; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.function.Consumer; - public interface AsyncInstantiationBusinessLogic { List<String> PARAMS_TO_IGNORE = Arrays.asList("vnf_name", "vf_module_name"); @@ -109,5 +108,7 @@ public interface AsyncInstantiationBusinessLogic { ServiceInstantiation getBulkForRetry(UUID jobId); + ServiceInstantiation getJobRequestAsTemplate(UUID jobId); + String getResumeRequestPath(String requestId); } diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java index c77eb8230..86d630b2a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java @@ -534,6 +534,11 @@ public class AsyncInstantiationBusinessLogicImpl implements } @Override + public ServiceInstantiation getJobRequestAsTemplate(UUID jobId) { + return asyncInstantiationRepository.getJobRequest(jobId); + } + + @Override public void addResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, String instanceId) { String trackById = ((BaseResource) sharedData.getRequest()).getTrackById(); ResourceInfo resourceInfo = new ResourceInfo(trackById, sharedData.getRootJobId(), instanceId, jobStatus, null); |