module org-openroadm-network-topology { yang-version 1.1; namespace "http://org/openroadm/network/topology"; prefix topo; import ietf-network { prefix nd; revision-date 2018-02-26; } import ietf-network-topology { prefix nwt; revision-date 2018-02-26; } import org-openroadm-network-types { prefix org-openroadm-network-types; revision-date 2018-11-30; } import org-openroadm-srg { prefix srg; revision-date 2018-11-30; } import org-openroadm-degree { prefix dgr; revision-date 2018-11-30; } import org-openroadm-xponder { prefix xpdr; revision-date 2018-11-30; } import org-openroadm-external-pluggable { prefix plg; revision-date 2018-11-30; } import org-openroadm-link { prefix link; revision-date 2018-11-30; } import org-openroadm-common-state-types { prefix org-openroadm-common-state-types; revision-date 2018-11-30; } import org-openroadm-common-network { prefix cnet; revision-date 2018-11-30; } organization "OPEN ROADM MSA"; contact "OpenROADM.org."; description "YANG definitions for network view of a ROADM Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, All other rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the Members of the Open ROADM MSA Agreement nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; revision 2018-11-30 { description "Version 4.1.0"; } revision 2018-09-28 { description "Version 4.0.0"; } revision 2018-05-30 { description "Version 3.1.0"; } revision 2018-03-30 { description "Version 3.0.0"; } revision 2017-12-15 { description "Version 2.2"; } revision 2017-09-29 { description "Version 2.1"; } revision 2017-07-28 { description "Version 2.0.1 - added revision-date to imports"; } revision 2017-06-26 { description "Version 2.0"; } deviation "/nd:networks/nd:network/nd:node/cnet:node-type" { deviate add { must "(not /nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and (../cnet:node-type = 'DEGREE' or ../cnet:node-type = 'SRG' or ../cnet:node-type = 'TPDR' or ../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'EXT-PLUGGABLE' or ../cnet:node-type = 'MUXPDR'))" { error-message "Invalid node type for openroadm-topology"; description "The valid node types in the ROADM topology are 'SRG', 'DEGREE', 'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'"; } } } deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" { description "Defines which TP types can be instantiated on which Node types"; deviate add { must "/nd:network/nd:node/cnet:node-type != 'DEGREE' or (../../cnet:node-type = 'DEGREE' and (../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-RX-TTP' or ../cnet:tp-type = 'DEGREE-TXRX-TTP' or ../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'))" { error-message "Invalid TP for node type 'DEGREE'"; } must "/nd:network/nd:node/cnet:node-type != 'SRG' or (../../cnet:node-type = 'SRG' and (../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP' or ../cnet:tp-type = 'SRG-RX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-TXRX-PP'))" { error-message "Invalid TP for node type 'SRG'"; } must " (/nd:network/nd:node/cnet:node-type != 'TPDR' and ../../cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'REGEN' and ../../cnet:node-type != 'REGEN-UNI' and ../../cnet:node-type != 'SWITCH') or ((../../cnet:node-type = 'TPDR' or ../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'REGEN' or ../../cnet:node-type = 'REGEN-UNI' or ../../cnet:node-type = 'SWITCH') and (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" { error-message "Invalid TP for node type 'XPONDER'"; } must "/nd:network/nd:node/cnet:node-type != 'EXT-PLUGGABLE' or (../../cnet:node-type = 'EXT-PLUGGABLE' and ../cnet:tp-type = 'EXT-PLUGGABLE-TP')" { error-message "Invalid TP for node type 'EXT-PLUGGABLE'"; } } } deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" { deviate add { must "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and (../cnet:link-type = 'ROADM-TO-ROADM' or ../cnet:link-type = 'ADD-LINK' or ../cnet:link-type = 'DROP-LINK' or ../cnet:link-type = 'EXPRESS-LINK' or ../cnet:link-type = 'XPONDER-INPUT' or ../cnet:link-type = 'XPONDER-OUTPUT'))" { error-message "Invalid link type for openroadm-topology"; description "The valid link types in the ROADM topology are 'ROADM-TO-ROADM', 'ADD-LINK', 'DROP-LINK', 'EXPRESS-LINK', 'XPONDER-INPUT', 'XPONDER-OUTPUT'"; } } } augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" { description "Introduce new network type for the Open ROADM optical ` network topology"; container openroadm-topology { presence "indicates optical network topology for Open ROADMs"; } } augment "/nd:networks/nd:network/nd:node" { when "../nd:network-types/cnet:openroadm-common-network/openroadm-topology"; description "This augmentations adds the ROADM Node type to the generic node definition and defines node-specific attributes for each node type in the ROADM Topology."; leaf node-type { type org-openroadm-network-types:openroadm-node-type; must "(../node-type = 'DEGREE' or ../node-type = 'SRG' or ../node-type = 'TPDR' or ../node-type = 'SWITCH' or ../node-type = 'REGEN' or ../node-type = 'REGEN-UNI' or ../node-type = 'EXT-PLUGGABLE' or ../node-type = 'MUXPDR')" { error-message "Invalid node type for openroadm-topology"; } status deprecated; description "The type of a node in the ROADM topology. Valid node types are 'SRG', 'DEGREE', 'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'"; } container srg-attributes { when "../cnet:node-type = 'SRG'"; description "Topology-related attributes for SRG nodes"; uses srg:srg-node-attributes; } container degree-attributes { when "../cnet:node-type = 'DEGREE'"; description "Topology-related attributes for degree nodes"; uses dgr:degree-node-attributes; } container xpdr-attributes { when "../cnet:node-type = 'TPDR' or ../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'SWITCH'"; description "Topology-related attributes for Xponder nodes"; uses xpdr:xpdr-topo-node-attributes; } } augment "/nd:networks/nd:network/nd:node/nwt:termination-point" { when "../../nd:network-types/cnet:openroadm-common-network/openroadm-topology"; description "Defines the type of a termination point in the ROADM topology and TP-specific attributes for each termination point type."; leaf tp-type { type org-openroadm-network-types:openroadm-tp-type; must "../../topo:node-type != 'DEGREE' or (../../topo:node-type = 'DEGREE' and (../topo:tp-type = 'DEGREE-TX-TTP' or ../topo:tp-type = 'DEGREE-RX-TTP' or ../topo:tp-type = 'DEGREE-TXRX-TTP' or ../topo:tp-type = 'DEGREE-TX-CTP' or ../topo:tp-type = 'DEGREE-RX-CTP' or ../topo:tp-type = 'DEGREE-TXRX-CTP'))" { error-message "Invalid TP for node type 'DEGREE'"; } must "../../topo:node-type != 'SRG' or (../../topo:node-type = 'SRG' and (../topo:tp-type = 'SRG-TX-CP' or ../topo:tp-type = 'SRG-RX-CP' or ../topo:tp-type = 'SRG-TXRX-CP' or ../topo:tp-type = 'SRG-RX-PP' or ../topo:tp-type = 'SRG-TX-PP' or ../topo:tp-type = 'SRG-TXRX-PP'))" { error-message "Invalid TP for node type 'SRG'"; } must " (../../topo:node-type != 'TPDR' and ../../topo:node-type != 'MUXPDR' and ../../topo:node-type != 'REGEN' and ../../topo:node-type != 'REGEN-UNI' and ../../topo:node-type != 'SWITCH') or ((../../topo:node-type = 'TPDR' or ../../topo:node-type = 'MUXPDR' or ../../topo:node-type = 'REGEN' or ../../topo:node-type = 'REGEN-UNI' or ../../topo:node-type = 'SWITCH') and (../topo:tp-type = 'XPONDER-NETWORK' or ../topo:tp-type = 'XPONDER-CLIENT' or ../topo:tp-type = 'XPONDER-PORT'))" { error-message "Invalid TP for node type 'XPONDER'"; } must "../../topo:node-type != 'EXT-PLUGGABLE' or (../../topo:node-type = 'EXT-PLUGGABLE' and ../topo:tp-type = 'EXT-PLUGGABLE-TP')" { error-message "Invalid TP for node type 'EXT-PLUGGABLE'"; } status deprecated; description "The TP type; also defines which TP types can be instantiated on which Node types"; } container tx-ttp-attributes { when "../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-TXRX-TTP'"; description "There must be only one TP of type DEGREE-TX-TTP in any given degree node"; uses dgr:degree-used-wavelengths; } container rx-ttp-attributes { when "../cnet:tp-type = 'DEGREE-RX-TTP'"; description "There must be only one TP of type DEGREE-RX-TTP in any given degree node"; uses dgr:degree-used-wavelengths; } container ctp-attributes { when "../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'"; uses dgr:degree-used-wavelengths; } container cp-attributes { when "../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP'"; description "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this will hold list of used spectra"; list used-wavelengths { key "index"; uses org-openroadm-network-types:wavelengths; } } container pp-attributes { when "../cnet:tp-type = 'SRG-TXRX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-RX-PP' "; description "This list is created to accommodate fixed grid (1.2.1) as well as flex grid (2.0 above). In case of fixed grid index number will refer to one of the 96 WL defined in the wavelength map file. In case of flex grid this will hold list of used spectra"; list used-wavelength { key "index"; uses org-openroadm-network-types:wavelengths; } } leaf eqpt-srg-id { when "../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'EXT-PLUGGABLE-TP' or ../cnet:tp-type = 'XPONDER-PORT'"; type uint32; status deprecated; description "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id"; } container xpdr-client-attributes { when "../../topo:node-type = 'TPDR' and ../cnet:tp-type = 'XPONDER-CLIENT'"; description "Topology layer will allow client TPs only for Transponder nodes"; uses xpdr:xpdr-connection-attributes; uses xpdr:xpdr-port-connection-attributes; } container xpdr-network-attributes { when "../cnet:tp-type = 'XPONDER-NETWORK'"; uses xpdr:xpdr-connection-attributes; uses xpdr:xpdr-port-connection-attributes; } container xpdr-port-attributes { when "../cnet:tp-type = 'XPONDER-PORT'"; uses xpdr:xpdr-connection-attributes; uses xpdr:xpdr-port-connection-attributes; } container ext-pluggable-attributes { when "../cnet:tp-type = 'EXT-PLUGGABLE-TP'"; uses plg:pluggable-tp-attributes; } } augment "/nd:networks/nd:network/nwt:link" { when "../nd:network-types/cnet:openroadm-common-network/openroadm-topology"; description "This augmentation defines ROADM link types in the ROADM topology"; leaf link-type { type org-openroadm-network-types:openroadm-link-type; must "(../link-type = 'ROADM-TO-ROADM' or ../link-type = 'ADD-LINK' or ../link-type = 'DROP-LINK' or ../link-type = 'EXPRESS-LINK' or ../link-type = 'XPONDER-INPUT' or ../link-type = 'XPONDER-OUTPUT')" { error-message "Invalid link type for openroadm-topology"; } status deprecated; } leaf link-length { type decimal64 { fraction-digits 2; } status deprecated; } leaf administrative-group { type uint32; status deprecated; description "according to RFC 3630 definition"; } leaf operational-state { type org-openroadm-common-state-types:state; status deprecated; } leaf administrative-state { type org-openroadm-common-state-types:state; status deprecated; } leaf link-latency { type uint32; status deprecated; description "Latency of a link"; } leaf amplified { when "../cnet:link-type = 'ROADM-TO-ROADM'"; type boolean; description "defines whether an ROADM-TO-ROADM Link includes line amplifiers or not"; } leaf TE-metric { type uint32; status deprecated; description "defines a Traffic Engineering metric which could be used for any type of link. Supersedes TE-metric originally defined in OMS-attributes grouping"; } leaf opposite-link { type leafref { path "../../nwt:link/nwt:link-id"; } status deprecated; description "optional - pointer to reverse link in case of bidirectional link. Supersedes opposite-link originally defined in OMS-attributes container, to apply to any kind of link in the topology"; } container OMS-attributes { when "../cnet:link-type = 'ROADM-TO-ROADM'"; description ""; uses link:OMS-attributes; leaf opposite-link { type leafref { path "../../../nwt:link/nwt:link-id"; } status deprecated; description "optional - pointer to reverse link in case of bidirectional link"; } container span { when "../../amplified = 'false'"; description ""; uses link:span-attributes; } container amplified-link { when "../../amplified = 'true'"; description "when amplified is set to true, rather than a simple OMS section we have an amplified link"; uses link:amplified-link-attributes; } } } }