Adding required ietf YANG models to support OTN tunnel as part of SOTN NNI-based...
[sdnc/oam.git] / platform-logic / restconfapi-yang / src / main / yang / sotn / ietf-otn-types@2018-06-07.yang
diff --git a/platform-logic/restconfapi-yang/src/main/yang/sotn/ietf-otn-types@2018-06-07.yang b/platform-logic/restconfapi-yang/src/main/yang/sotn/ietf-otn-types@2018-06-07.yang
new file mode 100644 (file)
index 0000000..dd02b8a
--- /dev/null
@@ -0,0 +1,565 @@
+module ietf-otn-types {
+  namespace "urn:ietf:params:xml:ns:yang:ietf-otn-types";
+  prefix "otn-types";
+
+  organization
+    "IETF CCAMP Working Group";
+  contact
+    "WG Web: <http://tools.ietf.org/wg/ccamp/>
+     WG List: <mailto:ccamp@ietf.org>
+
+     Editor: Haomian Zheng
+             <mailto:zhenghaomian@huawei.com>
+
+     Editor: Aihua Guo
+             <mailto:aihuaguo@huawei.com>
+
+     Editor: Italo Busi
+             <mailto:italo.busi@huawei.com>
+
+     Editor: Anurag Sharma
+             <mailto:ansha@google.com>
+
+     Editor: Rajan Rao
+             <mailto:rrao@infinera.com>
+
+     Editor: Sergio Belotti
+             <mailto:sergio.belotti@nokia.com>
+
+     Editor: Victor Lopez
+             <mailto:victor.lopezalvarez@telefonica.com>
+
+     Editor: Yunbo Li
+             <mailto:liyunbo@chinamobile.com>
+
+     Editor: Yunbin Xu
+             <mailto:xuyunbin@ritt.cn>";
+
+  description
+    "This module defines OTN types.";
+
+  revision "2018-06-07" {
+    description
+      "Revision 0.5";
+    reference
+      "draft-ietf-ccamp-otn-tunnel-model-02";
+  }
+
+  identity tributary-slot-granularity {
+    description
+      "Tributary slot granularity";
+    reference
+      "G.709/Y.1331, February 2016: Interfaces for the Optical
+       Transport Network (OTN)";
+  }
+
+  identity tsg-1.25G {
+    base tributary-slot-granularity;
+    description
+      "1.25G tributary slot granularity";
+  }
+
+  identity tsg-2.5G {
+    base tributary-slot-granularity;
+    description
+      "2.5G tributary slot granularity";
+  }
+/*
+  identity tsg-1.25Gand2.5G {
+    base tributary-slot-granularity;
+    description
+      "Both 1.25G and 2.5G tributary slot granularity";
+  }
+*/
+  identity tributary-protocol-type {
+    description
+      "Base identity for protocol framing used by tributary signals";
+  }
+
+  identity prot-OTU1 {
+    base tributary-protocol-type;
+    description
+      "OTU1 protocol (2.66G)";
+  }
+/*
+  identity prot-OTU1e {
+    base tributary-protocol-type;
+    description
+      "OTU1e type (11.04G)";
+  }
+
+  identity prot-OTU1f {
+    base tributary-protocol-type;
+    description
+      "OTU1f type (11.27G)";
+  }
+*/
+  identity prot-OTU2 {
+    base tributary-protocol-type;
+    description
+      "OTU2 type (10.70G)";
+  }
+
+  identity prot-OTU2e {
+    base tributary-protocol-type;
+    description
+      "OTU2e type (11.09G)";
+  }
+/*
+  identity prot-OTU2f {
+    base tributary-protocol-type;
+    description
+      "OTU2f type (11.31G)";
+  }
+*/
+  identity prot-OTU3 {
+    base tributary-protocol-type;
+    description
+      "OTU3 type (43.01G)";
+  }
+/*
+  identity prot-OTU3e1 {
+    base tributary-protocol-type;
+    description
+      "OTU3e1 type (44.57G)";
+  }
+
+  identity prot-OTU3e2 {
+    base tributary-protocol-type;
+    description
+      "OTU3e2 type (44.58G)";
+  }
+*/
+  identity prot-OTU4 {
+    base tributary-protocol-type;
+    description
+      "OTU4 type (111.80G)";
+  }
+
+  identity prot-OTUCn {
+    base tributary-protocol-type;
+    description
+      "OTUCn type (beyond 100G)";
+  }
+
+  identity prot-ODU0 {
+    base tributary-protocol-type;
+    description
+      "ODU0 protocol (1.24G)";
+  }
+
+  identity prot-ODU1 {
+    base tributary-protocol-type;
+    description
+      "ODU1 protocol (2.49G)";
+  }
+/*
+  identity prot-ODU1e {
+    base tributary-protocol-type;
+    description
+      "ODU1e protocol (10.35G).";
+  }
+
+  identity prot-ODU1f {
+    base tributary-protocol-type;
+    description
+      "ODU1f protocol (10.56G).";
+  }
+*/
+  identity prot-ODU2 {
+    base tributary-protocol-type;
+    description
+      "ODU2 protocol (10.03G)";
+  }
+
+  identity prot-ODU2e {
+    base tributary-protocol-type;
+    description
+      "ODU2e protocol (10.39G)";
+  }
+/*
+  identity prot-ODU2f {
+    base tributary-protocol-type;
+    description
+      "ODU2f protocol (10.60G).";
+  }
+*/
+  identity prot-ODU3 {
+    base tributary-protocol-type;
+    description
+      "ODU3 protocol (40.31G)";
+  }
+/*
+  identity prot-ODU3e1 {
+    base tributary-protocol-type;
+    description
+      "ODU3e1 protocol (41.77G).";
+  }
+
+  identity prot-ODU3e2 {
+    base tributary-protocol-type;
+    description
+      "ODU3e2 protocol (41.78G).";
+  }
+*/
+  identity prot-ODU4 {
+    base tributary-protocol-type;
+    description
+      "ODU4 protocol (104.79G)";
+  }
+
+  identity prot-ODUFlex-cbr {
+    base tributary-protocol-type;
+    description
+      "ODU Flex CBR protocol for transporting constant bit rate
+       signal";
+  }
+
+  identity prot-ODUFlex-gfp {
+    base tributary-protocol-type;
+    description
+      "ODU Flex GFP protocol for transporting stream of packets
+       using Generic Framing Procedure";
+  }
+
+  identity prot-ODUCn {
+    base tributary-protocol-type;
+    description
+      "ODUCn protocol (beyond 100G)";
+  }
+
+  identity prot-1GbE {
+    base tributary-protocol-type;
+    description
+      "1G Ethernet protocol";
+  }
+  identity prot-10GbE-LAN {
+    base tributary-protocol-type;
+    description
+      "10G Ethernet LAN protocol";
+  }
+
+  identity prot-40GbE {
+    base tributary-protocol-type;
+    description
+      "40G Ethernet protocol";
+  }
+
+  identity prot-100GbE {
+    base tributary-protocol-type;
+    description
+      "100G Ethernet protocol";
+  }
+
+  identity client-signal {
+    description
+      "Base identity from which specific client signals for the
+       tunnel are derived";
+  }
+
+  identity client-signal-1GbE {
+    base client-signal;
+    description
+      "Client signal type of 1GbE";
+  }
+
+  identity client-signal-10GbE-LAN {
+    base client-signal;
+    description
+      "Client signal type of 10GbE LAN";
+  }
+
+  identity client-signal-10GbE-WAN {
+    base client-signal;
+    description
+      "Client signal type of 10GbE WAN";
+  }
+
+  identity client-signal-40GbE {
+    base client-signal;
+    description
+      "Client signal type of 40GbE";
+  }
+
+  identity client-signal-100GbE {
+    base client-signal;
+    description
+      "Client signal type of 100GbE";
+  }
+
+  identity client-signal-OC3_STM1 {
+    base client-signal;
+    description
+      "Client signal type of OC3 & STM1";
+  }
+
+  identity client-signal-OC12_STM4 {
+    base client-signal;
+    description
+      "Client signal type of OC12 & STM4";
+  }
+
+  identity client-signal-OC48_STM16 {
+    base client-signal;
+    description
+      "Client signal type of OC48 & STM16";
+  }
+
+  identity client-signal-OC192_STM64 {
+    base client-signal;
+    description
+      "Client signal type of OC192 & STM64";
+  }
+
+  identity client-signal-OC768_STM256 {
+    base client-signal;
+    description
+      "Client signal type of OC768 & STM256";
+  }
+
+  identity client-signal-ODU0 {
+    base client-signal;
+    description
+      "Client signal type of ODU0 (1.24G)";
+  }
+
+  identity client-signal-ODU1 {
+    base client-signal;
+    description
+      "ODU1 protocol (2.49G)";
+  }
+
+  identity client-signal-ODU2 {
+    base client-signal;
+    description
+      "Client signal type of ODU2 (10.03G)";
+  }
+
+  identity client-signal-ODU2e {
+    base client-signal;
+    description
+      "Client signal type of ODU2e (10.39G)";
+  }
+
+  identity client-signal-ODU3 {
+    base client-signal;
+    description
+      "Client signal type of ODU3 (40.31G)";
+  }
+/*
+  identity client-signal-ODU3e2 {
+    base client-signal;
+    description
+      "Client signal type of ODU3e2 (41.78G)";
+  }
+*/
+  identity client-signal-ODU4 {
+    base client-signal;
+    description
+      "Client signal type of ODU4 (104.79G)";
+  }
+
+  identity client-signal-ODUflex-cbr {
+    base client-signal;
+    description
+      "Client signal type of ODU Flex CBR";
+  }
+
+  identity client-signal-ODUflex-gfp {
+    base client-signal;
+    description
+      "Client signal type of ODU Flex GFP";
+  }
+
+  identity client-signal-ODUCn {
+    base client-signal;
+    description
+      "Client signal type of ODUCn (beyond 100G)";
+  }
+
+  identity client-signal-FC400 {
+    base client-signal;
+    description
+      "Client signal type of Fibre Channel FC400";
+  }
+
+  identity client-signal-FC800 {
+    base client-signal;
+    description
+      "Client signal type of Fibre Channel FC800";
+  }
+
+  identity client-signal-FICON-4G {
+    base client-signal;
+    description
+      "Client signal type of Fibre Connection 4G";
+  }
+
+  identity client-signal-FICON-8G {
+    base client-signal;
+    description
+      "Client signal type of Fibre Connection 8G";
+  }
+
+  identity client-signal-OTU1 {
+    base client-signal;
+    description
+      "Client signal type of OTU1";
+  }
+
+  identity client-signal-OTU2 {
+    base client-signal;
+    description
+      "Client signal type of OTU2";
+  }
+
+  identity client-signal-OTU2e {
+    base client-signal;
+    description
+      "Client signal type of OTU2e";
+  }
+
+  identity client-signal-OTU3 {
+    base client-signal;
+    description
+      "Client signal type of OTU3";
+  }
+
+  identity client-signal-OTU4 {
+    base client-signal;
+    description
+      "Client signal type of OTU4";
+  }
+
+  identity otn-label-range-type {
+    description
+      "Base identity from which specific OTN label
+          range types derived";
+  }
+
+  identity label-range-trib-slot {
+    base otn-label-range-type;
+    description
+      "Defines a range of OTN tributary slots";
+  }
+
+  identity label-range-trib-port {
+    base otn-label-range-type;
+    description
+      "Defines a range of OTN tributary ports";
+  }
+  
+  grouping otn-link-bandwidth {
+    list odulist {
+      key "odu-type";
+      description
+        "OTN bandwidth definition";
+      leaf odu-type {
+        type identityref {
+          base otn-types:tributary-protocol-type;
+        }
+        description "ODU type";
+      }
+      leaf number {
+        type uint16;
+        description "Number of ODUs";
+      }
+    }
+  }
+
+  grouping otn-path-bandwidth {
+    leaf odu-type {
+      type identityref {
+        base otn-types:tributary-protocol-type;
+      }
+      description "ODU type";
+    }
+  }
+
+  grouping otn-label-restriction {
+    leaf range-type {
+      type identityref {
+        base otn-types:otn-label-range-type;
+      }
+    }
+    leaf tsg {
+      type identityref {
+        base otn-types:tributary-slot-granularity;
+      }
+      description "Tributary slot granularity.";
+      reference
+        "G.709/Y.1331, February 2016: Interfaces for the
+         Optical Transport Network (OTN)";
+    } 
+    leaf priority {
+      type uint8;
+      description "priority.";
+    }
+  }
+
+  grouping otn-link-label {
+    choice otn-label-type {
+      description
+        "OTN label type";
+      case tributary-port {
+        leaf tpn {
+          type uint16 {
+            range "1..4095";
+          }
+          description
+            "Tributary Port Number. Applicable in case of mux services.";
+          reference
+            "RFC7139: GMPLS Signaling Extensions for Control of Evolving
+             G.709 Optical Transport Networks.";
+        }
+      }
+      case tributary-slot {
+        leaf ts {
+          type uint16 {
+            range "1..4095";
+          }
+          description
+            "Tributary Slot Number. Applicable in case of mux services.";
+          reference
+            "RFC7139: GMPLS Signaling Extensions for Control of Evolving
+             G.709 Optical Transport Networks.";
+        }
+      }
+    }
+  }
+
+  grouping otn-path-label {
+    leaf tpn {
+      type uint16 {
+        range "1..4095";
+      }
+      description
+        "Tributary Port Number. Applicable in case of mux services.";
+      reference
+        "RFC7139: GMPLS Signaling Extensions for Control of Evolving
+         G.709 Optical Transport Networks.";
+    }
+    leaf tsg {
+      type identityref {
+        base otn-types:tributary-slot-granularity;
+      }
+      description "Tributary slot granularity.";
+      reference
+        "G.709/Y.1331, February 2016: Interfaces for the
+         Optical Transport Network (OTN)";
+    }
+    leaf ts-list {
+      type string {
+          pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?"
+                + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
+        }
+        description
+          "A list of available tributary slots ranging
+           between 1 and 9999.
+           For example 1-20,25,50-1000";
+        reference "RFC 7139: GMPLS Signaling Extensions for Control
+                   of Evolving G.709 Optical Transport Networks";
+    }
+  }
+}