+++ /dev/null
-module nbi-notifications {
- yang-version 1;
- namespace "nbi-notifications";
- prefix nbinotifications;
-
- import org-openroadm-service {
- prefix oor-service;
- }
- import org-openroadm-common-service-types {
- prefix org-openroadm-common-service-types;
- }
- import org-openroadm-common-state-types {
- prefix org-openroadm-common-state-types;
- }
-
- organization
- "transportPCE";
- contact
- "transportPCE committers - ODL";
- description
- "YANG definitions for using REST API in NBI notifications module. Copyright
- (c) 2020 ORANGE and others. All rights reserved.";
-
- revision 2021-08-13 {
- description
- "Rename the groupings, containers and RPCs";
- }
-
- revision 2021-06-28 {
- description
- "Implement new models, RPC for service alarms";
- }
-
- revision 2020-11-30 {
- description
- "Initial revision of NBI notifications";
- }
-
- grouping notification-process-service {
- leaf message {
- type string;
- mandatory true;
- description
- "Message for the specified service";
- }
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be created in the ROADM network, e.g., CLFI, CLCI, etc.
- This is reported against the service, but may not get reflected in the service in the network.";
- }
- leaf common-id {
- type string;
- description
- "To be used by the ROADM controller to identify the routing constraints
- received from planning application (PED).";
- }
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- }
- container service-a-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- container service-z-end {
- uses org-openroadm-common-service-types:service-endpoint;
- }
- leaf response-failed {
- type string;
- description
- "Response of the error if the service request encountered an anomaly";
- }
- leaf operational-state {
- type org-openroadm-common-state-types:state;
- config false;
- description
- "Operational State: Actual state of service";
- }
- }
-
- grouping notification-alarm-service {
- leaf message {
- type string;
- mandatory true;
- description
- "Message for the specified service";
- }
- leaf service-name {
- type string;
- mandatory true;
- description
- "Identifier for the service to be created in the ROADM network, e.g., CLFI, CLCI, etc.
- This is reported against the service, but may not get reflected in the service in the network.";
- }
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- }
- leaf operational-state {
- type org-openroadm-common-state-types:state;
- config false;
- description
- "Operational State: Actual state of service";
- }
- }
-
- container notification-process-service {
- description
- "Model used to send a notification from a service request";
- uses notification-process-service;
- }
-
- container notification-alarm-service {
- description
- "Model used to send a notification from the service listener";
- uses notification-alarm-service;
- }
-
- rpc get-notifications-process-service {
- description "Get the notifications service sent by ServiceHandler through filtering connection type";
- input {
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- description
- "Type connection of the service ";
- }
- leaf id-consumer {
- type string;
- mandatory true;
- description
- "Unique ID for the consumer";
- }
- leaf group-id {
- type string;
- mandatory true;
- description
- "ID Group for the consumer";
- }
- }
- output {
- list notifications-process-service {
- uses notification-process-service;
- }
- }
- }
-
- rpc get-notifications-alarm-service {
- description "Get the notifications alarm service sent by ServiceListener through filtering connection type";
- input {
- leaf connection-type {
- type org-openroadm-common-service-types:connection-type;
- mandatory true;
- description
- "Type connection of the service";
- }
- leaf id-consumer {
- type string;
- mandatory true;
- description
- "Unique ID for the consumer";
- }
- leaf group-id {
- type string;
- mandatory true;
- description
- "ID Group for the consumer";
- }
- }
- output {
- list notifications-alarm-service {
- uses notification-alarm-service;
- }
- }
- }
-
- notification publish-notification-process-service {
- description "Publish the notifications service through a publisher";
- leaf publisher-name {
- type string;
- mandatory true;
- description
- "Name of the publisher";
- }
- uses notification-process-service;
- }
-
- notification publish-notification-alarm-service {
- description "Publish the notifications service alarm through a publisher";
- leaf publisher-name {
- type string;
- mandatory true;
- description
- "Name of the publisher";
- }
- uses notification-alarm-service;
- }
-}