From 958de10b4c433eb6110b93007f281b07515ed6fe Mon Sep 17 00:00:00 2001 From: Lathish Date: Wed, 26 Aug 2020 15:50:49 +0100 Subject: Deprecate the SDNR A1 Adapter Issue-ID: CCSDK-2694 Change-Id: I9ef2975b08a551cc8d739ba7507530f80ad31eec Signed-off-by: Lathish --- .../sdnr/northbound/a1Adapter/A1AdapterClient.java | 43 ------- .../northbound/a1Adapter/A1AdapterProvider.java | 138 --------------------- .../OSGI-INF/blueprint/impl-blueprint.xml | 50 -------- .../org/opendaylight/blueprint/impl-blueprint.xml | 50 -------- 4 files changed, 281 deletions(-) delete mode 100644 sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterClient.java delete mode 100644 sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java delete mode 100644 sdnr/northbound/a1Adapter/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml delete mode 100644 sdnr/northbound/a1Adapter/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml (limited to 'sdnr/northbound/a1Adapter/provider/src/main') diff --git a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterClient.java b/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterClient.java deleted file mode 100644 index eb0894bd6..000000000 --- a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * Modifications Copyright (C) 2020 Nordix Foundation. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.features.sdnr.northbound.a1Adapter; - -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class A1AdapterClient { - - private static final Logger LOG = LoggerFactory.getLogger(A1AdapterClient.class); - - private SvcLogicService svcLogicService = null; - - public A1AdapterClient(final SvcLogicService svcLogicService) { - this.svcLogicService = svcLogicService; - } - - public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException { - return svcLogicService.hasGraph(module, rpc, version, mode); - } -} \ No newline at end of file diff --git a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java b/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java deleted file mode 100644 index 22109b09b..000000000 --- a/sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights - * reserved. - * Modifications Copyright (C) 2020 Nordix Foundation. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.features.sdnr.northbound.a1Adapter; - -import com.google.common.util.concurrent.ListenableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.A1ADAPTERAPIService; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.DeleteA1PolicyInput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.DeleteA1PolicyOutput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyInput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyOutput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyStatusInput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyStatusOutput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyTypeInput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.GetA1PolicyTypeOutput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.PutA1PolicyInput; -import org.opendaylight.yang.gen.v1.org.onap.a1.adapter.rev200122.PutA1PolicyOutput; -import org.opendaylight.yangtools.yang.common.RpcResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Defines a base implementation for your provider. This class extends from a helper class which - * provides storage for the most commonly used components of the MD-SAL. Additionally the base class - * provides some basic logging and initialization / clean up methods. - * - */ -public class A1AdapterProvider implements AutoCloseable, A1ADAPTERAPIService { - - private static final Logger LOG = LoggerFactory.getLogger(A1AdapterProvider.class); - - private static final String APPLICATION_NAME = "a1Adapter-api"; - private static final String GET_NEARRT_RICS = "getNearRT-RICs"; - private static final String GET_HEALTH_CHECK = "getHealthCheck"; - private static final String GET_POLICY_TYPES = "getPolicyTypes"; - private static final String CREATE_POLICY_TYPE = "createPolicyType"; - private static final String GET_POLICY_TYPE = "getPolicyType"; - private static final String DELETE_POLICY_TYPE = "deletePolicyType"; - private static final String GET_POLICY_INSTANCES = "getPolicyInstances"; - private static final String CREATE_POLICY_INSTANCES = "createPolicyInstance"; - private static final String GET_POLICY_INSTANCE = "getPolicyInstance"; - private static final String DELETE_POLICY_INSTANCE = "deletePolicyInstance"; - private static final String GET_STATUS = "getStatus"; - private static final String NOTIFICATION_ENFORECEMENT = "notifyPolicyEnforcementUpdate"; - - private final ExecutorService executor; - protected DataBroker dataBroker; - protected NotificationPublishService notificationService; - protected RpcProviderRegistry rpcRegistry; - protected BindingAwareBroker.RpcRegistration rpcRegistration; - private final A1AdapterClient A1AdapterClient; - - public A1AdapterProvider(final DataBroker dataBroker, final NotificationPublishService notificationPublishService, - final RpcProviderRegistry rpcProviderRegistry, final A1AdapterClient A1AdapterClient) { - - LOG.info("Creating provider for {}", APPLICATION_NAME); - executor = Executors.newFixedThreadPool(1); - this.dataBroker = dataBroker; - this.notificationService = notificationPublishService; - this.rpcRegistry = rpcProviderRegistry; - this.A1AdapterClient = A1AdapterClient; - initialize(); - } - - public void initialize() { - LOG.info("Initializing provider for {}", APPLICATION_NAME); - rpcRegistration = rpcRegistry.addRpcImplementation(A1ADAPTERAPIService.class, this); - LOG.info("Initialization complete for {}", APPLICATION_NAME); - } - - protected void initializeChild() { - // Override if you have custom initialization intelligence - } - - @Override - public void close() throws Exception { - LOG.info("Closing provider for {}", APPLICATION_NAME); - executor.shutdown(); - rpcRegistration.close(); - LOG.info("Successfully closed provider for {}", APPLICATION_NAME); - } - - @Override - public ListenableFuture> deleteA1Policy(DeleteA1PolicyInput input) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ListenableFuture> getA1Policy(GetA1PolicyInput input) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ListenableFuture> getA1PolicyStatus(GetA1PolicyStatusInput input) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ListenableFuture> getA1PolicyType(GetA1PolicyTypeInput input) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ListenableFuture> putA1Policy(PutA1PolicyInput input) { - // TODO Auto-generated method stub - return null; - } - -} \ No newline at end of file diff --git a/sdnr/northbound/a1Adapter/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml b/sdnr/northbound/a1Adapter/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml deleted file mode 100644 index d418093a9..000000000 --- a/sdnr/northbound/a1Adapter/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sdnr/northbound/a1Adapter/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/northbound/a1Adapter/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml deleted file mode 100644 index d418093a9..000000000 --- a/sdnr/northbound/a1Adapter/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit 1.2.3-korg