summaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/addCMHandle/model
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2021-08-26 16:34:02 +0000
committerNiranjana <niranjana.y60@wipro.com>2021-08-26 17:36:08 +0000
commit8e683ffdb67a8c9e254c7f6dafa857b903d7dffb (patch)
tree77d1cd7d540592f550f3ecd5a2d45acea4a81ed6 /sdnr/northbound/addCMHandle/model
parentd4ccb1d0e0fc5a82d03cccc56dbd3c547eca5ad7 (diff)
Add new feature to register cmhandle in CPS
Issue-ID: CCSDK-3342 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: If8fd65c090f6396a85b61261e0febd3333b66778
Diffstat (limited to 'sdnr/northbound/addCMHandle/model')
-rw-r--r--sdnr/northbound/addCMHandle/model/pom.xml82
-rw-r--r--sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang97
2 files changed, 179 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ ============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=======================================================
+ ~
+ -->
+
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 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.2.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId>
+ <artifactId>addCMHandle-model</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>ccsdk-features :: sdnr-northbound :: ${project.artifactId}</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>2010.09.24.12.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>2010.09.24.12.4</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/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;
+ }
+ }
+}