From 8e683ffdb67a8c9e254c7f6dafa857b903d7dffb Mon Sep 17 00:00:00 2001 From: Niranjana Date: Thu, 26 Aug 2021 16:34:02 +0000 Subject: Add new feature to register cmhandle in CPS Issue-ID: CCSDK-3342 Signed-off-by: Niranjana Change-Id: If8fd65c090f6396a85b61261e0febd3333b66778 --- sdnr/northbound/addCMHandle/feature/pom.xml | 132 +++++++++++++++++++++ sdnr/northbound/addCMHandle/installer/pom.xml | 121 +++++++++++++++++++ .../src/assembly/assemble_installer_zip.xml | 53 +++++++++ .../src/assembly/assemble_mvnrepo_zip.xml | 43 +++++++ .../src/main/resources/scripts/install-feature.sh | 38 ++++++ sdnr/northbound/addCMHandle/model/pom.xml | 82 +++++++++++++ .../addCMHandle/model/src/main/yang/cm-handle.yang | 97 +++++++++++++++ sdnr/northbound/addCMHandle/pom.xml | 51 ++++++++ sdnr/northbound/addCMHandle/provider/pom.xml | 132 +++++++++++++++++++++ .../addCMHandle/AddCMHandleProvider.java | 90 ++++++++++++++ .../sdnr/northbound/impl/AddCMHandleProvider.java | 91 ++++++++++++++ .../OSGI-INF/blueprint/impl-blueprint.xml | 37 ++++++ .../src/main/resources/cm-handle.properties | 23 ++++ .../org/opendaylight/blueprint/impl-blueprint.xml | 37 ++++++ .../addCMHandle/AddCMHandleProviderTest.java | 33 ++++++ sdnr/northbound/pom.xml | 3 +- 16 files changed, 1062 insertions(+), 1 deletion(-) create mode 100644 sdnr/northbound/addCMHandle/feature/pom.xml create mode 100755 sdnr/northbound/addCMHandle/installer/pom.xml create mode 100644 sdnr/northbound/addCMHandle/installer/src/assembly/assemble_installer_zip.xml create mode 100644 sdnr/northbound/addCMHandle/installer/src/assembly/assemble_mvnrepo_zip.xml create mode 100644 sdnr/northbound/addCMHandle/installer/src/main/resources/scripts/install-feature.sh create mode 100644 sdnr/northbound/addCMHandle/model/pom.xml create mode 100644 sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang create mode 100644 sdnr/northbound/addCMHandle/pom.xml create mode 100644 sdnr/northbound/addCMHandle/provider/pom.xml create mode 100644 sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProvider.java create mode 100644 sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/impl/AddCMHandleProvider.java create mode 100644 sdnr/northbound/addCMHandle/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml create mode 100644 sdnr/northbound/addCMHandle/provider/src/main/resources/cm-handle.properties create mode 100644 sdnr/northbound/addCMHandle/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml create mode 100644 sdnr/northbound/addCMHandle/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProviderTest.java diff --git a/sdnr/northbound/addCMHandle/feature/pom.xml b/sdnr/northbound/addCMHandle/feature/pom.xml new file mode 100644 index 000000000..fb4354c3a --- /dev/null +++ b/sdnr/northbound/addCMHandle/feature/pom.xml @@ -0,0 +1,132 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.parent + feature-repo-parent + 2.2.0-SNAPSHOT + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-feature + 1.0.0-SNAPSHOT + feature + + ccsdk-features :: sdnr-northbound :: ${project.artifactId} + + + + + org.opendaylight.controller + mdsal-artifacts + 1.6.1 + pom + import + + + + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-model + ${project.version} + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-provider + ${project.version} + + + org.onap.ccsdk.sli.core + sli-common + ${ccsdk.sli.version} + compile + + + org.onap.ccsdk.sli.core + sli-provider + ${ccsdk.sli.version} + compile + + + org.onap.ccsdk.sli.core + utils-provider + ${ccsdk.sli.version} + + + org.apache.velocity + velocity-engine-core + + + commons-codec + commons-codec + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.codehaus.mojo + properties-maven-plugin + [1.0.0,) + + set-system-properties + + + + + + + + + org.apache.karaf.tooling + karaf-maven-plugin + [4.0.0,) + + features-generate-descriptor + + + + + + + + + + + + + + diff --git a/sdnr/northbound/addCMHandle/installer/pom.xml b/sdnr/northbound/addCMHandle/installer/pom.xml new file mode 100755 index 000000000..3046cd431 --- /dev/null +++ b/sdnr/northbound/addCMHandle/installer/pom.xml @@ -0,0 +1,121 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 2.2.0-SNAPSHOT + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-installer + 1.0.0-SNAPSHOT + pom + + ccsdk-features :: sdnr-northbound :: ${project.artifactId} + + + addCMHandle + false + + + + + org.opendaylight.controller + sal-binding-broker-impl + 1.11.3 + test + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-feature + ${project.version} + xml + features + + + * + * + + + + + ${project.groupId} + addCMHandle-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 + addCMHandle-model,addCMHandle-provider,addCMHandle-feature + provided + + + + + + + diff --git a/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_installer_zip.xml b/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_installer_zip.xml new file mode 100644 index 000000000..b15553d84 --- /dev/null +++ b/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_installer_zip.xml @@ -0,0 +1,53 @@ + + + + + bin + + zip + + + false + + + + target/stage/ + ${application.name} + 755 + + *.sh + + + + target/stage/ + ${application.name} + 644 + + *.sh + + + + + diff --git a/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_mvnrepo_zip.xml b/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_mvnrepo_zip.xml new file mode 100644 index 000000000..fcfb7aa8a --- /dev/null +++ b/sdnr/northbound/addCMHandle/installer/src/assembly/assemble_mvnrepo_zip.xml @@ -0,0 +1,43 @@ + + + + + bin + + zip + + + false + + + + target/assembly/ + . + + + + + + diff --git a/sdnr/northbound/addCMHandle/installer/src/main/resources/scripts/install-feature.sh b/sdnr/northbound/addCMHandle/installer/src/main/resources/scripts/install-feature.sh new file mode 100644 index 000000000..54df60b1c --- /dev/null +++ b/sdnr/northbound/addCMHandle/installer/src/main/resources/scripts/install-feature.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# ONAP : CCSDK +# ================================================================================ +# Copyright (C) 2021 Wipro Limited.. +# ================================================================================ +# 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========================================================= +### + +ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} +INSTALLERDIR=$(dirname $0) + +REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip + +if [ -f ${REPOZIP} ] +then + unzip -d ${ODL_HOME} ${REPOZIP} +else + echo "ERROR : repo zip ($REPOZIP) not found!" + exit 1 +fi + +${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories} +${ODL_KARAF_CLIENT} feature:install ${features.boot} diff --git a/sdnr/northbound/addCMHandle/model/pom.xml b/sdnr/northbound/addCMHandle/model/pom.xml new file mode 100644 index 000000000..990128fad --- /dev/null +++ b/sdnr/northbound/addCMHandle/model/pom.xml @@ -0,0 +1,82 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 2.2.0-SNAPSHOT + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-model + 1.0.0-SNAPSHOT + bundle + + ccsdk-features :: sdnr-northbound :: ${project.artifactId} + + + + org.opendaylight.mdsal.model + ietf-inet-types + 2010.09.24.12.4 + + + org.opendaylight.mdsal.model + ietf-yang-types + 2010.09.24.12.4 + + + + + + + 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/addCMHandle/model/src/main/yang/cm-handle.yang b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang new file mode 100644 index 000000000..98e04efd0 --- /dev/null +++ b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang @@ -0,0 +1,97 @@ +/* + * Yang model for the CMHandle registration with CPS + * + */ + +module CMHandle-API { + + yang-version "1.1"; + + namespace "org:onap:ccsdk"; + + prefix cmHandle-api; + + description + "Defines the services for cm-handle registration for the mounted devices in SDN-C."; + + revision "2021-06-15" { + description + "YANG Model for CM Handle API"; + } + + /********************************************************************************** + * Data type definitions + * + * The following data type definitions are used to define common data structures, + * define constraints, or to impart special meanings to data objects related to the + * SDN-R controller functions. + **********************************************************************************/ + + typedef action { + type enumeration { + enum "addCMHandle"; + } + description "The action to be taken by SDNR"; + } + + /********************************************************************************** + * All requests will include this standard header + * + * The standard request header is used to define a correlation identification for + * the request that is returned on all responses. This correlation identifier + * (called the service-request-id) is meaningful to the caller and is included on + * all responses from the services. + **********************************************************************************/ + + /********************************************************************************** + * All responses will include this standard header + * + * The standard response header includes the time of completion as well as a + * success|failure indication + **********************************************************************************/ + + + grouping status { + description "The specific response codes are to be aligned with SDC reference doc + (main table removed to avoid duplication and digression from main table). + See SDC and ECOMP Distribution Consumer Interface Agreement"; + container status { + description "The specific response codes are to be aligned with SDC reference doc + (main table removed to avoid duplication and digression from main table). + See SDC and ECOMP Distribution Consumer Interface Agreement"; + leaf code { + description "Response code"; + type uint16; + mandatory true; + } + leaf message { + description "Response message"; + type string; + mandatory true; + } + } + } + + typedef cmHandle-action-status { + type enumeration { + enum "IN_PROGRESS"; + enum "SUCCESSFUL"; + enum "FAILED"; + enum "NOT_FOUND"; + enum "ABORTED"; + enum "MULTIPLE_REQUESTS_FOUND"; + } + description "The status of the cm-handle registration"; + } + + /********************************************************************************** + * Define the addCMHandle service + **********************************************************************************/ + rpc addCMHandle { + description "An operation to register the cm-handle for the mounted devices"; + + output { + uses status; + } + } +} diff --git a/sdnr/northbound/addCMHandle/pom.xml b/sdnr/northbound/addCMHandle/pom.xml new file mode 100644 index 000000000..8a068e403 --- /dev/null +++ b/sdnr/northbound/addCMHandle/pom.xml @@ -0,0 +1,51 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 2.2.0-SNAPSHOT + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle + 1.0.0-SNAPSHOT + pom + + ccsdk-features :: sdnr-northbound :: addCMHandle + + + model + feature + provider + installer + + + + addCMHandle-features + + + diff --git a/sdnr/northbound/addCMHandle/provider/pom.xml b/sdnr/northbound/addCMHandle/provider/pom.xml new file mode 100644 index 000000000..b644150da --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/pom.xml @@ -0,0 +1,132 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.parent + binding-parent + 2.2.0-SNAPSHOT + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-provider + 1.0.0-SNAPSHOT + bundle + + ccsdk-features :: sdnr-northbound :: ${project.artifactId} + + + + + org.opendaylight.controller + mdsal-artifacts + 1.6.1 + pom + import + + + + + + + org.onap.ccsdk.features.sdnr.northbound + addCMHandle-model + ${project.version} + + + org.opendaylight.controller + sal-binding-config + + + 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 + + + com.sun.jersey + jersey-client + 1.19.4 + + + com.sun.jersey + jersey-core + 1.19.4 + + + + + + + + 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/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProvider.java b/sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProvider.java new file mode 100644 index 000000000..013e71440 --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProvider.java @@ -0,0 +1,90 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : CCSDK + * ================================================================================ + * Copyright (C) 2021 Wipro Limited. + * ================================================================================ + * 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.addCMHandle; + +import com.google.common.base.Preconditions; +import com.google.common.util.concurrent.ListenableFuture; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.AddCMHandleInput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.AddCMHandleOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.CMHandleAPIService; +import org.opendaylight.yangtools.yang.common.RpcResult; +import org.opendaylight.yangtools.yang.common.RpcResultBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AddCMHandleProvider implements CMHandleAPIService { + + private static final Logger LOG = LoggerFactory.getLogger(AddCMHandleProvider.class); + + private final String appName = "addCMHandle"; + + private final DataBroker dataBroker; + private final RpcProviderRegistry rpcProviderRegistry; + private RpcRegistration serviceRegistration; + + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final String PROPERTIES_FILE_NAME = "cm-handle.properties"; + private static final String PARSING_ERROR = + "Could not create the request message to send to the server; no message will be sent"; + + public AddCMHandleProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry) { + this.dataBroker = dataBroker; + this.rpcProviderRegistry = rpcProviderRegistry; + } + + /** + * Method called when the blueprint container is created. + */ + public void init() { + serviceRegistration = rpcProviderRegistry.addRpcImplementation(CMHandleAPIService.class, this); + + LOG.debug("Initializing provider for " + appName); + + Preconditions.checkNotNull(dataBroker, "dataBroker must be set"); + + String propDir = System.getenv(SDNC_CONFIG_DIR); + if (propDir == null) { + LOG.error("Environment variable SDNC_CONFIG_DIR is not set"); + propDir = "/opt/onap/ccsdk/data/properties/"; + } else if (!propDir.endsWith("/")) { + propDir = propDir + "/"; + } + + LOG.debug("Initialization complete for " + appName); + } + + /** + * Method called when the blueprint container is destroyed. + */ + public void close() { + LOG.debug("AddCMHandleProvider Closed"); + } + + @Override + public ListenableFuture> addCMHandle(AddCMHandleInput input) { + + return null; + } +} diff --git a/sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/impl/AddCMHandleProvider.java b/sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/impl/AddCMHandleProvider.java new file mode 100644 index 000000000..6e59e072d --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/impl/AddCMHandleProvider.java @@ -0,0 +1,91 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : CCSDK + * ================================================================================ + * Copyright (C) 2021 Wipro Limited. + * ================================================================================ + * 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.impl; + +import com.google.common.base.Preconditions; +import com.google.common.util.concurrent.ListenableFuture; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.AddCMHandleInput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.AddCMHandleOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev210615.CMHandleAPIService; +import org.opendaylight.yangtools.yang.common.RpcResult; +import org.opendaylight.yangtools.yang.common.RpcResultBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AddCMHandleProvider implements CMHandleAPIService { + + private static final Logger LOG = LoggerFactory.getLogger(AddCMHandleProvider.class); + + private final String appName = "addCMHandle"; + + private final DataBroker dataBroker; + private final RpcProviderRegistry rpcProviderRegistry; + private RpcRegistration serviceRegistration; + + private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; + private static final String PROPERTIES_FILE_NAME = "cm-handle.properties"; + private static final String PARSING_ERROR = + "Could not create the request message to send to the server; no message will be sent"; + + public AddCMHandleProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry) { + this.dataBroker = dataBroker; + this.rpcProviderRegistry = rpcProviderRegistry; + } + + /** + * Method called when the blueprint container is created. + */ + public void init() { + serviceRegistration = rpcProviderRegistry.addRpcImplementation(CMHandleAPIService.class, this); + + LOG.debug("Initializing provider for " + appName); + + Preconditions.checkNotNull(dataBroker, "dataBroker must be set"); + + String propDir = System.getenv(SDNC_CONFIG_DIR); + if (propDir == null) { + LOG.error("Environment variable SDNC_CONFIG_DIR is not set"); + propDir = "/opt/onap/ccsdk/data/properties/"; + } else if (!propDir.endsWith("/")) { + propDir = propDir + "/"; + } + + LOG.debug("Initialization complete for " + appName); + } + + /** + * Method called when the blueprint container is destroyed. + */ + public void close() { + LOG.debug("AddCMHandleProvider Closed"); + } + + @Override + public ListenableFuture> addCMHandle(AddCMHandleInput input) { + + return null; + } + +} diff --git a/sdnr/northbound/addCMHandle/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml b/sdnr/northbound/addCMHandle/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml new file mode 100644 index 000000000..8e543d458 --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + diff --git a/sdnr/northbound/addCMHandle/provider/src/main/resources/cm-handle.properties b/sdnr/northbound/addCMHandle/provider/src/main/resources/cm-handle.properties new file mode 100644 index 000000000..ed3db009f --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/main/resources/cm-handle.properties @@ -0,0 +1,23 @@ +# +# ============LICENSE_START======================================================= +# ONAP : ccsdk features +# ================================================================================ +# Copyright (C) 2021 Wipro Limited. +# ================================================================================ +# 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======================================================= +# +# + + +dmaap.url = https://dmaap-message-router/events diff --git a/sdnr/northbound/addCMHandle/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/northbound/addCMHandle/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml new file mode 100644 index 000000000..8e543d458 --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + diff --git a/sdnr/northbound/addCMHandle/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProviderTest.java b/sdnr/northbound/addCMHandle/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProviderTest.java new file mode 100644 index 000000000..37711c630 --- /dev/null +++ b/sdnr/northbound/addCMHandle/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/addCMHandle/AddCMHandleProviderTest.java @@ -0,0 +1,33 @@ + +package org.onap.ccsdk.features.sdnr.northbound.addCMHandle; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + +import com.sun.jersey.api.client.WebResource; + +import java.util.concurrent.Future; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.opendaylight.yangtools.yang.common.RpcResult; + +public class AddCMHandleProviderTest { + + private AddCMHandleProvider esProvider; + + @Before + public void setUp() throws Exception { + DataBroker dataBroker = mock(DataBroker.class); + RpcProviderRegistry rpcRegistry = mock(RpcProviderRegistry.class); + esProvider = new AddCMHandleProvider(dataBroker, rpcRegistry); + } + + @After + public void tearDown() throws Exception { + } + +} diff --git a/sdnr/northbound/pom.xml b/sdnr/northbound/pom.xml index 4451530c4..6329b12f3 100644 --- a/sdnr/northbound/pom.xml +++ b/sdnr/northbound/pom.xml @@ -39,12 +39,13 @@ pom ccsdk-features :: ${project.artifactId} - SDN-R RAN, OOF PCI ANR POC, A1 Adapter, CMNotify, RANSlice + SDN-R RAN, OOF PCI ANR POC, A1 Adapter, CMNotify, RANSlice, addCMHandle oofpcipoc CMNotify ranSlice features + addCMHandle -- cgit 1.2.3-korg