diff options
Diffstat (limited to 'sdnr/northbound/a1Adapter/provider/src/main')
4 files changed, 0 insertions, 281 deletions
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> |