Skip to content
Snippets Groups Projects
tapi-notification@2019-03-31.yang 19.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • Manuel Kieweg's avatar
    Manuel Kieweg committed
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
    module tapi-notification {
        namespace "urn:onf:otcc:yang:tapi-notification";
        prefix tapi-notification;
        import tapi-common {
            prefix tapi-common;
        }
        organization "ONF OTCC (Open Transport Configuration & Control) Project";
        contact "
             Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
             Project List: <mailto:transport-api@opennetworking.org>
             Editor: Karthik Sethuraman
                     <mailto:karthik.sethuraman@necam.com>";
        description "
            This module contains TAPI Notification Model definitions.
            Source: TapiNotification.uml
            Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.
            License: This module is distributed under the Apache License 2.0
            - The TAPI YANG models included in this TAPI release are a *normative* part of the TAPI SDK.
            - The YANG specifications have been generated from the corresponding UML model using the [ONF EAGLE UML2YANG mapping tool]
            <https://github.com/OpenNetworkingFoundation/EagleUmlYang>
            and further edited manually to comply with the [ONF IISOMI UML2YANG mapping guidelines]
            <https://wiki.opennetworking.org/display/OIMT/UML+-+YANG+Guidelines>
            - Status of YANG model artifacts can be determined by referring to the corresponding UML artifacts.
            As described in the UML models, some artifacts are considered *experimental*, and thus the corresponding YANG artifacts.
            - The ONF TAPI release process does not guarantee backward compatibility of YANG models across major versions of TAPI releases.
            The YANG model backward compatibility criteria are outlined in section 11 of <https://tools.ietf.org/html/rfc7950>.
            YANG models included in this release may not be backward compatible with previous TAPI releases.";
        revision 2019-03-31 {
            description "ONF Transport API version 2.2-RC1.
                       Changes included in this TAPI release (v2.2) are listed in
                      <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.2.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.2.0/UML>";
        }
        revision 2018-12-10 {
            description "ONF Transport API version 2.1.1.
                       Changes included in this TAPI release (v2.1.1) are listed in
                      <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.1.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.1/UML>";
        }
        revision 2018-10-16 {
            description "ONF Transport API version 2.1.0.
                       Changes included in this TAPI release (v2.1.0) are listed in
                      <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";
        }
        revision 2018-03-07 {
            description "ONF Transport API version 2.0.2
            This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
            Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML>";
        }
        revision 2018-02-16 {
            description "ONF Transport API version 2.0.1
            This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
            Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML>";
        }
        revision 2018-01-02 {
            description "ONF Transport API version 2.0.0
            This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
            Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md>";
            reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
                      <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML>";
        }
        augment "/tapi-common:context" {
            container notification-context {
                uses notification-context;
                description "Augments the base TAPI Context with NotificationService information";
            }
            description "Augments the base TAPI Context with NotificationService information";
        }
        /**************************
        * package object-classes
        **************************/ 
        grouping notification-subscription-service {
            list notification {
                key 'uuid';
                config false;
                uses notification;
                description "none";
            }
            container notification-channel {
                config false;
                uses notification-channel;
                description "none";
            }
            container subscription-filter {
                uses subscription-filter;
                description "none";
            }
            leaf subscription-state {
                type subscription-state;
                description "none";
            }
            leaf-list supported-notification-types {
                type notification-type;
                config false;
                min-elements 1;
                description "none";
            }
            leaf-list supported-object-types {
                type tapi-common:object-type;
                config false;
                min-elements 1;
                description "none";
            }
            uses tapi-common:global-class;
            description "none";
        }
        grouping subscription-filter {
            leaf-list requested-notification-types {
                type notification-type;
                description "none";
            }
            leaf-list requested-object-types {
                type tapi-common:object-type;
                description "none";
            }
            leaf-list requested-layer-protocols {
                type tapi-common:layer-protocol-name;
                description "none";
            }
            leaf-list requested-object-identifier {
                type tapi-common:uuid;
                description "none";
            }
            leaf include-content {
                type boolean;
                description "Indicates whether the published Notification includes content or just the Notification Id (which enables retrieval of the notification at the later stage)";
            }
            uses tapi-common:local-class;
            description "none";
        }
        notification notification {
            uses notification;
            description "none";
        }
        grouping notification {
            leaf notification-type {
                type notification-type;
                description "none";
            }
            leaf target-object-type {
                type tapi-common: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 source-indicator;
                description "none";
            }
            leaf layer-protocol-name {
                type tapi-common:layer-protocol-name;
                description "none";
            }
            leaf layer-protocol-qualifier {
                type tapi-common:layer-protocol-qualifier;
                description "none";
            }
            list changed-attributes {
                key 'value-name';
                uses 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";
            }
            uses tapi-common:global-class;
            description "none";
        }
        grouping notification-channel {
            leaf stream-address {
                type string;
                config false;
                description "The address/location/URI of the channel/stream to which the subscribed notifications are published.
                    This specifics of this is typically dependent on the implementation protocol & mechanism and hence is typed as a string.";
            }
            leaf next-sequence-no {
                type uint64;
                config false;
                description "The sequence number of the next notification that will be published on the channel";
            }
            uses tapi-common:local-class;
            description "none";
        }
        grouping notification-context {
            list notif-subscription {
                key 'uuid';
                uses notification-subscription-service;
                description "none";
            }
            list notification {
                key 'uuid';
                config false;
                uses notification;
                description "none";
            }
            description "none";
        }
    
        /**************************
        * package type-definitions
        **************************/ 
        identity NOTIFICATION_TYPE {
            description "none";
        }
        identity NOTIFICATION_TYPE_OBJECT_CREATION {
            base NOTIFICATION_TYPE;
            description "Not a normal state. The system is unable to determine the correct value.";
        }
        identity NOTIFICATION_TYPE_OBJECT_DELETION {
            base NOTIFICATION_TYPE;
            description "none";
        }
        identity NOTIFICATION_TYPE_ATTRIBUTE_VALUE_CHANGE {
            base NOTIFICATION_TYPE;
            description "none";
        }
        identity NOTIFICATION_OBJECT_TYPE {
        	base tapi-common:OBJECT_TYPE;
            description "none";
        }
        identity NOTIFICATION_OBJECT_TYPE_NOTIFICATION_SUBSCRIPTION_SERVICE {
            base NOTIFICATION_OBJECT_TYPE;
            description "none";
        }
        identity NOTIFICATION_OBJECT_TYPE_NOTIFICATION_FILTER {
            base NOTIFICATION_OBJECT_TYPE;
            description "none";
        }
        grouping name-and-value-change {
            leaf value-name {
                type string;
                description "The name of the value. The value need not have a name.";
            }
            leaf old-value {
                type string;
                description "The value";
            }
            leaf new-value {
                type string;
                description "The value";
            }
            description "A scoped name-value triple, including old value and new value";
        }
        typedef notification-type {
            type identityref {
                base NOTIFICATION_TYPE;
            }
            description "List of supported Notifications types.";
        }
        typedef source-indicator {
            type enumeration {
                enum RESOURCE_OPERATION {
                    description "none";
                }
                enum MANAGEMENT_OPERATION {
                    description "none";
                }
                enum UNKNOWN {
                    description "none";
                }
            }
            description "none";
        }
        typedef subscription-state {
            type enumeration {
                enum SUSPENDED {
                    description "none";
                }
                enum ACTIVE {
                    description "none";
                }
            }
            description "none";
        }
        typedef notification-object-type {
            type identityref {
                base NOTIFICATION_OBJECT_TYPE;
            }
            description "The list of TAPI Notification Object types/classes.";
        }
    
        /**************************
        * package interfaces
        **************************/ 
        rpc get-supported-notification-types {
            description "none";
            output {
                leaf-list supported-notification-types {
                    type notification-type;
                    min-elements 1;
                    description "none";
                }
                leaf-list supported-object-types {
                    type  tapi-common:object-type;
                    min-elements 1;
                    description "none";
                }
            }
        }
        rpc create-notification-subscription-service {
            description "none";
            input {
                leaf uuid {
                    type tapi-common:uuid;
                    description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable.
                        An UUID carries no semantics with respect to the purpose or state of the entity.
                        UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
                        Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
                        Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
                }
                list name {
                    key 'value-name';
                    uses tapi-common:name-and-value;
                    description "List of names. This value is unique in some namespace but may change during the life of the entity.
                        A name carries no semantics with respect to the purpose of the entity.";
                }
                container subscription-filter {
                    uses subscription-filter;
                    description "none";
                }
                leaf subscription-state {
                    type subscription-state;
                    description "none";
                }
            }
            output {
                container subscription-service {
                    uses notification-subscription-service;
                    description "none";
                }
            }
        }
        rpc update-notification-subscription-service {
            description "none";
            input {
                leaf uuid {
                    type tapi-common:uuid;
                    description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable.
                        An UUID carries no semantics with respect to the purpose or state of the entity.
                        UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
                        Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
                        Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
                }
                list name {
                    key 'value-name';
                    uses tapi-common:name-and-value;
                    description "List of names. This value is unique in some namespace but may change during the life of the entity.
                        A name carries no semantics with respect to the purpose of the entity.";
                }
                container subscription-filter {
                    uses subscription-filter;
                    description "none";
                }
                leaf subscription-state {
                    type subscription-state;
                    description "none";
                }
            }
            output {
                container subscription-service {
                    uses notification-subscription-service;
                    description "none";
                }
            }
        }
        rpc delete-notification-subscription-service {
            description "none";
            input {
                leaf uuid {
                    type tapi-common:uuid;
                    description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable.
                        An UUID carries no semantics with respect to the purpose or state of the entity.
                        UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
                        Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
                        Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
                }
            }
        }
        rpc get-notification-subscription-service-details {
            description "none";
            input {
                leaf uuid {
                    type tapi-common:uuid;
                    description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable.
                        An UUID carries no semantics with respect to the purpose or state of the entity.
                        UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
                        Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
                        Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
                }
            }
            output {
                container subscription-service {
                    uses notification-subscription-service;
                    description "none";
                }
            }
        }
        rpc get-notification-subscription-service-list {
            description "none";
            output {
                list subscription-service {
                    key 'uuid';
                    uses notification-subscription-service;
                    description "none";
                }
            }
        }
        rpc get-notification-list {
            description "none";
            input {
                leaf subscription-id {
                    type tapi-common:uuid;
                    description "UUID of the associated Notification Subscription Service: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable.
                        An UUID carries no semantics with respect to the purpose or state of the entity.
                        UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
                        Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
                        Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
                }
                container time-range {
                    uses tapi-common:time-range;
                    description "none";
                }
            }
            output {
                list notification {
                    key 'uuid';
                    uses notification;
                    description "none";
                }
            }
        }
    
    }