Initial tapi notification implementation
[transportpce.git] / api / src / main / yang / nbi-notifications@2021-10-13.yang
similarity index 67%
rename from api/src/main/yang/nbi-notifications@2021-08-13.yang
rename to api/src/main/yang/nbi-notifications@2021-10-13.yang
index b90e196a3219b9334d725d9d1de9fa0c3e453932..e55b7816b9135a512fda8c58fd4903bf9417ec44 100644 (file)
@@ -12,6 +12,14 @@ module nbi-notifications {
   import org-openroadm-common-state-types {
     prefix org-openroadm-common-state-types;
   }
+  import tapi-common {
+    prefix tapi-common;
+    revision-date 2018-12-10;
+   }
+  import tapi-notification {
+    prefix tapi-notification;
+    revision-date 2018-12-10;
+  }
 
   organization
     "transportPCE";
@@ -21,6 +29,11 @@ module nbi-notifications {
     "YANG definitions for using REST API in NBI notifications module. Copyright
      (c) 2020 ORANGE and others. All rights reserved.";
 
+  revision 2021-10-13 {
+    description
+      "Implement new models, RPC for TAPI service notification";
+  }
+
   revision 2021-08-13 {
     description
       "Rename the groupings, containers and RPCs";
@@ -105,6 +118,69 @@ module nbi-notifications {
     }
   }
 
+  grouping notification-tapi-service {
+      leaf notification-type {
+        type tapi-notification:notification-type;
+        description "none";
+      }
+      leaf target-object-type {
+        type tapi-notification:object-type;
+        description "none";
+      }
+      leaf target-object-identifier {
+        type tapi-common:uuid;
+        description "none";
+      }
+      list target-object-name {
+        key 'value-name';
+        min-elements 1;
+        uses tapi-common:name-and-value;
+        description "none";
+      }
+      leaf event-time-stamp {
+        type tapi-common:date-and-time;
+        description "none";
+      }
+      leaf sequence-number {
+        type uint64;
+        config false;
+        description "A monotonous increasing sequence number associated with the notification.
+            The exact semantics of how this sequence number is assigned (per channel or subscription or source or system) is left undefined.";
+      }
+      leaf source-indicator {
+        type tapi-notification:source-indicator;
+        description "none";
+      }
+      leaf layer-protocol-name {
+        type tapi-common:layer-protocol-name;
+        description "none";
+      }
+      list changed-attributes {
+        key 'value-name';
+        uses tapi-notification:name-and-value-change;
+        description "none";
+      }
+      list additional-info {
+        key 'value-name';
+        uses tapi-common:name-and-value;
+        description "none";
+      }
+      leaf additional-text {
+        type string;
+        description "none";
+      }
+      container tca-info {
+        uses tapi-notification:tca-info;
+        description "none";
+      }
+      container alarm-info {
+        uses tapi-notification:alarm-info;
+        description "none";
+      }
+      uses tapi-common:resource-spec;
+      description "none";
+    }
+
   container notification-process-service {
     description
       "Model used to send a notification from a service request";
@@ -117,6 +193,12 @@ module nbi-notifications {
     uses notification-alarm-service;
     }
 
+  container notification-tapi-service {
+      description
+        "Model used to send a tapi notification";
+      uses notification-tapi-service;
+    }
+
   rpc get-notifications-process-service {
     description "Get the notifications service sent by ServiceHandler through filtering connection type";
     input {
@@ -196,4 +278,15 @@ module nbi-notifications {
      }
      uses notification-alarm-service;
   }
+
+  notification publish-tapi-notification-service {
+    description "Publish the TAPI notifications service for topic";
+    leaf topic {
+      type string;
+      mandatory true;
+      description
+        "Topic where to send the notification service";
+    }
+    uses tapi-notification:notification;
+  }
 }