1 /*******************************************************************************
2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2021 Wipro Limited.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 *******************************************************************************/
21 package org.onap.slice.analysis.ms.configdb;
23 import java.util.ArrayList;
24 import java.util.HashMap;
25 import java.util.List;
28 import org.onap.slice.analysis.ms.models.Configuration;
29 import org.onap.slice.analysis.ms.restclients.CpsRestClient;
30 import org.slf4j.Logger;
31 import org.slf4j.LoggerFactory;
32 import org.springframework.beans.factory.annotation.Autowired;
33 import org.springframework.core.ParameterizedTypeReference;
34 import org.springframework.http.ResponseEntity;
35 import org.springframework.stereotype.Service;
39 * Service for CPS interfaces
43 public class CpsService implements CpsInterface {
45 private static Logger log = LoggerFactory.getLogger(CpsService.class);
48 CpsRestClient restclient;
49 private static String cpsBaseUrl = Configuration.getInstance().getCpsUrl();
52 * Fetches the current configuration of RIC from CPS
54 public Map<String, Map<String, Object>> fetchCurrentConfigurationOfRIC(String snssai) {
59 * Fetches all the network functions of an S-NSSAI from CPS
61 public List<String> fetchNetworkFunctionsOfSnssai(String snssai) {
66 * Fetches the RICS of an S-NSSAI from CPS
68 public Map<String, List<String>> fetchRICsOfSnssai(String snssai) {