aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-transport-line-common.yang
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-transport-line-common.yang')
-rw-r--r--src/plugins/yang/openconfig/openconfig-transport-line-common.yang317
1 files changed, 317 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-transport-line-common.yang b/src/plugins/yang/openconfig/openconfig-transport-line-common.yang
new file mode 100644
index 0000000..9db16b6
--- /dev/null
+++ b/src/plugins/yang/openconfig/openconfig-transport-line-common.yang
@@ -0,0 +1,317 @@
+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; }
+ import openconfig-platform-transceiver { prefix oc-transceiver; }
+
+
+ // 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.4.1";
+
+ revision "2018-07-17" {
+ description
+ "Remove leaf 'enabled' from osc-config";
+ reference "0.4.1";
+ }
+
+ revision "2018-05-08" {
+ description
+ "Added leaf 'enabled' to osc-config and
+ leaf 'output-frequency' to osc-state";
+ reference "0.4.0";
+ }
+
+ revision "2017-09-08" {
+ description
+ "Correct bug with OSC interfaces";
+ reference "0.3.1";
+ }
+
+ 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 interface {
+ type oc-if:base-interface-ref;
+ description
+ "Reference to an OSC interface";
+ }
+ }
+
+ 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;
+ }
+
+ uses oc-transceiver:output-optical-frequency;
+ }
+
+
+
+ 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
+
+}