Aharoni, Pavel (pa0916) | ca3cb01 | 2018-10-22 15:29:57 +0300 | [diff] [blame] | 1 | /*-
|
| 2 | * ============LICENSE_START=======================================================
|
| 3 | * OSAM
|
| 4 | * ================================================================================
|
| 5 | * Copyright (C) 2018 AT&T
|
| 6 | * ================================================================================
|
| 7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 | * you may not use this file except in compliance with the License.
|
| 9 | * You may obtain a copy of the License at
|
| 10 | *
|
| 11 | * http://www.apache.org/licenses/LICENSE-2.0
|
| 12 | *
|
| 13 | * Unless required by applicable law or agreed to in writing, software
|
| 14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 | * See the License for the specific language governing permissions and
|
| 17 | * limitations under the License.
|
| 18 | * ============LICENSE_END=========================================================
|
| 19 | */
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 | package org.onap.osam.services;
|
| 24 |
|
| 25 | import org.onap.osam.aai.model.ResourceType;
|
| 26 | import org.onap.osam.job.Job;
|
| 27 | import org.onap.osam.model.JobAuditStatus;
|
| 28 | import org.onap.osam.model.ServiceInfo;
|
| 29 | import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
|
| 30 | import org.onap.osam.mso.rest.AsyncRequestStatus;
|
| 31 |
|
| 32 | import java.util.Arrays;
|
| 33 | import java.util.List;
|
| 34 | import java.util.UUID;
|
| 35 | import java.util.function.Consumer;
|
| 36 |
|
| 37 | public interface IAsyncInstantiationBusinessLogic {
|
| 38 |
|
| 39 | List<String> PARAMS_TO_IGNORE = Arrays.asList("vnf_name", "vf_module_name");
|
| 40 |
|
| 41 | List<ServiceInfo> getAllServicesInfo();
|
| 42 |
|
| 43 | List<UUID> pushBulkJob(ServiceInstantiation request, String userId);
|
| 44 |
|
| 45 | String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest);
|
| 46 |
|
| 47 | String getOrchestrationRequestsPath();
|
| 48 |
|
| 49 | ServiceInfo getServiceInfoByJobId(UUID jobUUID);
|
| 50 |
|
| 51 | List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source);
|
| 52 |
|
| 53 | ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater);
|
| 54 |
|
| 55 | ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, Job.JobStatus jobStatus);
|
| 56 |
|
| 57 | void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus);
|
| 58 |
|
| 59 | void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus);
|
| 60 |
|
| 61 | void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo);
|
| 62 |
|
| 63 | Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus);
|
| 64 |
|
| 65 | void handleFailedInstantiation(UUID jobUUID);
|
| 66 |
|
| 67 | void deleteJob(UUID jobId);
|
| 68 |
|
| 69 | void hideServiceInfo(UUID jobUUID);
|
| 70 |
|
| 71 | int getCounterForName(String name);
|
| 72 |
|
| 73 | int getMaxRetriesGettingFreeNameFromAai();
|
| 74 |
|
| 75 | void setMaxRetriesGettingFreeNameFromAai(int maxRetriesGettingFreeNameFromAai);
|
| 76 |
|
| 77 | String getUniqueName(String name, ResourceType resourceType);
|
| 78 | }
|