2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2018 - 2019 Nokia. All rights reserved.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 package org.onap.vid.mso;
23 import io.joshworks.restclient.http.HttpResponse;
24 import org.onap.vid.changeManagement.RequestDetailsWrapper;
25 import org.onap.vid.model.SOWorkflowList;
26 import org.onap.vid.changeManagement.WorkflowRequestDetail;
27 import org.onap.vid.mso.rest.RequestDetails;
32 * Created by pickjonathan on 21/06/2017.
34 public interface MsoInterface {
37 * This function will post MSO service with information about how to instantiate the requested service
38 * @param requestDetails The details about the service as they come from the web.
39 * @return MsoResponseWrapper containing information about the service instantiation
40 * --> success : see JSON at resources folder mso_create_instance_response.
41 * --> failure : would return 200 with failure data.
44 MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint);
46 //For VoLTE E2E services
47 MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint);
48 MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String endpoint);
51 * will create a virtual network function using MSO service.
52 * @param requestDetails - information about the vnf to create
53 * @return - the response body recived from MSO
56 MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint);
58 MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint);
61 * @param requestDetails
66 MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String path);
70 * @param requestDetails
74 MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint);
76 MsoResponseWrapper createConfigurationInstance(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String endpoint);
78 MsoResponseWrapper scaleOutVFModuleInstance(RequestDetailsWrapper requestDetailsWrapper, String endpoint);
80 MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint);
82 MsoResponseWrapper unassignSvcInstance(RequestDetails requestDetails, String endpoint);
84 MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint);
86 MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint);
88 MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint);
90 MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint);
92 MsoResponseWrapper getOrchestrationRequest(String t, String sourceId, String endpoint, RestObject restObject, boolean warpException);
94 MsoResponseWrapper getOrchestrationRequest(String endpoint);
96 MsoResponseWrapper getManualTasksByRequestId(String t , String sourceId , String endpoint , RestObject restObject);
98 MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject);
100 MsoResponseWrapper updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnfEndpoint);
102 MsoResponseWrapper replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnfEndpoint);
104 MsoResponseWrapper deleteConfiguration(org.onap.vid.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String pmcEndpoint);
106 MsoResponseWrapper setConfigurationActiveStatus(RequestDetails requestDetails, String endpoint);
108 MsoResponseWrapper setPortOnConfigurationStatus(RequestDetails requestDetails, String endpoint);
110 MsoResponseWrapper setServiceInstanceStatus(RequestDetails requestDetails, String endpoint);
112 MsoResponseWrapperInterface changeManagementUpdate(RequestDetailsWrapper requestDetails, String endpoint);
114 MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String endpoint);
116 MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String addRelationshipsPath);
118 HttpResponse<SOWorkflowList> getWorkflowListByModelId(String endpoint);
120 MsoResponseWrapper invokeWorkflow(WorkflowRequestDetail requestDetails,String invokeWorkflowsPath, Map<String, String> extraHeaders);
122 <T> HttpResponse<T> get(String path, Class<T> responseClass);
124 <T> HttpResponse<T> post(String path, RequestDetailsWrapper<?> requestDetailsWrapper,
125 Class<T> responseClass);