1 package org.onap.ccsdk.config.rest.adaptor.utils;
3 import org.onap.ccsdk.config.rest.adaptor.ConfigRestAdaptorConstants;
4 import org.onap.ccsdk.config.rest.adaptor.ConfigRestAdaptorException;
5 import org.onap.ccsdk.config.rest.adaptor.service.ConfigRestAdaptorServiceImpl;
7 @SuppressWarnings("squid:S2187")
8 public class RestTemplateFactoryTest {
10 public static void main(String[] args) {
12 String propertyFile = RestTemplateFactoryTest.class.getClassLoader().getResource(".").getPath();
13 System.out.println(" Property : " + propertyFile);
16 ConfigRestAdaptorServiceImpl configRestAdaptorServiceImpl = new ConfigRestAdaptorServiceImpl(propertyFile);
17 String restconfResponse = genericRestGetMDSALOperation(args, configRestAdaptorServiceImpl);
18 System.out.println("RestTemplateFactoryTest.main Completed with response :" + restconfResponse);
19 } catch (ConfigRestAdaptorException e) {
24 public static String genericRestGetMDSALOperation(String[] args,
25 ConfigRestAdaptorServiceImpl configRestAdaptorServiceImpl) throws ConfigRestAdaptorException {
26 String path = "config/Dummy-API:services/service-list/dummy-1234";
27 String restconfResponse = configRestAdaptorServiceImpl.getResource(ConfigRestAdaptorConstants.SELECTOR_RESTCONF,
29 return restconfResponse;