Adding OpenConfig YANG models.
Change-Id: I0a2fdd5826e80933cf4b9ae939ff3051acec02aa
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-channel-monitor.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-channel-monitor.yang
new file mode 100644
index 0000000..f745005
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-channel-monitor.yang
@@ -0,0 +1,324 @@
+module openconfig-channel-monitor {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/channel-monitor";
+
+ prefix "oc-chan-monitor";
+
+ // import some basic types
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-interfaces { prefix oc-if; }
+ import openconfig-platform { prefix oc-platform; }
+ import openconfig-transport-types { prefix oc-opt-types; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This model describes operational state data for an optical
+ channel monitor (OCM) for optical transport line system
+ elements such as wavelength routers (ROADMs) and amplifiers.";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2017-07-08" {
+ description
+ "Support multiple OCMs, add refs to hw ports, ";
+ reference "0.3.0";
+ }
+
+ revision "2017-03-28" {
+ description
+ "Added min/max/avg stats, status for media channels, OCM, APS";
+ reference "0.2.0";
+ }
+
+ revision "2016-09-14" {
+ description
+ "Initial revision";
+ reference "0.1.0";
+ }
+
+
+
+ // grouping statements
+
+ grouping media-channel-port-config {
+ description
+ "Configuration data for a media channel source/dest port";
+
+ leaf port-name {
+ type oc-if:base-interface-ref;
+ description
+ "Reference to the corresponding node interface";
+ }
+ }
+
+ grouping media-channel-port-state {
+ description
+ "Operational state data for a media channel source/dest port";
+ }
+
+ grouping media-channel-source-port-top {
+ description
+ "Top-level grouping for source of the media channel";
+
+ container source {
+ description
+ "Top-level container for media channel source";
+
+ container config {
+ description
+ "Configuration data for the media channel source";
+
+ uses media-channel-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the media channel source";
+
+ uses media-channel-port-config;
+ uses media-channel-port-state;
+ }
+ }
+ }
+
+ grouping media-channel-dest-port-top {
+ description
+ "Top-level grouping for destination of the media channel";
+
+ container dest {
+ description
+ "Top-level container for media channel destination";
+
+ container config {
+ description
+ "Configuration data for the media channel destination";
+
+ uses media-channel-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the media channel destination";
+
+ uses media-channel-port-config;
+ uses media-channel-port-state;
+ }
+ }
+ }
+
+ grouping media-channel-psd-state {
+ description
+ "Operational state data for the media channel PSD";
+
+ leaf lower-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "Lower frequency of the specified PSD";
+ }
+
+ leaf upper-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "Upper frequency of the specified PSD";
+ }
+
+ leaf psd {
+ type oc-types:ieeefloat32;
+ units "nW/MHz";
+ description
+ "Power spectral density expressed in nanowatts per
+ megahertz, nW/MHz. These units allow the value to often
+ be greater than 1.0. It also avoids dealing with zero values
+ for 0dBm. For example, a 40GHz wide channel
+ with 0dBm power would be:
+ 0dBm = 1mW = 10^6nW
+ 40GHz = 40,000MHz
+ 0dBm/40GHz = 10^6nW/40,000MHz = 1000/40 = 25";
+ }
+ }
+
+
+ grouping media-channel-psd-top {
+ description
+ "Top-level grouping ";
+
+ container channels {
+ description
+ "Enclosing container for the list of values describing
+ the power spectral density distribution";
+
+ list channel {
+ key "lower-frequency upper-frequency";
+ config false;
+ description
+ "List of tuples describing the PSD distribution";
+
+ leaf lower-frequency {
+ type leafref {
+ path "../state/lower-frequency";
+ }
+ description
+ "Reference to the list key";
+ }
+
+ leaf upper-frequency {
+ type leafref {
+ path "../state/upper-frequency";
+ }
+ description
+ "Reference to the list key";
+ }
+
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for PSD";
+
+ uses media-channel-psd-state;
+ }
+ }
+ }
+ }
+
+ grouping media-channel-config {
+ description
+ "Configuration data for media channel definitions";
+
+ leaf index {
+ type uint32;
+ description
+ "Identifier for the defined media channel";
+ }
+
+ leaf lower-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "The lower frequency for the spectrum defined by this media
+ channel";
+ }
+
+ leaf upper-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "The upper frequency for the spectrum defined by this media
+ channel";
+ }
+
+ }
+
+ grouping channel-monitor-config {
+ description
+ "Configuration data for the optical channel monitor";
+
+ leaf name {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to system-supplied name of the port on the
+ optical channel monitor (OCM). If this port is embedded
+ in another card (i.e. an amplifier card) the device
+ should still define a port representing the OCM even if
+ it is internal and not physically present on the
+ faceplate of the card";
+ }
+
+ leaf monitor-port {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to system-supplied name of the port that the
+ channel monitor is physically connected to. This port
+ will be of type MONITOR. This port is a tap off of the
+ monitored-port and would be in the same card as the
+ monitored port. If this port is embedded in another card
+ (i.e. an amplifier card) the device should still define
+ a port representing the monitor port if it is internal
+ and not physically present on the faceplate of the card";
+ }
+ }
+
+ grouping channel-monitor-state {
+ description
+ "Operational state data ";
+ }
+
+ grouping channel-monitor-top {
+ description
+ "Top-level grouping ";
+
+ container channel-monitors {
+ description
+ "Top-level container for optical channel monitors";
+
+ list channel-monitor {
+ key "name";
+ description
+ "List of channel monitors, keyed by channel monitor name.";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ }
+ description
+ "References the optical channel monitor name";
+ }
+
+ container config {
+ description
+ "Configuration data ";
+
+ uses channel-monitor-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data ";
+
+ uses channel-monitor-config;
+ uses channel-monitor-state;
+ }
+
+ uses media-channel-psd-top;
+ }
+ }
+ }
+
+ // data definition statements
+
+ uses channel-monitor-top;
+
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-optical-amplifier.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-optical-amplifier.yang
new file mode 100644
index 0000000..02b668c
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-optical-amplifier.yang
@@ -0,0 +1,403 @@
+module openconfig-optical-amplifier {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/optical-amplfier";
+
+ prefix "oc-opt-amp";
+
+ import openconfig-platform { prefix oc-platform; }
+ import openconfig-transport-line-common { prefix oc-line-com; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-extensions { prefix oc-ext; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This model describes configuration and operational state data
+ for optical amplifiers, deployed as part of a transport
+ line system.";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2017-07-08" {
+ description
+ "Add monitor port type and refs to hw ports, ";
+ reference "0.3.0";
+ }
+
+ revision "2017-03-28" {
+ description
+ "Added min/max/avg stats, status for media channels, OCM, APS";
+ reference "0.2.0";
+ }
+
+ revision "2016-03-31" {
+ description
+ "Initial public release";
+ reference "0.1.0";
+ }
+
+
+ // extension statements
+
+ // feature statements
+
+ // identity statements
+
+ identity OPTICAL_AMPLIFIER_TYPE {
+ description
+ "Type definition for different types of optical amplifiers";
+ }
+
+ identity EDFA {
+ base OPTICAL_AMPLIFIER_TYPE;
+ description
+ "Erbium doped fiber amplifer (EDFA)";
+ }
+
+ identity FORWARD_RAMAN {
+ base OPTICAL_AMPLIFIER_TYPE;
+ description
+ "Forward pumping Raman amplifier";
+ }
+
+ identity BACKWARD_RAMAN {
+ base OPTICAL_AMPLIFIER_TYPE;
+ description
+ "Backward pumping Raman amplifier";
+ }
+
+ identity HYBRID {
+ base OPTICAL_AMPLIFIER_TYPE;
+ description
+ "Hybrid backward pumping Raman + EDFA amplifier";
+ }
+
+ identity GAIN_RANGE {
+ description
+ "Base type for expressing the gain range for a switched gain
+ amplifier. The gain range is expressed as a generic setting,
+ e.g., LOW/MID/HIGH. The actual db range will be determined
+ by the implementation.";
+ }
+
+ identity LOW_GAIN_RANGE {
+ base GAIN_RANGE;
+ description
+ "LOW gain range setting";
+ }
+
+ identity MID_GAIN_RANGE {
+ base GAIN_RANGE;
+ description
+ "MID gain range setting";
+ }
+
+ identity HIGH_GAIN_RANGE {
+ base GAIN_RANGE;
+ description
+ "HIGH gain range setting";
+ }
+
+ identity FIXED_GAIN_RANGE {
+ base GAIN_RANGE;
+ description
+ "Fixed or non-switched gain amplfier";
+ }
+
+ identity OPTICAL_AMPLIFIER_MODE {
+ description
+ "Type definition for different types of optical amplifier
+ operating modes";
+ }
+
+ identity CONSTANT_POWER {
+ base OPTICAL_AMPLIFIER_MODE;
+ description
+ "Constant power mode";
+ }
+
+ identity CONSTANT_GAIN {
+ base OPTICAL_AMPLIFIER_MODE;
+ description
+ "Constant gain mode";
+ }
+
+
+ // grouping statements
+
+ grouping optical-amplifier-config {
+ description
+ "Configuration data for optical amplifiers";
+
+ leaf name {
+ type string;
+ description
+ "User-defined name assigned to identify a specific amplifier
+ in the device";
+ }
+
+ leaf type {
+ type identityref {
+ base OPTICAL_AMPLIFIER_TYPE;
+ }
+ description
+ "Type of the amplifier";
+ }
+
+ leaf target-gain {
+ type decimal64 {
+ fraction-digits 2;
+ range 0..max;
+ }
+ units dB;
+ description
+ "Positive gain applied by the amplifier.";
+ }
+
+ leaf target-gain-tilt {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "Gain tilt control";
+ }
+
+ leaf gain-range {
+ type identityref {
+ base GAIN_RANGE;
+ }
+ description
+ "Selected gain range. The gain range is a platform-defined
+ value indicating the switched gain amplifier setting";
+ }
+
+ leaf amp-mode {
+ type identityref {
+ base OPTICAL_AMPLIFIER_MODE;
+ }
+ description
+ "The operating mode of the amplifier";
+ }
+
+ leaf target-output-power {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "Output optical power of the amplifier.";
+ }
+
+ leaf enabled {
+ type boolean;
+ description
+ "Turns power on / off to the amplifiers gain module.";
+ }
+
+ }
+
+ grouping optical-amplifier-state {
+ description
+ "Operational state data for optical amplifiers";
+
+ leaf ingress-port {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to system-supplied name of the amplifier ingress
+ port. This leaf is only valid for ports of type INGRESS.";
+ }
+
+ leaf egress-port {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to system-supplied name of the amplifier egress
+ port. This leaf is only valid for ports of type EGRESS.";
+ }
+
+ container actual-gain {
+ description
+ "The actual gain applied by the amplifier in units of
+ 0.01dB. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dB;
+ }
+
+ container actual-gain-tilt {
+ description
+ "The actual tilt applied by the amplifier in units of
+ 0.01dB. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dB;
+ }
+
+ container input-power-total {
+ description
+ "The total input optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container input-power-c-band {
+ description
+ "The C band (consisting of approximately 191 to 195 THz or
+ 1530nm to 1565 nm) input optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container input-power-l-band {
+ description
+ "The L band (consisting of approximately 184 to 191 THz or
+ 1565 to 1625 nm) input optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container output-power-total {
+ description
+ "The total output optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container output-power-c-band {
+ description
+ "The C band (consisting of approximately 191 to 195 THz or
+ 1530nm to 1565 nm)output optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container output-power-l-band {
+ description
+ "The L band (consisting of approximately 184 to 191 THz or
+ 1565 to 1625 nm)output optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container laser-bias-current {
+ description
+ "The current applied by the system to the transmit laser to
+ achieve the output power. The current is expressed in mA
+ with up to two decimal precision. If avg/min/max statistics
+ are not supported, just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-mA;
+ }
+
+ container optical-return-loss {
+ description
+ "The optical return loss (ORL) is the ratio of the light
+ reflected back into the port to the light launched out of
+ the port. ORL is in units of 0.01dBm. If avg/min/max
+ statistics are not supported, just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+ }
+
+ grouping optical-amplifier-top {
+ description
+ "Top-level grouping for optical amplifier data";
+
+ container optical-amplifier {
+ description
+ "Enclosing container for amplifiers and supervisory channels";
+
+ container amplifiers {
+ description
+ "Enclosing container for list of amplifiers";
+
+ list amplifier {
+ key "name";
+ description
+ "List of optical amplifiers present in the device";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ }
+ description
+ "Reference to the name of the amplifier";
+ }
+
+ container config {
+ description
+ "Configuration data for the amplifier";
+
+ uses optical-amplifier-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the amplifier";
+
+ uses optical-amplifier-config;
+ uses optical-amplifier-state;
+ }
+ }
+ }
+
+ container supervisory-channels {
+ description
+ "Enclosing container for list of supervisory channels";
+
+ list supervisory-channel {
+ key "interface";
+ description
+ "List of supervisory channels";
+
+ leaf interface {
+ type leafref {
+ path "../config/interface";
+ }
+ description
+ "Reference to the interface of the supervisory channel";
+ }
+
+ uses oc-line-com:optical-osc-top;
+ }
+ }
+ }
+ }
+
+ // data definition statements
+
+ uses optical-amplifier-top;
+
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-terminal-device.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-terminal-device.yang
new file mode 100644
index 0000000..0319a6c
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-terminal-device.yang
@@ -0,0 +1,1141 @@
+module openconfig-terminal-device {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/terminal-device";
+
+ prefix "oc-opt-term";
+
+ import openconfig-types { prefix oc-types; }
+ import openconfig-transport-types { prefix oc-opt-types; }
+ import openconfig-if-ethernet { prefix oc-eth; }
+ import openconfig-platform { prefix oc-platform; }
+ import openconfig-platform-transceiver { prefix oc-transceiver; }
+ import openconfig-extensions { prefix oc-ext; }
+ import ietf-yang-types { prefix yang; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module describes a terminal optics device model for
+ managing the terminal systems (client and line side) in a
+ DWDM transport network.
+
+ Elements of the model:
+
+ physical port: corresponds to a physical, pluggable client
+ port on the terminal device. Examples includes 10G, 40G, 100G
+ (e.g., 10x10G, 4x25G or 1x100G) and 400G/1T in the future.
+ Physical client ports will have associated operational state or
+ PMs.
+
+ physical channel: a physical lane or channel in the
+ physical client port. Each physical client port has 1 or more
+ channels. An example is 100GBASE-LR4 client physical port having
+ 4x25G channels. Channels have their own optical PMs and can be
+ monitored independently within a client physical port (e.g.,
+ channel power). Physical client channels are defined in the
+ model as part of a physical client port, and are modeled
+ primarily for reading their PMs.
+
+ logical channel: a logical grouping of logical grooming elements
+ that may be assigned to subsequent grooming stages for
+ multiplexing / de-multiplexing, or to an optical channel for
+ line side transmission. The logical channels can represent, for
+ example, an ODU/OTU logical packing of the client
+ data onto the line side. Tributaries are similarly logical
+ groupings of demand that can be represented in this structure and
+ assigned to an optical channel. Note that different types of
+ logical channels may be present, each with their corresponding
+ PMs.
+
+ optical channel: corresponds to an optical carrier and is
+ assigned a wavelength/frequency. Optical channels have PMs
+ such as power, BER, and operational mode.
+
+ Directionality:
+
+ To maintain simplicity in the model, the configuration is
+ described from client-to-line direction. The assumption is that
+ equivalent reverse configuration is implicit, resulting in
+ the same line-to-client configuration.
+
+ Physical layout:
+
+ The model does not assume a particular physical layout of client
+ and line ports on the terminal device (e.g., such as number of
+ ports per linecard, separate linecards for client and line ports,
+ etc.).";
+
+ oc-ext:openconfig-version "1.0.0";
+
+ revision "2017-07-08" {
+ description
+ "Adds test-signal";
+ reference "1.0.0";
+ }
+
+ revision "2016-12-22" {
+ description
+ "Fixes and additions to terminal optics model";
+ reference "0.4.0";
+ }
+
+
+ grouping terminal-input-optical-power {
+ description
+ "Reusable leaves related to input optical power";
+
+ leaf input-power {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The input optical power of this port in units of 0.01dBm.
+ If the port is an aggregate of multiple physical channels,
+ this attribute is the total power or sum of all channels.";
+ }
+ }
+
+ grouping terminal-ethernet-protocol-config {
+ description
+ "Configuration data for logical channels with Ethernet
+ framing";
+
+ //TODO:currently a empty container
+ }
+
+ grouping terminal-ethernet-protocol-state {
+ description
+ "Ethernet-specific counters when logical channel
+ is using Ethernet protocol framing, e.g., 10GE, 100GE";
+
+ uses oc-eth:ethernet-interface-state-counters;
+ }
+
+ grouping terminal-ethernet-protocol-top {
+ description
+ "Top-level grouping for data related to Ethernet protocol
+ framing on logical channels";
+
+ container ethernet {
+ description
+ "Top level container for data related to Ethernet framing
+ for the logical channel";
+
+ container config {
+ description
+ "Configuration data for Ethernet protocol framing on
+ logical channels";
+
+ uses terminal-ethernet-protocol-config;
+ }
+
+ container state {
+ config false;
+ description
+ "Operational state data for Ethernet protocol framing
+ on logical channels";
+
+ uses terminal-ethernet-protocol-state;
+ }
+ }
+ }
+
+ grouping terminal-otn-protocol-config {
+ description
+ "OTU configuration when logical channel
+ framing is using an OTU protocol, e.g., OTU1, OTU3, etc.";
+
+ leaf tti-msg-transmit {
+ type string;
+ description
+ "Trail trace identifier (TTI) message transmitted";
+ }
+
+ leaf tti-msg-expected {
+ type string;
+ description
+ "Trail trace identifier (TTI) message expected";
+ }
+
+ leaf tti-msg-auto {
+ type boolean;
+ description
+ "Trail trace identifier (TTI) transmit message automatically
+ created. If true, then setting a custom transmit message
+ would be invalid.";
+ }
+ }
+
+ grouping terminal-otn-protocol-counter-stats {
+ description
+ "Counter based statistics containers for logical channels
+ using OTN framing";
+
+ leaf errored-seconds {
+ type yang:counter64;
+ description
+ "The number of seconds that at least one errored blocks
+ occurs, at least one code violation occurs, loss of sync is
+ detected or loss of signal is detected";
+ }
+
+ leaf severely-errored-seconds {
+ type yang:counter64;
+ description
+ "The number of seconds that loss of frame is detected OR
+ the number of errored blocks, code violations, loss of sync
+ or loss of signal is detected exceeds a predefined
+ threshold";
+ }
+
+ leaf unavailable-seconds {
+ type yang:counter64;
+ description
+ "The number of seconds during which the link is unavailable";
+ }
+
+ leaf code-violations {
+ type yang:counter64;
+ description
+ "For ethernet or fiberchannel links, the number of 8b/10b
+ coding violations. For SONET/SDH, the number of BIP (bit
+ interleaved parity) errors";
+ }
+
+ leaf fec-uncorrectable-words {
+ type yang:counter64;
+ description
+ "The number words that were uncorrectable by the FEC";
+ }
+
+ leaf fec-corrected-bytes {
+ type yang:counter64;
+ description
+ "The number of bytes that were corrected by the FEC";
+ }
+
+ leaf fec-corrected-bits {
+ type yang:counter64;
+ description
+ "The number of bits that were corrected by the FEC";
+ }
+
+ leaf background-block-errors {
+ type yang:counter64;
+ description
+ "The number of background block errors";
+ }
+ }
+
+ grouping terminal-otn-protocol-multi-stats {
+ description
+ "Multi-value statistics containers for logical channels using
+ OTN framing (e.g., max, min, avg, instant)";
+
+ container pre-fec-ber {
+ description
+ "Bit error rate before forward error correction -- computed
+ value with 18 decimal precision. Note that decimal64
+ supports values as small as i x 10^-18 where i is an
+ integer. Values smaller than this should be reported as 0
+ to inidicate error free or near error free performance.
+ Values include the instantaneous, average, minimum, and
+ maximum statistics. If avg/min/max statistics are not
+ supported, the target is expected to just supply the
+ instant value";
+
+ uses oc-opt-types:avg-min-max-instant-stats-precision18-ber;
+ }
+
+ container post-fec-ber {
+ description
+ "Bit error rate after forward error correction -- computed
+ value with 18 decimal precision. Note that decimal64
+ supports values as small as i x 10^-18 where i is an
+ integer. Values smaller than this should be reported as 0
+ to inidicate error free or near error free performance.
+ Values include the instantaneous, average, minimum, and
+ maximum statistics. If avg/min/max statistics are not
+ supported, the target is expected to just supply the
+ instant value";
+
+ uses oc-opt-types:avg-min-max-instant-stats-precision18-ber;
+ }
+
+ container q-value {
+ description
+ "Quality value (factor) in dB of a channel with two
+ decimal precision. Values include the instantaneous,
+ average, minimum, and maximum statistics. If avg/min/max
+ statistics are not supported, the target is expected
+ to just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dB;
+ }
+
+ container esnr {
+ description
+ "Electrical signal to noise ratio. Baud rate
+ normalized signal to noise ratio based on
+ error vector magnitude in dB with two decimal
+ precision. Values include the instantaneous, average,
+ minimum, and maximum statistics. If avg/min/max
+ statistics are not supported, the target is expected
+ to just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dB;
+ }
+ }
+
+ grouping terminal-otn-protocol-state {
+ description
+ "OTU operational state when logical channel
+ framing is using an OTU protocol, e.g., OTU1, OTU3, etc.";
+
+
+ leaf tti-msg-recv {
+ type string;
+ description
+ "Trail trace identifier (TTI) message received";
+ }
+
+ leaf rdi-msg {
+ type string;
+ description
+ "Remote defect indication (RDI) message received";
+ }
+ uses terminal-otn-protocol-counter-stats;
+ uses terminal-otn-protocol-multi-stats;
+ }
+
+ grouping terminal-otn-protocol-top {
+ description
+ "Top-level grouping for data related to OTN protocol framing";
+
+ container otn {
+ description
+ "Top level container for OTU configuration when logical
+ channel framing is using an OTU protocol, e.g., OTU1, OTU3,
+ etc.";
+
+ container config {
+ description
+ "Configuration data for OTN protocol framing";
+
+ uses terminal-otn-protocol-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for OTN protocol PMs, statistics,
+ etc.";
+
+ uses terminal-otn-protocol-config;
+ uses terminal-otn-protocol-state;
+ }
+ }
+ }
+
+ grouping terminal-client-port-assignment-config {
+ description
+ "Configuration data for assigning physical client ports to
+ logical channels";
+
+ leaf index {
+ type uint32;
+ description
+ "Index of the client port assignment";
+ }
+
+ leaf description {
+ type string;
+ description
+ "Descriptive name for the client port-to-logical channel
+ mapping";
+ }
+
+ leaf logical-channel {
+ type leafref {
+ path "/oc-opt-term:terminal-device/oc-opt-term:logical-channels" +
+ "/oc-opt-term:channel/oc-opt-term:index";
+ }
+ description
+ "Reference to the logical channel for this
+ assignment";
+ }
+
+ leaf allocation {
+ type decimal64 {
+ fraction-digits 3;
+ }
+ units Gbps;
+ description
+ "Allocation of the client physical port to the assigned
+ logical channel expressed in Gbps. In most cases,
+ the full client physical port rate is assigned to a single
+ logical channel.";
+ }
+
+ }
+
+ grouping terminal-client-port-assignment-state {
+ description
+ "Operational state data for assigning physical client ports
+ to logical channels";
+ }
+
+ grouping terminal-client-port-assignment-top {
+ description
+ "Top-level grouping for the assigment of client physical ports
+ to logical channels";
+ //TODO: this grouping could be removed, instead reusing a common
+ //grouping for logical client assignment pointers
+
+ container logical-channel-assignments {
+ description
+ "Enclosing container for client port to logical client
+ mappings";
+
+ list assignment {
+ key "index";
+ description
+ "List of assignments to logical clients";
+
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+ description
+ "Reference to the index of this logical client
+ assignment";
+ }
+
+ container config {
+ description
+ "Configuration data for the logical client assignment";
+
+ uses terminal-client-port-assignment-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the logical client
+ assignment";
+
+ uses terminal-client-port-assignment-config;
+ uses terminal-client-port-assignment-state;
+ }
+ }
+ }
+ }
+
+
+ grouping terminal-logical-chan-assignment-config {
+ description
+ "Configuration data for assigning client logical channels
+ to line-side tributaries";
+
+ leaf index {
+ type uint32;
+ description
+ "Index of the current logical client channel to tributary
+ mapping";
+ }
+
+ leaf description {
+ type string;
+ description
+ "Name assigned to the logical client channel";
+ }
+
+ leaf assignment-type {
+ type enumeration {
+ enum LOGICAL_CHANNEL {
+ description
+ "Subsequent channel is a logical channel";
+ }
+ enum OPTICAL_CHANNEL {
+ description
+ "Subsequent channel is a optical channel / carrier";
+ }
+ }
+ description
+ "Each logical channel element may be assigned to subsequent
+ stages of logical elements to implement further grooming, or
+ can be assigned to a line-side optical channel for
+ transmission. Each assignment also has an associated
+ bandwidth allocation.";
+ }
+
+ leaf logical-channel {
+ type leafref {
+ path "/oc-opt-term:terminal-device/" +
+ "oc-opt-term:logical-channels/oc-opt-term:channel/" +
+ "oc-opt-term:index";
+ }
+ must "../assignment-type = 'LOGICAL_CHANNEL'" {
+ description
+ "The assignment-type must be set to LOGICAL_CHANNEL for
+ this leaf to be valid";
+ }
+ description
+ "Reference to another stage of logical channel elements.";
+ }
+
+ leaf optical-channel {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ must "../assignment-type = 'OPTICAL_CHANNEL'" {
+ description
+ "The assignment-type must be set to OPTICAL_CHANNEL for
+ this leaf to be valid";
+ }
+ description
+ "Reference to the line-side optical channel that should
+ carry the current logical channel element. Use this
+ reference to exit the logical element stage.";
+ }
+
+ leaf allocation {
+ type decimal64 {
+ fraction-digits 3;
+ }
+ units Gbps;
+ description
+ "Allocation of the logical client channel to the tributary
+ or sub-channel, expressed in Gbps";
+ }
+
+ }
+
+ grouping terminal-logical-chan-assignment-state {
+ description
+ "Operational state data for the assignment of logical client
+ channel to line-side tributary";
+ }
+
+ grouping terminal-logical-chan-assignment-top {
+ description
+ "Top-level grouping for the list of logical client channel-to-
+ tributary assignments";
+
+ container logical-channel-assignments {
+ //TODO: we need a commonly understood name for this logical
+ //channel structure
+ description
+ "Enclosing container for tributary assignments";
+
+ list assignment {
+ key "index";
+ description
+ "Logical channel elements may be assigned directly to
+ optical channels for line-side transmission, or can be
+ further groomed into additional stages of logical channel
+ elements. The grooming can multiplex (i.e., split the
+ current element into multiple elements in the subsequent
+ stage) or de-multiplex (i.e., combine the current element
+ with other elements into the same element in the subsequent
+ stage) logical elements in each stage.
+
+ Note that to support the ability to groom the logical
+ elements, the list of logical channel elements should be
+ populated with an entry for the logical elements at
+ each stage, starting with the initial assignment from the
+ respective client physical port.
+
+ Each logical element assignment consists of a pointer to
+ an element in the next stage, or to an optical channel,
+ along with a bandwidth allocation for the corresponding
+ assignment (e.g., to split or combine signal).";
+
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+ description
+ "Reference to the index for the current tributary
+ assignment";
+ }
+
+ container config {
+ description
+ "Configuration data for tributary assignments";
+
+ uses terminal-logical-chan-assignment-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for tributary assignments";
+
+ uses terminal-logical-chan-assignment-config;
+ uses terminal-logical-chan-assignment-state;
+ }
+ }
+ }
+ }
+
+ grouping terminal-logical-channel-ingress-config {
+ description
+ "Configuration data for ingress signal to logical channel";
+
+ leaf transceiver {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to the transceiver carrying the input signal
+ for the logical channel. If specific physical channels
+ are mapped to the logical channel (as opposed to all
+ physical channels carried by the transceiver), they can be
+ specified in the list of physical channel references.";
+ }
+
+ leaf-list physical-channel {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-transceiver:transceiver/" +
+ "oc-transceiver:physical-channels/" +
+ "oc-transceiver:channel/oc-transceiver:index";
+ }
+ description
+ "This list should be populated with references
+ to the client physical channels that feed this logical
+ channel from the transceiver specified in the 'transceiver'
+ leaf, which must be specified. If this leaf-list is empty,
+ all physical channels in the transceiver are assumed to be
+ mapped to the logical channel.";
+ }
+ }
+
+ grouping terminal-logical-channel-ingress-state {
+ description
+ "Operational state data for ingress signal to logical channel";
+ }
+
+ grouping terminal-logical-channel-ingress-top {
+ description
+ "Top-level grouping for ingress signal to logical channel";
+
+ container ingress {
+ description
+ "Top-level container for specifying references to the
+ source of signal for the logical channel, either a
+ transceiver or individual physical channels";
+
+ container config {
+ description
+ "Configuration data for the signal source for the
+ logical channel";
+
+ uses terminal-logical-channel-ingress-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the signal source for the
+ logical channel";
+
+ uses terminal-logical-channel-ingress-config;
+ uses terminal-logical-channel-ingress-state;
+ }
+ }
+ }
+
+ grouping terminal-logical-channel-config {
+ description
+ "Configuration data for logical channels";
+
+ leaf index {
+ type uint32;
+ description
+ "Index of the current logical channel";
+ }
+
+ leaf description {
+ type string;
+ description
+ "Description of the logical channel";
+ }
+
+ leaf admin-state {
+ type oc-opt-types:admin-state-type;
+ description
+ "Sets the admin state of the logical channel";
+ }
+
+ leaf rate-class {
+ type identityref {
+ base oc-opt-types:TRIBUTARY_RATE_CLASS_TYPE;
+ }
+ description
+ "Rounded bit rate of the tributary signal. Exact bit rate
+ will be refined by protocol selection.";
+ }
+
+ leaf trib-protocol {
+ type identityref {
+ base oc-opt-types:TRIBUTARY_PROTOCOL_TYPE;
+ }
+ description
+ "Protocol framing of the tributary signal. If this
+ LogicalChannel is directly connected to a Client-Port or
+ Optical-Channel, this is the protocol of the associated port.
+ If the LogicalChannel is connected to other LogicalChannels,
+ the TributaryProtocol of the LogicalChannels will define a
+ specific mapping/demapping or multiplexing/demultiplexing
+ function.
+
+ Not all protocols are valid, depending on the value
+ of trib-rate-class. The expectation is that the NMS
+ will validate that a correct combination of rate class
+ and protocol are specfied. Basic combinations are:
+
+ rate class: 1G
+ protocols: 1GE
+
+ rate class: 2.5G
+ protocols: OC48, STM16
+
+ rate class: 10G
+ protocols: 10GE LAN, 10GE WAN, OC192, STM64, OTU2, OTU2e,
+ OTU1e, ODU2, ODU2e, ODU1e
+
+ rate class: 40G
+ protocols: 40GE, OC768, STM256, OTU3, ODU3
+
+ rate class: 100G
+ protocols: 100GE, 100G MLG, OTU4, OTUCn, ODU4";
+ }
+
+ leaf logical-channel-type {
+ type identityref {
+ base oc-opt-types:LOGICAL_ELEMENT_PROTOCOL_TYPE;
+ }
+ description
+ "The type / stage of the logical element determines the
+ configuration and operational state parameters (PMs)
+ available for the logical element";
+ }
+
+ leaf loopback-mode {
+ type oc-opt-types:loopback-mode-type;
+ description
+ "Sets the loopback type on the logical channel. Setting the
+ mode to something besides NONE activates the loopback in
+ the specified mode.";
+ }
+
+ leaf test-signal {
+ type boolean;
+ description
+ "When enabled the logical channel's DSP will generate a pseudo
+ randmon bit stream (PRBS) which can be used during testing.";
+ }
+ }
+
+
+ grouping terminal-logical-channel-state {
+ description
+ "Operational state data for logical client channels";
+
+ leaf link-state {
+ type enumeration {
+ enum UP {
+ description
+ "Logical channel is operationally up";
+ }
+ enum DOWN {
+ description
+ "Logical channel is operationally down";
+ }
+ }
+ description
+ "Link-state of the Ethernet protocol on the logical channel,
+ SONET / SDH framed signal, etc.";
+ }
+
+ }
+
+ grouping terminal-logical-channel-top {
+ description
+ "Top-level grouping for logical channels";
+
+ container logical-channels {
+ description
+ "Enclosing container the list of logical channels";
+
+ list channel {
+ key "index";
+ description
+ "List of logical channels";
+ //TODO: naming for this list of logical elements should be
+ //revisited.
+
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+ description
+ "Reference to the index of the logical channel";
+ }
+
+ container config {
+ description
+ "Configuration data for logical channels";
+
+ uses terminal-logical-channel-config;
+
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for logical channels";
+
+ uses terminal-logical-channel-config;
+ uses terminal-logical-channel-state;
+ }
+
+ uses terminal-otn-protocol-top {
+ when "config/logical-channel-type = 'PROT_OTN'" {
+ description
+ "Include the OTN protocol data only when the
+ channel is using OTN framing.";
+ }
+ }
+ uses terminal-ethernet-protocol-top {
+ when "config/logical-channel-type = 'PROT_ETHERNET'" {
+ description
+ "Include the Ethernet protocol statistics only when the
+ protocol used by the link is Ethernet.";
+ }
+ }
+ uses terminal-logical-channel-ingress-top;
+ uses terminal-logical-chan-assignment-top;
+ }
+ }
+ }
+
+
+ grouping terminal-optical-channel-config {
+ description
+ "Configuration data for describing optical channels";
+
+ leaf frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "Frequency of the optical channel, expressed in MHz";
+ }
+
+ leaf target-output-power {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "Target output optical power level of the optical channel,
+ expressed in increments of 0.01 dBm (decibel-milliwats)";
+ }
+
+ leaf operational-mode {
+ type uint16;
+ description
+ "Vendor-specific mode identifier -- sets the operational
+ mode for the channel. The specified operational mode must
+ exist in the list of supported operational modes supplied
+ by the device";
+ //
+ // Ideally, this leaf should be a leafref to the supported
+ // operational modes, but YANG 1.0 does not allow a r/w
+ // leaf to be a leafref to a r/o leaf.
+ }
+
+
+ leaf line-port {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to the line-side physical port that carries
+ this optical channel. The target port should be
+ a component in the physical inventory data model.";
+ }
+ }
+
+ grouping terminal-optical-channel-state {
+ description
+ "Operational state data for optical channels";
+
+ leaf group-id {
+ type uint32;
+ description
+ "If the device places constraints on which optical
+ channels must be managed together (e.g., transmitted on the
+ same line port), it can indicate that by setting the group-id
+ to the same value across related optical channels.";
+ }
+
+ uses oc-transceiver:optical-power-state;
+
+ container chromatic-dispersion {
+ description
+ "Chromatic Dispersion of an optical channel in
+ picoseconds / nanometer (ps/nm) as reported by receiver
+ with two decimal precision. Values include the instantaneous,
+ average, minimum, and maximum statistics. If avg/min/max
+ statistics are not supported, the target is expected to just
+ supply the instant value";
+
+ uses oc-opt-types:avg-min-max-instant-stats-precision2-ps-nm;
+ }
+
+ container polarization-mode-dispersion {
+ description
+ "Polarization Mode Dispersion of an optical channel
+ in picosends (ps) as reported by receiver with two decimal
+ precision. Values include the instantaneous, average,
+ minimum, and maximum statistics. If avg/min/max statistics
+ are not supported, the target is expected to just supply the
+ instant value";
+
+ uses oc-opt-types:avg-min-max-instant-stats-precision2-ps;
+ }
+
+ container second-order-polarization-mode-dispersion {
+ description
+ "Second Order Polarization Mode Dispersion of an optical
+ channel in picoseconds squared (ps^2) as reported by
+ receiver with two decimal precision. Values include the
+ instantaneous, average, minimum, and maximum statistics.
+ If avg/min/max statistics are not supported, the target
+ is expected to just supply the instant value";
+
+ uses oc-opt-types:avg-min-max-instant-stats-precision2-ps2;
+ }
+
+ container polarization-dependent-loss {
+ description
+ "Polarization Dependent Loss of an optical channel
+ in dB as reported by receiver with two decimal precision.
+ Values include the instantaneous, average, minimum, and
+ maximum statistics. If avg/min/max statistics are not
+ supported, the target is expected to just supply the
+ instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dB;
+ }
+ }
+
+ grouping terminal-optical-channel-top {
+ description
+ "Top-level grouping for optical channel data";
+
+ container optical-channel {
+ description
+ "Enclosing container for the list of optical channels";
+
+ container config {
+ description
+ "Configuration data for optical channels";
+
+ uses terminal-optical-channel-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for optical channels";
+
+ uses terminal-optical-channel-config;
+ uses terminal-optical-channel-state;
+ }
+ }
+ }
+
+ grouping terminal-operational-mode-config {
+ description
+ "Configuration data for vendor-supported operational modes";
+ }
+
+ grouping terminal-operational-mode-state {
+ description
+ "Operational state data for vendor-supported operational
+ modes";
+
+ leaf mode-id {
+ type uint16;
+ description
+ "Two-octet encoding of the vendor-defined operational
+ mode";
+ }
+
+ leaf description {
+ type string;
+ description
+ "Vendor-supplied textual description of the characteristics
+ of this operational mode to enable operators to select the
+ appropriate mode for the application.";
+ }
+
+ //TODO: examples of the kind of info that would be useful to
+ //report in the operational mode:
+ //Symbol rate (32G, 40G, 43G, 64G, etc.)
+ //Modulation (QPSK, 8-QAM, 16-QAM, etc.)
+ //Differential encoding (on, off/pilot symbol, etc)
+ //State of polarization tracking mode (default, med.
+ //high-speed, etc.)
+ //Pulse shaping (RRC, RC, roll-off factor)
+ //FEC mode (SD, HD, % OH)
+
+ leaf vendor-id {
+ type string;
+ description
+ "Identifier to represent the vendor / supplier of the
+ platform and the associated operational mode information";
+ }
+ }
+
+ grouping terminal-operational-mode-top {
+ description
+ "Top-level grouping for vendor-supported operational modes";
+
+ container operational-modes {
+ description
+ "Enclosing container for list of operational modes";
+
+ list mode {
+ key "mode-id";
+ config false;
+ description
+ "List of operational modes supported by the platform.
+ The operational mode provides a platform-defined summary
+ of information such as symbol rate, modulation, pulse
+ shaping, etc.";
+
+ leaf mode-id {
+ type leafref {
+ path "../state/mode-id";
+ }
+ description
+ "Reference to mode-id";
+ }
+
+ container config {
+ description
+ "Configuration data for operational mode";
+
+ uses terminal-operational-mode-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the platform-defined
+ operational mode";
+
+ uses terminal-operational-mode-config;
+ uses terminal-operational-mode-state;
+ }
+ }
+ }
+ }
+
+
+ grouping terminal-device-config {
+ description
+ "Configuration data for transport terminal devices at a
+ device-wide level";
+ }
+
+ grouping terminal-device-state {
+ description
+ "Operational state data for transport terminal devices at a
+ device-wide level";
+ }
+
+ grouping terminal-device-top {
+ description
+ "Top-level grouping for data for terminal devices";
+
+ container terminal-device {
+ description
+ "Top-level container for the terminal device";
+
+ container config {
+ description
+ "Configuration data for global terminal-device";
+
+ uses terminal-device-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for global terminal device";
+
+ uses terminal-device-config;
+ uses terminal-device-state;
+ }
+
+ uses terminal-logical-channel-top;
+ uses terminal-operational-mode-top;
+
+ }
+ }
+
+ // data definition statements
+
+ uses terminal-device-top;
+
+ // augment statements
+
+ augment "/oc-platform:components/oc-platform:component" {
+ when "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:state/oc-platform:type = 'OPTICAL_CHANNEL'" {
+ description
+ "Augment is active when component is of type
+ OPTICAL_CHANNEL";
+ }
+ description
+ "Adding optical channel data to physical inventory";
+
+ uses terminal-optical-channel-top {
+ }
+ }
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-common.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-common.yang
new file mode 100644
index 0000000..ccd5159
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-common.yang
@@ -0,0 +1,295 @@
+module openconfig-transport-line-common {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/transport-line-common";
+
+ prefix "oc-line-com";
+
+ // import some basic types
+ import iana-if-type { prefix ift; }
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-interfaces { prefix oc-if; }
+ import openconfig-platform { prefix oc-platform; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-transport-types { prefix oc-opt-types; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module defines common data elements for OpenConfig data
+ models for optical transport line system elements, such as
+ amplifiers and ROADMs (wavelength routers).";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2017-07-08" {
+ description
+ "Add monitor port type and refs to hw ports, ";
+ reference "0.3.0";
+ }
+
+ revision "2017-03-28" {
+ description
+ "Added min/max/avg stats, status for media channels, OCM, APS";
+ reference "0.2.0";
+ }
+
+ revision "2016-03-31" {
+ description
+ "Initial public release";
+ reference "0.1.0";
+ }
+
+
+ // extension statements
+
+ // feature statements
+
+ // identity statements
+
+ identity OPTICAL_LINE_PORT_TYPE {
+ description
+ "Type definition for optical node port types";
+ }
+
+ identity INGRESS {
+ base OPTICAL_LINE_PORT_TYPE;
+ description
+ "Ingress port, corresponding to a signal entering
+ a line device such as an amplifier or wavelength
+ router.";
+ }
+
+ identity EGRESS {
+ base OPTICAL_LINE_PORT_TYPE;
+ description
+ "Egress port, corresponding to a signal exiting
+ a line device such as an amplifier or wavelength
+ router.";
+ }
+
+ identity ADD {
+ base OPTICAL_LINE_PORT_TYPE;
+ description
+ "Add port, corresponding to a signal injected
+ at a wavelength router.";
+ }
+
+ identity DROP {
+ base OPTICAL_LINE_PORT_TYPE;
+ description
+ "Drop port, corresponding to a signal dropped
+ at a wavelength router.";
+ }
+
+ identity MONITOR {
+ base OPTICAL_LINE_PORT_TYPE;
+ description
+ "Monitor port, corresponding to a signal used by an optical
+ channel monitor. This is used to represent the connection
+ that a channel monitor port is connected to. This
+ connection may be via physical cable and faceplate ports or
+ internal to the device";
+ }
+
+ // typedef statements
+
+ // grouping statements
+
+ grouping optical-osc-config {
+ description
+ "Configuration data for OSC interfaces";
+
+ leaf-list interface {
+ type oc-if:base-interface-ref;
+ description
+ "List of references to OSC interfaces";
+ }
+ }
+
+ grouping optical-osc-state {
+ description
+ "Operational state data for OSC interfaces";
+
+ container input-power {
+ description
+ "The input optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ the target is expected to just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container output-power {
+ description
+ "The output optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ the target is expected to just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container laser-bias-current {
+ description
+ "The current applied by the system to the transmit laser to
+ achieve the output power. The current is expressed in mA
+ with up to one decimal precision. If avg/min/max statistics
+ are not supported, the target is expected to just supply
+ the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-mA;
+ }
+ }
+
+
+
+ grouping optical-osc-top {
+ description
+ "Top-level grouping for configuration and operational state
+ data for optical supervisory channels (OSC) for amplifiers,
+ WSS/ROADM, nodes, etc.";
+
+ container config {
+ description
+ "Configuration data for OSCs";
+
+ uses optical-osc-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for OSCs";
+
+ uses optical-osc-config;
+ uses optical-osc-state;
+ }
+ }
+
+
+ grouping transport-line-common-port-config {
+ description
+ "Configuration data for optical line ports";
+
+ leaf admin-state {
+ type oc-opt-types:admin-state-type;
+ description
+ "Sets the admin state of the optical-port";
+ }
+ }
+
+ grouping transport-line-common-port-state {
+ description
+ "Operational state data describing optical line ports";
+
+ leaf optical-port-type {
+ type identityref {
+ base OPTICAL_LINE_PORT_TYPE;
+ }
+ description
+ "Indicates the type of transport line port. This is an
+ informational field that should be made available by the
+ device (e.g., in the openconfig-platform model).";
+ }
+
+ container input-power {
+ description
+ "The total input optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+
+ container output-power {
+ description
+ "The total output optical power of this port in units
+ of 0.01dBm. If avg/min/max statistics are not supported,
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+ }
+
+ grouping transport-line-common-port-top {
+ description
+ "Top-level grouping ";
+
+ container optical-port {
+ description
+ "Top-level container ";
+
+ container config {
+
+ description
+ "Operational config data for optical line ports";
+
+ uses transport-line-common-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for optical line ports";
+
+ uses transport-line-common-port-config;
+ uses transport-line-common-port-state;
+ }
+ }
+ }
+
+
+
+ // data definition statements
+
+ // uses optical-osc-top;
+
+ // augment statements
+
+ augment "/oc-platform:components/oc-platform:component" {
+ description
+ "Adding optical line port data to platform model";
+
+ uses transport-line-common-port-top {
+ when "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:state/oc-platform:type = 'PORT'" {
+ description
+ "Augment is active when component is of type
+ PORT";
+ }
+ }
+ }
+
+ //TODO:this is placeholder until SONET model is added
+ //to interfaces model
+ augment "/oc-if:interfaces/oc-if:interface" {
+ when "oc-if:config/oc-if:type = 'ift:sonet'" {
+ description "Additional interface configuration parameters when
+ the interface type is SONET/SDH";
+ }
+ description "Adds additional SONET/SDH-specific data to
+ osc model";
+
+ container sonet {
+ description
+ "Data related to SONET/SDH interfaces";
+ }
+ }
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-protection.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-protection.yang
new file mode 100644
index 0000000..311b315
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-line-protection.yang
@@ -0,0 +1,511 @@
+module openconfig-transport-line-protection {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/optical-transport-line-protection";
+
+ prefix "oc-line-protect";
+
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-platform { prefix oc-platform; }
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This model describes configuration and operational state data
+ for optical line protection elements, deployed as part of a
+ transport line system. An Automatic Protection Switch (APS)
+ is typically installed in the same device as the amplifiers
+ and wave-router, however an APS can also be a standalone
+ device. In both scenarios, it serves the same purpose of
+ providing protection using two dark fiber pairs to ensure the
+ amplifiers can still receive a signal if one of the two fiber
+ pairs is broken.";
+
+ //
+ // Automatic Protection Switch (APS) port details and directionality.
+ // _________
+ // | |
+ // | | <=== LINE-PRIMARY-IN
+ // | |
+ // COMMON-IN ===> | | ===> LINE-PRIMARY-OUT
+ // | |
+ // | APS |
+ // COMMON-OUT <=== | |
+ // | | <=== LINE-SECONDARY-IN
+ // | |
+ // | | ===> LINE-SECONDARY-OUT
+ // |_______|
+ //
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2017-07-08" {
+ description
+ "Support multiple OCMs, add monitor port type
+ and refs to hw ports, ";
+ reference "0.3.0";
+ }
+
+ revision "2017-03-28" {
+ description
+ "Added min/max/avg stats, status for media channels, OCM, APS";
+ reference "0.2.0";
+ }
+
+ revision "2016-08-05" {
+ description
+ "Initial public release";
+ reference "0.1.0";
+ }
+
+ // extension statements
+
+ // feature statements
+
+ // identity statements
+
+ identity APS_PATHS {
+ description
+ "Base identity for identifying the line paths on an
+ automatic protection switch";
+ }
+
+ identity PRIMARY {
+ base APS_PATHS;
+ description
+ "The primary line path connected to an automatic protection
+ switch port indicating the primary/preferred path";
+ }
+
+ identity SECONDARY {
+ base APS_PATHS;
+ description
+ "The secondary line path connected to an automatic protection
+ switch port indicating the secondary path";
+ }
+
+ // grouping statements
+
+ grouping aps-input-port-config {
+ description
+ "Grouping for config related to unidirectional automatic
+ protection switch input ports";
+
+ leaf enabled {
+ type boolean;
+ default "true";
+ description
+ "This leaf contains the configured, desired state of the
+ port. Disabling the port turns off alarm reporting for
+ the port";
+ }
+
+ leaf target-attenuation {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "Target attenuation of the variable optical attenuator
+ associated with the port in increments of 0.01 dB.";
+ }
+ }
+
+ grouping aps-output-port-config {
+ description
+ "Grouping for config related to unidirectional automatic
+ protection switch output ports";
+
+ leaf target-attenuation {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "Target attenuation of the variable optical attenuator
+ associated with the port in increments of 0.01 dB";
+ }
+ }
+
+ grouping aps-input-port-state {
+ description
+ "Grouping for state related to unidirectional automatic
+ protection switch input ports";
+
+ leaf attenuation {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The attenuation of the variable optical attenuator
+ associated with the port in increments of 0.01 dB.";
+ }
+
+ container optical-power {
+ description
+ "The optical input power of this port in units of
+ 0.01dBm. Optical input power represents the signal
+ traversing from an external destination into the module.
+ The power is measured before any attenuation. If avg/min/max
+ statistics are not supported, the target is expected to
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+ }
+
+ grouping aps-output-port-state {
+ description
+ "Grouping for state related to unidirectional automatic
+ protection switch output ports";
+
+ leaf attenuation {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The attenuation of the variable optical attenuator
+ associated with the port in increments of 0.01 dB";
+ }
+
+ container optical-power {
+ description
+ "The optical output power of this port in units of
+ 0.01dBm. Optical output power represents the signal
+ traversing from the module to an external destination. The
+ power is measured after any attenuation. If avg/min/max
+ statistics are not supported, the target is expected to
+ just supply the instant value";
+
+ uses oc-types:avg-min-max-instant-stats-precision2-dBm;
+ }
+ }
+
+ grouping aps-ports {
+ description
+ "Top level grouping for automatic protection switch ports";
+
+ container line-primary-in {
+ description
+ "Container for information related to the line primary
+ input port";
+
+ container config {
+ description
+ "Configuration data for the line primary input port";
+
+ uses aps-input-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line primary input port";
+
+ uses aps-input-port-config;
+ uses aps-input-port-state;
+ }
+
+ }
+
+ container line-primary-out {
+ description
+ "Container for information related to the line primary
+ output port";
+
+ container config {
+ description
+ "Configuration data for the line primary output port";
+
+ uses aps-output-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line primary output port";
+
+ uses aps-output-port-config;
+ uses aps-output-port-state;
+ }
+ }
+
+ container line-secondary-in {
+ description
+ "Container for information related to the line secondary
+ input port";
+
+ container config {
+ description
+ "Configuration data for the line secondary input port";
+
+ uses aps-input-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line secondary input port";
+
+ uses aps-input-port-config;
+ uses aps-input-port-state;
+ }
+ }
+
+ container line-secondary-out {
+ description
+ "Container for information related to the line secondary
+ output port";
+
+ container config {
+ description
+ "Configuration data for the line secondary output port";
+
+ uses aps-output-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line secondary output port";
+
+ uses aps-output-port-config;
+ uses aps-output-port-state;
+ }
+ }
+
+ container common-in {
+ description
+ "Container for information related to the line common
+ input port";
+
+ container config {
+ description
+ "Configuration data for the line common input port";
+
+ uses aps-input-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line common input port";
+
+ uses aps-input-port-config;
+ uses aps-input-port-state;
+ }
+ }
+
+ container common-output {
+ description
+ "Container for information related to the line common
+ output port";
+
+ container config {
+ description
+ "Configuration data for the line common output port";
+
+ uses aps-output-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "State data for the line common output port";
+
+ uses aps-output-port-config;
+ uses aps-output-port-state;
+ }
+ }
+ }
+
+ grouping aps-config {
+ description
+ "Configuration data for automatic protection switch modules";
+
+ leaf name {
+ type leafref {
+ path "/oc-platform:components/oc-platform:component/" +
+ "oc-platform:name";
+ }
+ description
+ "Reference to the component name (in the platform model)
+ corresponding to this automatic protection switch module
+ in the device";
+ }
+
+ leaf revertive {
+ type boolean;
+ description
+ "Revertive behavior of the module.
+ If True, then automatically revert after protection switch
+ once the fault is restored.";
+ }
+
+ leaf primary-switch-threshold {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The threshold at which the primary line port will switch to
+ the opposite line port in increments of 0.01 dBm. If the
+ hardware supports only one switch threshold for primary and
+ and secondary ports then it is recommended to set both
+ primary-switch-threshold and secondary-switch-threshold to
+ the same value to be explicit";
+ }
+
+ leaf primary-switch-hysteresis {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The delta in 0.01 dB between the primary-switch-threshold
+ and the signal received before initiating a reversion in
+ order to prevent toggling between ports when an input
+ signal is very close to threshold. If the hardware supports
+ only one switch hysteresis for primary and secondary ports
+ then it is recommended to set both primary-switch-threshold
+ and secondary-switch-threshold to the same value to be
+ explicit";
+ }
+
+ leaf secondary-switch-threshold {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The threshold at which the secondary line port will switch to
+ the opposite line port in increments of 0.01 dBm. If the
+ hardware supports only one switch threshold for primary and
+ and secondary ports then it is recommended to set both
+ primary-switch-threshold and secondary-switch-threshold to
+ the same value to be explicit";
+ }
+
+ leaf secondary-switch-hysteresis {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The delta in 0.01 dB between the secondary-switch-threshold
+ and the signal received before initiating a reversion in
+ order to prevent toggling between ports when an input
+ signal is very close to threshold. If the hardware supports
+ only one switch hysteresis for primary and secondary ports
+ then it is recommended to set both primary-switch-threshold
+ and secondary-switch-threshold to the same value to be
+ explicit";
+ }
+ }
+
+ grouping aps-state {
+ description
+ "State data for automatic protection switch modules";
+
+ leaf active-path {
+ type identityref {
+ base APS_PATHS;
+ }
+ description
+ "Indicates which line path on the automatic protection switch
+ is currently the active path connected to the common port";
+ }
+ }
+
+ grouping automatic-protection-switch-top {
+ description
+ "Top level grouping for automatic protection switch data";
+
+ container aps-modules {
+ description
+ "Enclosing container for list of automatic protection
+ switch modules";
+
+ list aps-module {
+ key "name";
+ description
+ "List of automatic protection switch modules present
+ in the device";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ }
+ description
+ "Reference to the config name list key";
+ }
+
+ container config {
+ description
+ "Configuration data for an automatic protection
+ switch module";
+
+ uses aps-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for an automatic protection
+ switch module";
+
+ uses aps-config;
+ uses aps-state;
+ }
+
+ container ports {
+ description
+ "Top level grouping for automatic protection switch ports";
+
+ uses aps-ports;
+ }
+ }
+ }
+ }
+
+ grouping transport-line-protection-top {
+ description
+ "Top level grouping for transport line protection data";
+
+ container aps {
+ description
+ "Top level grouping for automatic protection switch data";
+
+ uses automatic-protection-switch-top;
+ }
+ }
+
+ // data definition statements
+
+ uses transport-line-protection-top;
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-transport-types.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-types.yang
new file mode 100644
index 0000000..276f24b
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-transport-types.yang
@@ -0,0 +1,800 @@
+module openconfig-transport-types {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/transport-types";
+
+ prefix "oc-opt-types";
+
+ import openconfig-platform-types { prefix oc-platform-types; }
+ import openconfig-extensions { prefix oc-ext; }
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module contains general type definitions and identities
+ for optical transport models.";
+
+ oc-ext:openconfig-version "0.5.0";
+
+ revision "2017-08-16" {
+ description
+ "Added ODU Cn protocol type";
+ reference "0.5.0";
+ }
+
+ revision "2016-12-22" {
+ description
+ "Fixes and additions for terminal optics model";
+ reference "0.4.0";
+ }
+
+ // typedef statements
+
+ typedef frequency-type {
+ type uint64;
+ units "MHz";
+ description
+ "Type for optical spectrum frequency values";
+ }
+
+ typedef admin-state-type {
+ type enumeration {
+ enum ENABLED {
+ description
+ "Sets the channel admin state to enabled";
+ }
+ enum DISABLED {
+ description
+ "Sets the channel admin state to disabled";
+ }
+ enum MAINT {
+ description
+ "Sets the channel to maintenance / diagnostic mode";
+ }
+ }
+ description "Administrative state modes for
+ logical channels in the transponder model.";
+ }
+
+ typedef loopback-mode-type {
+ type enumeration {
+ enum NONE {
+ description
+ "No loopback is applied";
+ }
+ enum FACILITY {
+ description
+ "A loopback which directs traffic normally transmitted
+ on the port back to the device as if received on the same
+ port from an external source.";
+ }
+ enum TERMINAL {
+ description
+ "A loopback which directs traffic received from an external
+ source on the port back out the transmit side of the same
+ port.";
+ }
+ }
+ default NONE;
+ description
+ "Loopback modes for transponder logical channels";
+ }
+
+ // grouping statements
+
+ grouping avg-min-max-instant-stats-precision2-ps-nm {
+ description
+ "Common grouping for recording picosecond per nanometer
+ values with 2 decimal precision. Values include the
+ instantaneous, average, minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps-nm;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps-nm;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps-nm;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps-nm;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision2-ps {
+ description
+ "Common grouping for recording picosecond values with
+ 2 decimal precision. Values include the instantaneous,
+ average, minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision2-ps2 {
+ description
+ "Common grouping for recording picosecond^2 values with
+ 2 decimal precision. Values include the instantaneous,
+ average, minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps^2;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps^2;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps^2;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units ps^2;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision18-ber {
+ description
+ "Common grouping for recording bit error rate (BER) values
+ with 18 decimal precision. Note that decimal64 supports
+ values as small as i x 10^-18 where i is an integer. Values
+ smaller than this should be reported as 0 to inidicate error
+ free or near error free performance. Values include the
+ instantaneous, average, minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 18;
+ }
+ units bit-errors-per-second;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 18;
+ }
+ units bit-errors-per-second;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 18;
+ }
+ units bit-errors-per-second;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 18;
+ }
+ units bit-errors-per-second;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ // identity statements
+
+ identity TRIBUTARY_PROTOCOL_TYPE {
+ description
+ "Base identity for protocol framing used by tributary
+ signals.";
+ }
+
+ identity PROT_1GE {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "1G Ethernet protocol";
+ }
+
+ identity PROT_OC48 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OC48 protocol";
+ }
+
+ identity PROT_STM16 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "STM 16 protocol";
+ }
+
+ identity PROT_10GE_LAN {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "10G Ethernet LAN protocol";
+ }
+
+ identity PROT_10GE_WAN {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "10G Ethernet WAN protocol";
+ }
+
+ identity PROT_OC192 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OC 192 (9.6GB) port protocol";
+ }
+
+ identity PROT_STM64 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "STM 64 protocol";
+ }
+
+ identity PROT_OTU2 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU 2 protocol";
+ }
+
+ identity PROT_OTU2E {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU 2e protocol";
+ }
+
+ identity PROT_OTU1E {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU 1e protocol";
+ }
+
+ identity PROT_ODU2 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "ODU 2 protocol";
+ }
+
+ identity PROT_ODU2E {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "ODU 2e protocol";
+ }
+
+ identity PROT_40GE {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "40G Ethernet port protocol";
+ }
+
+ identity PROT_OC768 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OC 768 protocol";
+ }
+
+ identity PROT_STM256 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "STM 256 protocol";
+ }
+
+ identity PROT_OTU3 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU 3 protocol";
+ }
+
+ identity PROT_ODU3 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "ODU 3 protocol";
+ }
+
+ identity PROT_100GE {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "100G Ethernet protocol";
+ }
+
+ identity PROT_100G_MLG {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "100G MLG protocol";
+ }
+
+ identity PROT_OTU4 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU4 signal protocol (112G) for transporting
+ 100GE signal";
+ }
+
+ identity PROT_OTUCN {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "OTU Cn protocol";
+ }
+
+ identity PROT_ODUCN {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "ODU Cn protocol";
+ }
+
+ identity PROT_ODU4 {
+ base TRIBUTARY_PROTOCOL_TYPE;
+ description "ODU 4 protocol";
+ }
+
+ identity TRANSCEIVER_FORM_FACTOR_TYPE {
+ description
+ "Base identity for identifying the type of pluggable optic
+ transceiver (i.e,. form factor) used in a port.";
+ }
+
+ identity CFP {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "C form-factor pluggable, that can support up to a
+ 100 Gb/s signal with 10x10G or 4x25G physical channels";
+ }
+
+ identity CFP2 {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "1/2 C form-factor pluggable, that can support up to a
+ 200 Gb/s signal with 10x10G, 4x25G, or 8x25G physical
+ channels";
+ }
+
+ identity CFP2_ACO {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "CFP2 analog coherent optics transceiver, supporting
+ 100 Gb, 200Gb, and 250 Gb/s signal.";
+ }
+
+ identity CFP4 {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "1/4 C form-factor pluggable, that can support up to a
+ 100 Gb/s signal with 10x10G or 4x25G physical channels";
+ }
+
+ identity QSFP {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "OriginalQuad Small Form-factor Pluggable transceiver that can
+ support 4x1G physical channels. Not commonly used.";
+ }
+
+ identity QSFP_PLUS {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Quad Small Form-factor Pluggable transceiver that can support
+ up to 4x10G physical channels.";
+ }
+
+ identity QSFP28 {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "QSFP pluggable optic with support for up to 4x28G physical
+ channels";
+ }
+
+ identity CPAK {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Cisco CPAK transceiver supporting 100 Gb/s.";
+ }
+
+ identity SFP {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Small form-factor pluggable transceiver supporting up to
+ 10 Gb/s signal";
+ }
+
+ identity SFP_PLUS {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Enhanced small form-factor pluggable transceiver supporting
+ up to 16 Gb/s signals, including 10 GbE and OTU2";
+ }
+
+ identity XFP {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "10 Gigabit small form factor pluggable transceiver supporting
+ 10 GbE and OTU2";
+ }
+
+ identity X2 {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "10 Gigabit small form factor pluggable transceiver supporting
+ 10 GbE using a XAUI inerface and 4 data channels.";
+ }
+
+ identity NON_PLUGGABLE {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Represents a port that does not require a pluggable optic,
+ e.g., with on-board optics like COBO";
+ }
+
+ identity OTHER {
+ base TRANSCEIVER_FORM_FACTOR_TYPE;
+ description
+ "Represents a transceiver form factor not otherwise listed";
+ }
+
+ identity FIBER_CONNECTOR_TYPE {
+ description
+ "Type of optical fiber connector";
+ }
+
+ identity SC_CONNECTOR {
+ base FIBER_CONNECTOR_TYPE;
+ description
+ "SC type fiber connector";
+ }
+
+ identity LC_CONNECTOR {
+ base FIBER_CONNECTOR_TYPE;
+ description
+ "LC type fiber connector";
+ }
+
+ identity MPO_CONNECTOR {
+ base FIBER_CONNECTOR_TYPE;
+ description
+ "MPO (multi-fiber push-on/pull-off) type fiber connector
+ 1x12 fibers";
+ }
+
+ identity ETHERNET_PMD_TYPE {
+ description
+ "Ethernet compliance codes (PMD) supported by transceivers";
+ }
+
+ identity ETH_10GBASE_LRM {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 10GBASE_LRM";
+ }
+
+ identity ETH_10GBASE_LR {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 10GBASE_LR";
+ }
+
+ identity ETH_10GBASE_ZR {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 10GBASE_ZR";
+ }
+
+ identity ETH_10GBASE_ER {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 10GBASE_ER";
+ }
+
+ identity ETH_10GBASE_SR {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 10GBASE_SR";
+ }
+
+ identity ETH_40GBASE_CR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 40GBASE_CR4";
+ }
+
+ identity ETH_40GBASE_SR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 40GBASE_SR4";
+ }
+
+ identity ETH_40GBASE_LR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 40GBASE_LR4";
+ }
+
+ identity ETH_40GBASE_ER4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 40GBASE_ER4";
+ }
+
+ identity ETH_40GBASE_PSM4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 40GBASE_PSM4";
+ }
+
+ identity ETH_4X10GBASE_LR {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 4x10GBASE_LR";
+ }
+
+ identity ETH_4X10GBASE_SR {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 4x10GBASE_SR";
+ }
+
+ identity ETH_100G_AOC {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100G_AOC";
+ }
+
+ identity ETH_100G_ACC {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100G_ACC";
+ }
+
+ identity ETH_100GBASE_SR10 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_SR10";
+ }
+
+ identity ETH_100GBASE_SR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_SR4";
+ }
+
+ identity ETH_100GBASE_LR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_LR4";
+ }
+
+ identity ETH_100GBASE_ER4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_ER4";
+ }
+
+ identity ETH_100GBASE_CWDM4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_CWDM4";
+ }
+
+ identity ETH_100GBASE_CLR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_CLR4";
+ }
+
+ identity ETH_100GBASE_PSM4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_PSM4";
+ }
+
+ identity ETH_100GBASE_CR4 {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: 100GBASE_CR4";
+ }
+
+ identity ETH_UNDEFINED {
+ base ETHERNET_PMD_TYPE;
+ description "Ethernet compliance code: undefined";
+ }
+
+ identity SONET_APPLICATION_CODE {
+ description
+ "Supported SONET/SDH application codes";
+ }
+
+ identity VSR2000_3R2 {
+ base SONET_APPLICATION_CODE;
+ description
+ "SONET/SDH application code: VSR2000_3R2";
+ }
+
+ identity VSR2000_3R3 {
+ base SONET_APPLICATION_CODE;
+ description
+ "SONET/SDH application code: VSR2000_3R3";
+ }
+
+ identity VSR2000_3R5 {
+ base SONET_APPLICATION_CODE;
+ description
+ "SONET/SDH application code: VSR2000_3R5";
+ }
+
+ identity SONET_UNDEFINED {
+ base SONET_APPLICATION_CODE;
+ description
+ "SONET/SDH application code: undefined";
+ }
+
+ identity OTN_APPLICATION_CODE {
+ description
+ "Supported OTN application codes";
+ }
+
+ identity P1L1_2D1 {
+ base OTN_APPLICATION_CODE;
+ description
+ "OTN application code: P1L1_2D1";
+ }
+
+ identity P1S1_2D2 {
+ base OTN_APPLICATION_CODE;
+ description
+ "OTN application code: P1S1_2D2";
+ }
+
+ identity P1L1_2D2 {
+ base OTN_APPLICATION_CODE;
+ description
+ "OTN application code: P1L1_2D2";
+ }
+
+ identity OTN_UNDEFINED {
+ base OTN_APPLICATION_CODE;
+ description
+ "OTN application code: undefined";
+ }
+
+ identity TRIBUTARY_RATE_CLASS_TYPE {
+ description
+ "Rate of tributary signal _- identities will typically reflect
+ rounded bit rate.";
+ }
+
+ identity TRIB_RATE_1G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "1G tributary signal rate";
+ }
+
+ identity TRIB_RATE_2.5G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "2.5G tributary signal rate";
+ }
+
+ identity TRIB_RATE_10G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "10G tributary signal rate";
+ }
+
+ identity TRIB_RATE_40G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "40G tributary signal rate";
+ }
+
+ identity TRIB_RATE_100G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "100G tributary signal rate";
+ }
+
+ identity TRIB_RATE_150G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "150G tributary signal rate";
+ }
+
+ identity TRIB_RATE_200G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "200G tributary signal rate";
+ }
+
+ identity TRIB_RATE_250G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "250G tributary signal rate";
+ }
+
+ identity TRIB_RATE_300G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "300G tributary signal rate";
+ }
+
+ identity TRIB_RATE_400G {
+ base TRIBUTARY_RATE_CLASS_TYPE;
+ description
+ "400G tributary signal rate";
+ }
+
+ identity LOGICAL_ELEMENT_PROTOCOL_TYPE {
+ description
+ "Type of protocol framing used on the logical channel or
+ tributary";
+ }
+
+ identity PROT_ETHERNET {
+ base LOGICAL_ELEMENT_PROTOCOL_TYPE;
+ description
+ "Ethernet protocol framing";
+ }
+
+ identity PROT_OTN {
+ base LOGICAL_ELEMENT_PROTOCOL_TYPE;
+ description
+ "OTN protocol framing";
+ }
+
+ identity OPTICAL_CHANNEL {
+ base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
+ description
+ "Optical channels act as carriers for transport traffic
+ directed over a line system. They are represented as
+ physical components in the physical inventory model.";
+ }
+
+}
diff --git a/models/openconfig/src/main/yang/optical-transport/openconfig-wavelength-router.yang b/models/openconfig/src/main/yang/optical-transport/openconfig-wavelength-router.yang
new file mode 100644
index 0000000..1141aab
--- /dev/null
+++ b/models/openconfig/src/main/yang/optical-transport/openconfig-wavelength-router.yang
@@ -0,0 +1,345 @@
+module openconfig-wavelength-router {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/wavelength-router";
+
+ prefix "oc-wave-router";
+
+ // import some basic types
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-interfaces { prefix oc-if; }
+ import openconfig-transport-types { prefix oc-opt-types; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This model describes configuration and operational state data
+ for an optical transport line system node, or ROADM (incl. CDC
+ ROADMs, WSS, Dynamic Gain Equalizer/DGE).
+
+ Nodes are modeled as a configurable switching element with
+ ingress and egress ports, as well as a number of add/drop ports
+ that can be set up to direct portions of the optical spectrum
+ to the appropriate degrees.";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2017-07-08" {
+ description
+ "Support multiple OCMs, add monitor port type
+ and refs to hw ports, ";
+ reference "0.3.0";
+ }
+
+ revision "2017-03-28" {
+ description
+ "Added min/max/avg stats, status for media channels, OCM, APS";
+ reference "0.2.0";
+ }
+
+ revision "2016-03-31" {
+ description
+ "Initial public release";
+ reference "0.1.0";
+ }
+
+
+
+ // grouping statements
+
+ grouping media-channel-port-config {
+ description
+ "Configuration data for a media channel source/dest port";
+
+ leaf port-name {
+ type oc-if:base-interface-ref;
+ description
+ "Reference to the corresponding node interface";
+ }
+ }
+
+ grouping media-channel-port-state {
+ description
+ "Operational state data for a media channel source/dest port";
+ }
+
+ grouping media-channel-source-port-top {
+ description
+ "Top-level grouping for source of the media channel";
+
+ container source {
+ description
+ "Top-level container for media channel source";
+
+ container config {
+ description
+ "Configuration data for the media channel source";
+
+ uses media-channel-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the media channel source";
+
+ uses media-channel-port-config;
+ uses media-channel-port-state;
+ }
+ }
+ }
+
+ grouping media-channel-dest-port-top {
+ description
+ "Top-level grouping for destination of the media channel";
+
+ container dest {
+ description
+ "Top-level container for media channel destination";
+
+ container config {
+ description
+ "Configuration data for the media channel destination";
+
+ uses media-channel-port-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for the media channel destination";
+
+ uses media-channel-port-config;
+ uses media-channel-port-state;
+ }
+ }
+ }
+
+ grouping media-channel-psd-config {
+ description
+ "Configuration data for the media channel PSD";
+
+ leaf lower-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "Lower frequency of the specified PSD";
+ }
+
+ leaf upper-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "Upper frequency of the specified PSD";
+ }
+
+ leaf psd {
+ type oc-types:ieeefloat32;
+ units "nW/MHz";
+ description
+ "Power spectral density expressed in nanowatts per
+ megahertz, nW/MHz. These units allow the value to often
+ be greater than 1.0. It also avoids dealing with zero values
+ for 0dBm. For example, a 40GHz wide channel
+ with 0dBm power would be:
+ 0dBm = 1mW = 10^6nW
+ 40GHz = 40,000MHz
+ 0dBm/40GHz = 10^6nW/40,000MHz = 1000/40 = 25";
+ }
+ }
+
+ grouping media-channel-psd-state {
+ description
+ "Operational state data for the media channel PSD";
+ }
+
+ grouping media-channel-psd-top {
+ description
+ "Top-level grouping ";
+
+ container psd-distribution {
+ description
+ "Enclosing container for the list of values describing
+ the power spectral density distribution";
+
+ list psd-value {
+ key "lower-frequency upper-frequency";
+ description
+ "List of tuples describing the PSD distribution";
+
+ leaf lower-frequency {
+ type leafref {
+ path "../config/lower-frequency";
+ }
+ description
+ "Reference to the list key";
+ }
+
+ leaf upper-frequency {
+ type leafref {
+ path "../config/upper-frequency";
+ }
+ description
+ "Reference to the list key";
+ }
+
+ container config {
+ description
+ "Configuration data for PSD";
+
+ uses media-channel-psd-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for PSD";
+
+ uses media-channel-psd-config;
+ uses media-channel-psd-state;
+ }
+ }
+ }
+ }
+
+ grouping media-channel-config {
+ description
+ "Configuration data for media channel definitions";
+
+ leaf index {
+ type uint32;
+ description
+ "Identifier for the defined media channel";
+ }
+
+ leaf name {
+ type string;
+ description
+ "The user supplied name of the media channel";
+ }
+
+ leaf lower-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "The lower frequency for the spectrum defined by this media
+ channel";
+ }
+
+ leaf upper-frequency {
+ type oc-opt-types:frequency-type;
+ description
+ "The upper frequency for the spectrum defined by this media
+ channel";
+ }
+
+ leaf admin-status {
+ type oc-opt-types:admin-state-type;
+ description
+ "Sets the admin status of the media channel";
+ }
+
+ }
+
+ grouping media-channel-state {
+ description
+ "Operational state data for media channels ";
+
+ leaf oper-status {
+ type enumeration {
+ enum UP {
+ description
+ "Media channel is operationally up";
+ }
+ enum DOWN {
+ description
+ "Media channel is operationally down";
+ }
+ }
+ description
+ "Operational state of the media channel";
+ }
+
+ }
+
+ grouping media-channel-top {
+ description
+ "Top-level grouping for list of defined media channels";
+
+ container media-channels {
+ description
+ "Enclosing container for media channel list";
+
+ list channel {
+ key "index";
+ description
+ "List of media channels";
+
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+ description
+ "Reference to index number of the media channel";
+ }
+
+ container config {
+ description
+ "Configuration data ";
+
+ uses media-channel-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data ";
+
+ uses media-channel-config;
+ uses media-channel-state;
+ }
+
+ uses media-channel-source-port-top;
+ uses media-channel-dest-port-top;
+ uses media-channel-psd-top;
+ }
+ }
+ }
+
+ grouping wavelength-router-top {
+ description
+ "Top level grouping for the wavelength router";
+
+ container wavelength-router {
+ description
+ "Top-level container for wavelength router device";
+
+ uses media-channel-top;
+ }
+ }
+
+ // data definition statements
+
+ uses wavelength-router-top;
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}