blob: 39e2b73d1a7ff29c51a8f1cd2b5184e6862f279a [file] [log] [blame]
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +03001/*-
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
23package org.onap.osam.services;
24
25import org.onap.osam.aai.model.ResourceType;
26import org.onap.osam.job.Job;
27import org.onap.osam.model.JobAuditStatus;
28import org.onap.osam.model.ServiceInfo;
29import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
30import org.onap.osam.mso.rest.AsyncRequestStatus;
31
32import java.util.Arrays;
33import java.util.List;
34import java.util.UUID;
35import java.util.function.Consumer;
36
37public 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}