summaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/addCMHandle/model
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2022-03-03 12:45:38 +0000
committerNiranjana <niranjana.y60@wipro.com>2022-03-07 16:17:26 +0000
commit81043465b2a5332d21ac5b806f785ee69d6f62bf (patch)
treed1c39bd953c644fde791a2a06fedd8fa6b841d8e /sdnr/northbound/addCMHandle/model
parent1e35ebef46e712a989a50171517f96fa75191490 (diff)
Optimize cm-handle registration with CPS-DMI Plugin to upload yang model
Issue-ID: CCSDK-3597 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: I1d9b0434c72650af164acf9d03a1ed1806668b38
Diffstat (limited to 'sdnr/northbound/addCMHandle/model')
-rw-r--r--sdnr/northbound/addCMHandle/model/pom.xml14
-rw-r--r--sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle-api.yang97
-rw-r--r--sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang109
3 files changed, 129 insertions, 91 deletions
diff --git a/sdnr/northbound/addCMHandle/model/pom.xml b/sdnr/northbound/addCMHandle/model/pom.xml
index 0bed82903..ff88c64b7 100644
--- a/sdnr/northbound/addCMHandle/model/pom.xml
+++ b/sdnr/northbound/addCMHandle/model/pom.xml
@@ -3,7 +3,7 @@
~ ============LICENSE_START=======================================================
~ ONAP : ccsdk features
~ ================================================================================
- ~ Copyright (C) 2021 Wipro Limited.
+ ~ Copyright (C) 2021-2022 Wipro Limited.
~ ================================================================================
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -38,21 +38,13 @@
<dependencies>
<dependency>
- <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
- <artifactId>rfc6991</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
- <artifactId>rfc6991-ietf-inet-types</artifactId>
- </dependency>
- <dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>sal-netconf-connector</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
- <artifactId>rfc6991-ietf-yang-types</artifactId>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-dom-codec-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle-api.yang b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle-api.yang
new file mode 100644
index 000000000..29014f662
--- /dev/null
+++ b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle-api.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/model/src/main/yang/cm-handle.yang b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang
index 98e04efd0..451bc9d0b 100644
--- a/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang
+++ b/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle.yang
@@ -1,97 +1,46 @@
-/*
- * Yang model for the CMHandle registration with CPS
- *
- */
+module dmi-registry {
-module CMHandle-API {
+ yang-version 1.1;
- yang-version "1.1";
+ namespace "org:onap:cps:ncmp";
- namespace "org:onap:ccsdk";
+ prefix dmi-reg;
- prefix cmHandle-api;
+ organization "Ericsson Software Tech.";
+ contact "rahul.tyagi@est.tech";
+
+ revision "2021-05-20" {
description
- "Defines the services for cm-handle registration for the mounted devices in SDN-C.";
+ "Initial Version";
+ }
- revision "2021-06-15" {
- description
- "YANG Model for CM Handle API";
- }
+ container dmi-registry {
- /**********************************************************************************
- * 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.
- **********************************************************************************/
+ list cm-handle {
- typedef action {
- type enumeration {
- enum "addCMHandle";
- }
- description "The action to be taken by SDNR";
- }
+ key "id";
- /**********************************************************************************
- * 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.
- **********************************************************************************/
+ leaf id {
+ type string;
+ }
- /**********************************************************************************
- * All responses will include this standard header
- *
- * The standard response header includes the time of completion as well as a
- * success|failure indication
- **********************************************************************************/
+ leaf dmi-service-name {
+ type string;
+ }
+ list additional-properties {
- 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;
- }
- }
- }
+ key "name";
- 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";
- }
+ leaf name {
+ type string;
+ }
- /**********************************************************************************
- * Define the addCMHandle service
- **********************************************************************************/
- rpc addCMHandle {
- description "An operation to register the cm-handle for the mounted devices";
-
- output {
- uses status;
+ leaf value {
+ type string;
}
- }
+ }
+ }
+ }
}