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/feature/pom.xml | 47 ------- sdnr/northbound/a1Adapter/installer/pom.xml | 116 ----------------- .../src/assembly/assemble_mvnrepo_zip.xml | 47 ------- sdnr/northbound/a1Adapter/model/pom.xml | 77 ----------- .../model/src/main/yang/A1-ADAPTER-API.yang | 122 ------------------ sdnr/northbound/a1Adapter/pom.xml | 50 ------- sdnr/northbound/a1Adapter/provider/pom.xml | 143 --------------------- .../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 ------- .../a1Adapter/A1AdapterProviderTest.java | 30 ----- sdnr/northbound/pom.xml | 1 - 13 files changed, 914 deletions(-) delete mode 100644 sdnr/northbound/a1Adapter/feature/pom.xml delete mode 100644 sdnr/northbound/a1Adapter/installer/pom.xml delete mode 100644 sdnr/northbound/a1Adapter/installer/src/assembly/assemble_mvnrepo_zip.xml delete mode 100644 sdnr/northbound/a1Adapter/model/pom.xml delete mode 100644 sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang delete mode 100644 sdnr/northbound/a1Adapter/pom.xml delete mode 100644 sdnr/northbound/a1Adapter/provider/pom.xml 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 delete mode 100644 sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java diff --git a/sdnr/northbound/a1Adapter/feature/pom.xml b/sdnr/northbound/a1Adapter/feature/pom.xml deleted file mode 100644 index 0369d38b2..000000000 --- a/sdnr/northbound/a1Adapter/feature/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - 4.0.0 - - - org.onap.ccsdk.parent - single-feature-parent - 2.0.1-SNAPSHOT - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter-feature - 1.0.1-SNAPSHOT - feature - - ccsdk-features :: sdnr-northbound :: ${project.artifactId} - - - - ${project.groupId} - a1Adapter-provider - ${project.version} - - - diff --git a/sdnr/northbound/a1Adapter/installer/pom.xml b/sdnr/northbound/a1Adapter/installer/pom.xml deleted file mode 100644 index 0dc280620..000000000 --- a/sdnr/northbound/a1Adapter/installer/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - 4.0.0 - - - org.onap.ccsdk.parent - odlparent-lite - 2.0.1-SNAPSHOT - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter-installer - 1.0.1-SNAPSHOT - pom - - ccsdk-features :: sdnr-northbound :: ${project.artifactId} - - - a1Adapter - false - - - - - - org.onap.ccsdk.features.sdnr.northbound - ${application.name}-feature - ${project.version} - xml - features - - - * - * - - - - - ${project.groupId} - a1Adapter-provider - ${project.version} - - - - - - - maven-assembly-plugin - - - maven-repo-zip - - single - - package - - true - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - true - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - a1Adapter-model,a1Adapter-provider,a1Adapter-feature - provided - - - - - - - diff --git a/sdnr/northbound/a1Adapter/installer/src/assembly/assemble_mvnrepo_zip.xml b/sdnr/northbound/a1Adapter/installer/src/assembly/assemble_mvnrepo_zip.xml deleted file mode 100644 index dfe5060bf..000000000 --- a/sdnr/northbound/a1Adapter/installer/src/assembly/assemble_mvnrepo_zip.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - repo - - zip - - - - false - - - - target/assembly/ - . - - - - - - diff --git a/sdnr/northbound/a1Adapter/model/pom.xml b/sdnr/northbound/a1Adapter/model/pom.xml deleted file mode 100644 index aae89ec62..000000000 --- a/sdnr/northbound/a1Adapter/model/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 2.0.1-SNAPSHOT - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter-model - 1.0.1-SNAPSHOT - bundle - - ccsdk-features :: sdnr-northbound :: ${project.artifactId} - - - - org.opendaylight.mdsal.binding.model.ietf - rfc6991 - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.codehaus.mojo - properties-maven-plugin - [1.0.0,) - - set-system-properties - - - - - - - - - - - - - - diff --git a/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang b/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang deleted file mode 100644 index 157bde5af..000000000 --- a/sdnr/northbound/a1Adapter/model/src/main/yang/A1-ADAPTER-API.yang +++ /dev/null @@ -1,122 +0,0 @@ -//- -// ============LICENSE_START======================================================= -// 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. -// -// SPDX-License-Identifier: Apache-2.0 -// ============LICENSE_END========================================================= -// -module A1-ADAPTER-API { - - namespace "org:onap:a1-adapter"; - - prefix a1-adapter-api; - - import ietf-inet-types { - prefix "inet"; - revision-date "2013-07-15"; - } - - import ietf-yang-types { - prefix yang; - } - - revision "2020-01-22" { - description - "A1 adapter"; - } - - rpc putA1Policy { - input { - leaf near-rt-ric-url { - type inet:uri; - } - leaf body { - type string; - } - } - output { - leaf body { - type string; - } - leaf http-status { - type int32; - } - } - } - - rpc getA1Policy { - input { - leaf near-rt-ric-url { - type inet:uri; - } - } - output { - leaf body { - type string; - } - leaf http-status { - type int32; - } - } - } - - rpc getA1PolicyStatus { - input { - leaf near-rt-ric-url { - type inet:uri; - } - } - output { - leaf body { - type string; - } - leaf http-status { - type int32; - } - } - } - - rpc getA1PolicyType { - input { - leaf near-rt-ric-url { - type inet:uri; - } - } - output { - leaf body { - type string; - } - leaf http-status { - type int32; - } - } - } - - rpc deleteA1Policy { - input { - leaf near-rt-ric-url { - type inet:uri; - } - } - output { - leaf body { - type string; - } - leaf http-status { - type int32; - } - } - } -} \ No newline at end of file diff --git a/sdnr/northbound/a1Adapter/pom.xml b/sdnr/northbound/a1Adapter/pom.xml deleted file mode 100644 index f63667167..000000000 --- a/sdnr/northbound/a1Adapter/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - 4.0.0 - - - org.onap.ccsdk.parent - odlparent-lite - 2.0.1-SNAPSHOT - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter - 1.0.1-SNAPSHOT - pom - - ccsdk-features :: sdnr-northbound :: ${project.artifactId} - - - model - feature - provider - installer - - - - a1Adapter - - diff --git a/sdnr/northbound/a1Adapter/provider/pom.xml b/sdnr/northbound/a1Adapter/provider/pom.xml deleted file mode 100644 index 1ea85a396..000000000 --- a/sdnr/northbound/a1Adapter/provider/pom.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - 4.0.0 - - - org.onap.ccsdk.parent - binding-parent - 2.0.1-SNAPSHOT - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter-provider - 1.0.1-SNAPSHOT - bundle - - ccsdk-features :: sdnr-northbound :: ${project.artifactId} - - - - - org.opendaylight.controller - mdsal-artifacts - 1.6.1 - pom - import - - - org.onap.ccsdk.sli.core - sli-core-artifacts - ${ccsdk.sli.core.version} - pom - import - - - - - - org.onap.ccsdk.features.sdnr.northbound - a1Adapter-model - ${project.version} - - - - org.opendaylight.controller - sal-binding-api - - - org.opendaylight.controller - sal-common-util - - - org.opendaylight.controller - sal-core-api - - - org.opendaylight.yangtools - yang-data-impl - - - junit - junit - test - - - org.mockito - mockito-core - test - - - org.onap.ccsdk.sli.core - sli-common - provided - - - org.onap.ccsdk.sli.core - sli-provider - provided - - - org.onap.ccsdk.sli.core - utils-provider - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.codehaus.mojo - properties-maven-plugin - [1.0.0,) - - set-system-properties - - - - - - - - - - - - - - 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java b/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java deleted file mode 100644 index 8fea501ff..000000000 --- a/sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.ccsdk.features.sdnr.northbound.a1Adapter; - -/** - * This class Tests all the methods in A1AdapterProvider - * - * @author lathishbabu.ganesan@est.tech - * - */ - -public class A1AdapterProviderTest {} \ No newline at end of file diff --git a/sdnr/northbound/pom.xml b/sdnr/northbound/pom.xml index 52ccbf71b..81b039e25 100644 --- a/sdnr/northbound/pom.xml +++ b/sdnr/northbound/pom.xml @@ -43,7 +43,6 @@ oofpcipoc - a1Adapter CMNotify ranSlice features -- cgit 1.2.3-korg