aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/a1Adapter/provider
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/northbound/a1Adapter/provider')
-rw-r--r--sdnr/northbound/a1Adapter/provider/pom.xml143
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterClient.java43
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProvider.java138
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml50
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml50
-rw-r--r--sdnr/northbound/a1Adapter/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/a1Adapter/A1AdapterProviderTest.java30
6 files changed, 0 insertions, 454 deletions
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ============LICENSE_START=======================================================
- ~ ONAP : ccsdk features
- ~ ================================================================================
- ~ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- ~ ================================================================================
- ~ 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=======================================================
- ~
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>binding-parent</artifactId>
- <version>2.0.1-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId>
- <artifactId>a1Adapter-provider</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <name>ccsdk-features :: sdnr-northbound :: ${project.artifactId}</name>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>1.6.1</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-core-artifacts</artifactId>
- <version>${ccsdk.sli.core.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId>
- <artifactId>a1Adapter-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
- -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-common-util</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-core-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-data-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-common</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-provider</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>utils-provider</artifactId>
- <!-- <version>${sdnctl.sli.version}</version> -->
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>properties-maven-plugin</artifactId>
- <versionRange>[1.0.0,)</versionRange>
- <goals>
- <goal>set-system-properties</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <execute/>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-</project>
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<A1ADAPTERAPIService> 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<RpcResult<DeleteA1PolicyOutput>> deleteA1Policy(DeleteA1PolicyInput input) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ListenableFuture<RpcResult<GetA1PolicyOutput>> getA1Policy(GetA1PolicyInput input) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ListenableFuture<RpcResult<GetA1PolicyStatusOutput>> getA1PolicyStatus(GetA1PolicyStatusInput input) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ListenableFuture<RpcResult<GetA1PolicyTypeOutput>> getA1PolicyType(GetA1PolicyTypeInput input) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ListenableFuture<RpcResult<PutA1PolicyOutput>> 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ============LICENSE_START=======================================================
- ~ ONAP : ccsdk features
- ~ ================================================================================
- ~ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- ~ ================================================================================
- ~ 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=======================================================
- ~
- -->
-
-<blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true">
-
- <reference id="svcLogicService"
- interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService"/>
-
- <bean id="client" class="org.onap.ccsdk.features.sdnr.northbound.a1Adapter.A1AdapterClient">
- <argument ref="svcLogicService"/>
- </bean>
-
- <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
- odl:type="default"/>
-
- <reference id="notificationService"
- interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
- odl:type="default"/>
-
- <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
- odl:type="default"/>
-
- <bean id="provider" class="org.onap.ccsdk.features.sdnr.northbound.a1Adapter.A1AdapterProvider">
- <argument ref="dataBroker"/>
- <argument ref="rpcRegistry"/>
- <argument ref="notificationService"/>
- <argument ref="client"/>
- </bean>
-
-</blueprint>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ============LICENSE_START=======================================================
- ~ ONAP : ccsdk features
- ~ ================================================================================
- ~ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- ~ ================================================================================
- ~ 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=======================================================
- ~
- -->
-
-<blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true">
-
- <reference id="svcLogicService"
- interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService"/>
-
- <bean id="client" class="org.onap.ccsdk.features.sdnr.northbound.a1Adapter.A1AdapterClient">
- <argument ref="svcLogicService"/>
- </bean>
-
- <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
- odl:type="default"/>
-
- <reference id="notificationService"
- interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
- odl:type="default"/>
-
- <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
- odl:type="default"/>
-
- <bean id="provider" class="org.onap.ccsdk.features.sdnr.northbound.a1Adapter.A1AdapterProvider">
- <argument ref="dataBroker"/>
- <argument ref="rpcRegistry"/>
- <argument ref="notificationService"/>
- <argument ref="client"/>
- </bean>
-
-</blueprint>
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