diff options
author | Einat Vinouze <einat.vinouze@intl.att.com> | 2019-07-16 17:17:36 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-30 06:01:44 +0300 |
commit | e601bbdc43bae9a08e2e10c5139a6f76b47860d7 (patch) | |
tree | 1913f0b369ead3f2ea5557e5649d8281eca9871c /vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java | |
parent | 76c6ee4a697617ec4cdee2f3b48bc83136c858c5 (diff) |
Implant vid-app-common org.onap.vid.job (main and test)
Issue-ID: VID-378
Change-Id: I41b0bdc2c4e3635f3f3319b1cd63cefc61912dfc
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java | 66 |
1 files changed, 33 insertions, 33 deletions
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 603f13867..1202fc9e3 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 @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,17 +21,15 @@ package org.onap.vid.services; import org.onap.vid.aai.model.ResourceType; -import org.onap.vid.changeManagement.RequestDetailsWrapper; import org.onap.vid.job.Job; -import org.onap.vid.model.JobAuditStatus; +import org.onap.vid.job.impl.JobSharedData; import org.onap.vid.model.ServiceInfo; -import org.onap.vid.model.serviceInstantiation.*; -import org.onap.vid.mso.model.*; +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.Map; import java.util.UUID; import java.util.function.Consumer; @@ -43,23 +41,7 @@ public interface AsyncInstantiationBusinessLogic { List<UUID> pushBulkJob(ServiceInstantiation request, String userId); - RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateMacroServiceInstantiationRequest(UUID uuid, ServiceInstantiation details, String optimisticUniqueServiceInstanceName, String userId); - - RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateALaCarteServiceInstantiationRequest(UUID uuid, ServiceInstantiation details, String optimisticUniqueServiceInstanceName, String userId); - - RequestDetailsWrapper<ServiceDeletionRequestDetails> generateALaCarteServiceDeletionRequest(UUID uuid, ServiceInstantiation details, String userId); - - RequestDetailsWrapper<VnfInstantiationRequestDetails> generateVnfInstantiationRequest(Vnf vnfDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId); - - RequestDetailsWrapper<VfModuleInstantiationRequestDetails> generateVfModuleInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String vgInstanceId, String userId); - - RequestDetailsWrapper<VolumeGroupRequestDetails> generateVolumeGroupInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String userId); - - RequestDetailsWrapper<NetworkInstantiationRequestDetails> generateNetworkInstantiationRequest(Network networkDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId); - - RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> generateInstanceGroupInstantiationRequest(InstanceGroup request, ModelInfo serviceModelInfo, String serviceInstanceId, String userId); - - List<Map<String,String>> buildVnfInstanceParams(List<Map<String, String>> currentVnfInstanceParams, List<VfModuleMacro> vfModules); + boolean isPartOfBulk(UUID jobId); String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest); @@ -67,32 +49,34 @@ public interface AsyncInstantiationBusinessLogic { String getVnfInstantiationPath(String serviceInstanceId); + String getVnfDeletionPath(String serviceInstanceId, String vnfInstanceId); + String getNetworkInstantiationPath(String serviceInstanceId); String getVfmoduleInstantiationPath(String serviceInstanceId, String vnfInstanceId); + String getVfModuleReplacePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId); + + String getVfModuleDeletePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId); + String getVolumeGroupInstantiationPath(String serviceInstanceId, String vnfInstanceId); String getInstanceGroupInstantiationPath(); + String getInstanceGroupMemberInstantiationPath(String vnfGroupInstanceId); + String getInstanceGroupDeletePath(String instanceGroupId); - String getOrchestrationRequestsPath(); + String getInstanceGroupMemberDeletePath(String vnfGroupInstanceId); - ServiceInfo getServiceInfoByJobId(UUID jobUUID); + String getNetworkDeletePath(String serviceInstanceId, String networkInstanceId); - List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source); + String getOrchestrationRequestsPath(); ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater); ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, Job.JobStatus jobStatus); - void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus); - - void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus); - - void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo); - Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus); void handleFailedInstantiation(UUID jobUUID); @@ -109,5 +93,21 @@ public interface AsyncInstantiationBusinessLogic { String getUniqueName(String name, ResourceType resourceType); + ServiceInstantiation prepareServiceToBeUnique(ServiceInstantiation serviceInstantiation); + + ServiceInstantiation enrichBulkForRetry(ServiceInstantiation serviceInstantiation, UUID jobId); + + List<UUID> retryJob(UUID jobId, String userId); + + List<UUID> retryJob(ServiceInstantiation request, UUID oldJobId, String userId); + + void addResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, String instanceId); + + void addFailedResourceInfo(JobSharedData sharedData, RestObject msoResponse); + + void updateResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, AsyncRequestStatus message); + + ServiceInstantiation getBulkForRetry(UUID jobId); + String getResumeRequestPath(String requestId); } |