reformat API YANG models 85/87585/1
authorguillaume.lambert <guillaume.lambert@orange.com>
Tue, 11 Feb 2020 17:08:45 +0000 (18:08 +0100)
committerguillaume.lambert <guillaume.lambert@orange.com>
Tue, 11 Feb 2020 17:10:49 +0000 (18:10 +0100)
using pyang version 2.1.1
with --yang-canonical option

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I7bf772bf79fd6833009bb57037892ebeb80bf2b0

17 files changed:
api/src/main/yang/gnpy-api@2019-01-03.yang
api/src/main/yang/gnpy-network-topology@2018-12-14.yang
api/src/main/yang/gnpy-path-computation-simplified@2019-05-02.yang
api/src/main/yang/service_path/transportpce-common-service-path-types@2020-01-28.yang
api/src/main/yang/service_path/transportpce-common-types@2020-01-28.yang
api/src/main/yang/service_path/transportpce-pathDescription@2017-10-17.yang
api/src/main/yang/service_path/transportpce-pce@2020-01-28.yang
api/src/main/yang/service_path/transportpce-renderer-device@2020-01-28.yang
api/src/main/yang/service_path/transportpce-renderer@2017-10-17.yang
api/src/main/yang/service_path/transportpce-routing-constraints@2017-10-17.yang
api/src/main/yang/service_path/transportpce-service-path@2017-10-17.yang
api/src/main/yang/service_path/transportpce-servicehandler@2017-10-17.yang
api/src/main/yang/tapi@2018-09-28.yang
api/src/main/yang/transportpce-alarmsuppression@2017-11-02.yang
api/src/main/yang/transportpce-networkutils@2017-08-18.yang
api/src/main/yang/transportpce-olm@2017-04-18.yang
api/src/main/yang/transportpce-portmapping@2020-01-28.yang

index 57833306e7aaffdd5d99fe0948925ed8b7225710..e0d5348d03a2ec020026563a2841a5c8eea2652d 100644 (file)
@@ -1,44 +1,44 @@
 module gnpy-api {
   yang-version 1;
   namespace "gnpy:gnpy-api";
+  prefix gnpyapi;
 
-  prefix "gnpyapi";
-
-  import gnpy-network-topology  {
-    prefix "gnpynt";
+  import gnpy-network-topology {
+    prefix gnpynt;
   }
-  import gnpy-path-computation-simplified  {
-    prefix "gnpypc";
+  import gnpy-path-computation-simplified {
+    prefix gnpypc;
   }
 
   organization
     "Telecom Infra Project OOPT PSE Working Group";
-
   contact
     "WG Web:   <https://github.com/Telecominfraproject/oopt-gnpy>
      contact:  <mailto:ahmed.triki@orange.com>
      contact:  <mailto:esther.lerouzic@orange.com>
-   ";
-
-  description "YANG model for gnpy api input for path computation - TransportPCE preversion";
-
-  revision "2019-01-03" {
-    description "first draft";
-    reference "YANG model for api input for path computation with gnpy";
+    ";
+  description
+    "YANG model for gnpy api input for path computation - TransportPCE preversion";
+
+  revision 2019-01-03 {
+    description
+      "first draft";
+    reference
+      "YANG model for api input for path computation with gnpy";
   }
 
-  container gnpy-api{
-      description "This is the structure of the body of the request to gnpy";
-      container topology-file{
-          uses gnpynt:topo;
-          description
-              "Describe the topology file to connect to gnpy";
-      }
-      container service-file{
-          uses gnpypc:service;
-          description
-              "Describe the service file to connect to gnpy";
-      }
+  container gnpy-api {
+    description
+      "This is the structure of the body of the request to gnpy";
+    container topology-file {
+      description
+        "Describe the topology file to connect to gnpy";
+      uses gnpynt:topo;
+    }
+    container service-file {
+      description
+        "Describe the service file to connect to gnpy";
+      uses gnpypc:service;
+    }
   }
-
 }
index c49d4f142a1da8d6f7bb06c4ca23756e7846e663..f6f557d74981e71f70d9fb7ad8f08940a5e6ad2b 100644 (file)
@@ -1,32 +1,30 @@
 module gnpy-network-topology {
   yang-version 1;
   namespace "gnpy:gnpy-network-topology";
-
-  prefix "gnpynt";
-
+  prefix gnpynt;
 
   import gnpy-eqpt-config {
-    prefix "geqpt";
+    prefix geqpt;
   }
-
   import ietf-inet-types {
     prefix inet;
   }
 
   organization
     "Telecom Infra Project OOPT PSE Working Group";
-
   contact
     "WG Web:   <https://github.com/Telecominfraproject/oopt-gnpy>
      contact:  <mailto:ahmed.triki@orange.com>
      contact:  <mailto:esther.lerouzic@orange.com>
-   ";
-
-  description "YANG model for gnpy network input for path computation - transportPCE preversion";
+    ";
+  description
+    "YANG model for gnpy network input for path computation - transportPCE preversion";
 
-  revision "2018-12-14" {
-    description "first draft";
-    reference "YANG model for network input for path computation with gnpy";
+  revision 2018-12-14 {
+    description
+      "first draft";
+    reference
+      "YANG model for network input for path computation with gnpy";
   }
 
   identity type-element {
@@ -65,20 +63,24 @@ module gnpy-network-topology {
   }
 
   identity length-unit {
-    description "length unit" ;
+    description
+      "length unit";
   }
 
   identity km {
-    base length-unit ;
-    description "kilometers" ;
+    base length-unit;
+    description
+      "kilometers";
   }
 
-  identity m{
-    base length-unit ;
-    description "meter" ;
+  identity m {
+    base length-unit;
+    description
+      "meter";
   }
+
   typedef Coordinate {
-    type  decimal64 {
+    type decimal64 {
       fraction-digits 6;
     }
   }
@@ -86,12 +88,12 @@ module gnpy-network-topology {
   typedef te-node-id {
     type inet:ip-address;
     description
-          "An identifier for a node in a topology.
-           The identifier is represented as 32-bit unsigned integer in
-           the dotted-quad notation.
-           This attribute is mapped to Router ID in
-           RFC3630, RFC5329, RFC5305, and RFC6119.";
-   }
+      "An identifier for a node in a topology.
+       The identifier is represented as 32-bit unsigned integer in
+       the dotted-quad notation.
+       This attribute is mapped to Router ID in
+       RFC3630, RFC5329, RFC5305, and RFC6119.";
+  }
 
   typedef Coef {
     type decimal64 {
@@ -99,180 +101,178 @@ module gnpy-network-topology {
     }
   }
 
-
   grouping location-attributes {
-      container location {
-        leaf city {
-          type string;
-          mandatory true ;
-        }
-        leaf region {
-          type string;
-          mandatory true ;
-        }
-        leaf latitude {
-          type Coordinate;
-          mandatory true ;
-        }
-        leaf longitude {
-          type Coordinate;
-          mandatory true ;
-        }
+    container location {
+      leaf city {
+        type string;
+        mandatory true;
+      }
+      leaf region {
+        type string;
+        mandatory true;
+      }
+      leaf latitude {
+        type Coordinate;
+        mandatory true;
+      }
+      leaf longitude {
+        type Coordinate;
+        mandatory true;
+      }
     }
   }
 
   grouping fiber-params {
-    description "....." ;
+    description
+      ".....";
     leaf length {
-      mandatory true ;
       type decimal64 {
         fraction-digits 2;
       }
+      mandatory true;
     }
-    leaf loss_coef{
-      mandatory true ;
+    leaf loss_coef {
       type decimal64 {
         fraction-digits 2;
       }
+      mandatory true;
     }
-    leaf length_units{
+    leaf length_units {
       type identityref {
-        base length-unit ;
+        base length-unit;
       }
-      mandatory true ;
+      mandatory true;
     }
-    leaf att_in{
+    leaf att_in {
       type decimal64 {
         fraction-digits 2;
       }
-      mandatory true ;
+      mandatory true;
     }
-    leaf con_in{
+    leaf con_in {
       type decimal64 {
         fraction-digits 2;
       }
-      mandatory true ;
+      mandatory true;
     }
-    leaf con_out{
+    leaf con_out {
       type decimal64 {
         fraction-digits 2;
       }
-      mandatory true ;
+      mandatory true;
     }
   }
 
   grouping edfa-params {
     container operational {
+      description
+        "Operational values for the Edfa ";
       leaf gain-target {
         type decimal64 {
           fraction-digits 2;
         }
-        mandatory true ;
-        units dB ;
-        description ".." ;
+        units "dB";
+        mandatory true;
+        description
+          "..";
       }
       leaf tilt-target {
         type decimal64 {
           fraction-digits 2;
         }
-        mandatory true ;
-        description ".." ;
+        mandatory true;
+        description
+          "..";
       }
       leaf out-voa {
         type decimal64 {
           fraction-digits 2;
         }
-        mandatory true ;
-        units dB ;
-        description ".." ;
+        units "dB";
+        mandatory true;
+        description
+          "..";
       }
-      description "Operational values for the Edfa " ;
     }
   }
 
-  grouping roadm-params{
-    leaf  target_pch_out_db{
+  grouping roadm-params {
+    leaf target_pch_out_db {
       type decimal64 {
         fraction-digits 2;
       }
-      units dB ;
-      description ".." ;
+      units "dB";
+      description
+        "..";
     }
   }
 
-  grouping transceiver-params{
-
-  }
+  grouping transceiver-params;
 
-  grouping fused-params{
-
-  }
+  grouping fused-params;
 
-  grouping element-type-choice{
-    choice element-type{
-      case Edfa{
-        when "type = 'Edfa'" ;
-        uses edfa-params ;
+  grouping element-type-choice {
+    choice element-type {
+      case Edfa {
+        when "type = 'Edfa'";
+        uses edfa-params;
       }
-      case FiberRoadm{
+      case FiberRoadm {
         container params {
-          choice fiberroadm{
-            case Fiber{
-              when "type = 'Fiber'" ;
-              uses fiber-params ;
+          choice fiberroadm {
+            case Fiber {
+              when "type = 'Fiber'";
+              uses fiber-params;
             }
-            case Roadm{
-              when "type = 'Roadm'" ;
-              uses roadm-params ;
+            case Roadm {
+              when "type = 'Roadm'";
+              uses roadm-params;
             }
           }
         }
       }
-      case Transceiver{
-        when "type = 'Transceiver'" ;
+      case Transceiver {
+        when "type = 'Transceiver'";
       }
-
-      case Fused{
-        when "type = 'Fused'" ;
+      case Fused {
+        when "type = 'Fused'";
       }
     }
   }
 
   grouping topo {
-      list elements {
-        key uid;
-        leaf uid {
-            type string;
-        }
-        leaf type {
-          type identityref {
-            base type-element ;
-          }
-          mandatory true ;
-        }
-        leaf type_variety {
-            type string ;
-            mandatory false ;
-          }
-        container metadata {
-          uses location-attributes ;
+    list elements {
+      key "uid";
+      leaf uid {
+        type string;
+      }
+      leaf type {
+        type identityref {
+          base type-element;
         }
-
-        uses element-type-choice ;
+        mandatory true;
       }
-
-      list connections {
-        config false ;
-        leaf from_node {
-          type leafref{
-            path "/topo/elements/uid" ;
-          }
+      leaf type_variety {
+        type string;
+        mandatory false;
+      }
+      container metadata {
+        uses location-attributes;
+      }
+      uses element-type-choice;
+    }
+    list connections {
+      config false;
+      leaf from_node {
+        type leafref {
+          path "/topo/elements/uid";
         }
-        leaf to_node {
-          type leafref{
-            path "/topo/elements/uid" ;
-          }
+      }
+      leaf to_node {
+        type leafref {
+          path "/topo/elements/uid";
         }
       }
+    }
   }
 }
index 64979b5f7eebe42c243794e8caca5eba1acd7c5e..9f73607ba3b78acc783c3652347a7fe786e36d89 100644 (file)
 module gnpy-path-computation-simplified {
   yang-version 1;
   namespace "gnpy:path";
-
-  prefix "gnpypc";
+  prefix gnpypc;
 
   import ietf-yang-types {
-    prefix "yang-types";
+    prefix yang-types;
   }
-
   import ietf-inet-types {
     prefix inet;
   }
-    organization
-    "Telecom Infra Project OOPT PSE Working Group";
 
+  organization
+    "Telecom Infra Project OOPT PSE Working Group";
   contact
     "WG Web:   <https://github.com/Telecominfraproject/oopt-gnpy>
      contact:  <mailto:ahmed.triki@orange.com>
      contact:  <mailto:esther.lerouzic@orange.com>
-   ";
-
-  description "YANG model for gnpy path computation simplified for transportPCE";
-
-  revision "2019-05-02" {
-    description "second draft with detailed blocking reasons";
-    reference "YANG model for path computation with gnpy inputs";
-  }
-
-  grouping effective-freq-slot{
-         /* content copied from ietf-flexi-grid-media-channel, because only M and N are needed
-            from the initial grouping.
-         */
-         description "The effective frequency slot is an attribute
-            of a media channel and, being a frequency slot, it is
-            described by its nominal central frequency and slot
-            width";
-         reference "rfc7698";
-            leaf N {
-               type int32;
-               description
-                  "Is used to determine the Nominal Central
-                  Frequency. The set of nominal central frequencies
-                  can be built using the following expression:
-                     f = 193.1 THz + n x 0.00625 THz,
-                  where 193.1 THz is ITU-T ''anchor frequency'' for
-                  transmission over the C band, n is a positive or
-                  negative integer including 0.";
-               reference "rfc7698";
-            }
-            leaf M {
-               type int32;
-               description
-                  "Is used to determine the slot width. A slot width
-                  is constrained to be M x SWG (that is, M x 12.5 GHz),
-                  where M is an integer greater than or equal to 1.";
-               reference "rfc7698";
-    }
-  }
+    ";
+  description
+    "YANG model for gnpy path computation simplified for transportPCE";
 
-  grouping gnpy-specific-parameters{
+  revision 2019-05-02 {
     description
-      "This grouping defines the gnpy specific parameters for requests.";
-        leaf technology {
-            type string;
-            default "flexi-grid";
-            description
-          "Data plane technology type.";
-          }
-      leaf trx_type {
-        type string ;
-        mandatory true;
-        description "name of the transponder type (to be read from equipment library";
-
-      }
-      leaf trx_mode {
-        type string ;
-        description "name of the transponder mode (to be read from equipment library";
-
-      }
-      list effective-freq-slot {
-        key "N";
-        uses effective-freq-slot ;
-      }
-      leaf spacing {
-        mandatory true;
-        type decimal64 {
-          fraction-digits 1;
-        }
-        units Hz;
-        description
-          "It is the spacing between channels assuming full load with
-          same channels as the requested one. multiple of 12.5 GHz";
-
-      }
-      leaf max-nb-of-channel{
-        type uint32 ;
-        description "Nb of channel to take into account for the full load case.
-        ";
-
-      }
-      leaf output-power{
-        type decimal64 {
-          fraction-digits 5;
-        }
-        units W;
-        description "optical power setting to be used for the propagation";
-
-      }
-      leaf path_bandwidth{
-        type decimal64 {
-          fraction-digits 5;
-        }
-        mandatory true;
-        units bit/s;
-        description "Capacity required";
-      }
+      "second draft with detailed blocking reasons";
+    reference
+      "YANG model for path computation with gnpy inputs";
   }
 
   identity SNR-bandwidth {
@@ -148,54 +58,9 @@ module gnpy-path-computation-simplified {
   }
 
   identity path_bandwidth {
-     base path-metric-type;
-     description
-       "to be revised";
-  }
-
-  grouping transponder{
-        leaf transponder-type {
-        type string ;
-        description
-          "transponder type.";
-          }
-      leaf transponder-mode {
-        type string ;
-        description
-          "transponder mode.";
-          }
-  }
-
-  grouping hop-attribute{
+    base path-metric-type;
     description
-      "This grouping defines the hop attribute parameters for request or response";
-    choice hop-type{
-      case tsp {
-        container transponder{
-          uses transponder ;
-        }
-      }
-      case regen {
-        container regenerator{
-          leaf regenerator-id{
-            type string ;
-          }
-          uses transponder ;
-        }
-      }
-      case pow {
-        container optical-power{
-          leaf optical-power{
-            type decimal64 {
-              fraction-digits 5;
-            }
-            units W;
-            description "hop output (input??) power";
-          }
-        }
-      }
-    }
-
+      "to be revised";
   }
 
   identity path-metric-type {
@@ -238,24 +103,28 @@ module gnpy-path-computation-simplified {
       }
     }
     description
-     "enumerated type for specifying loose or strict
-      paths";
-    reference "RFC3209: section-4.3.2";
+      "enumerated type for specifying loose or strict
+       paths";
+    reference
+      "RFC3209: section-4.3.2";
   }
 
   typedef te-path-disjointness {
     type bits {
       bit node {
         position 0;
-        description "Node disjoint.";
+        description
+          "Node disjoint.";
       }
       bit link {
         position 1;
-        description "Link disjoint.";
+        description
+          "Link disjoint.";
       }
       bit srlg {
         position 2;
-        description "SRLG (Shared Risk Link Group) disjoint.";
+        description
+          "SRLG (Shared Risk Link Group) disjoint.";
       }
     }
     description
@@ -264,7 +133,9 @@ module gnpy-path-computation-simplified {
       "RFC4872: RSVP-TE Extensions in Support of End-to-End
        Generalized Multi-Protocol Label Switching (GMPLS)
        Recovery";
-  } // te-path-disjointness
+  }
+
+  // te-path-disjointness
 
   typedef te-node-id {
     type inet:ip-address;
@@ -278,8 +149,10 @@ module gnpy-path-computation-simplified {
 
   typedef te-tp-id {
     type union {
-      type uint32;          // Unnumbered
-      type inet:ip-address; // IPv4 or IPv6 address
+      type uint32;
+      // Unnumbered
+      type inet:ip-address;
+      // IPv4 or IPv6 address
     }
     description
       "An identifier for a TE link endpoint on a node.
@@ -287,15 +160,153 @@ module gnpy-path-computation-simplified {
        RFC3630 and RFC5305.";
   }
 
-    typedef accumulated-metric-type {
-      type union {
-        type uint64;
-        type decimal64 {
-          fraction-digits 2;
-        }
+  typedef accumulated-metric-type {
+    type union {
+      type uint64;
+      type decimal64 {
+        fraction-digits 2;
+      }
+    }
+    description
+      "type useable for accumulative-value";
+  }
+
+  grouping effective-freq-slot {
+    /* content copied from ietf-flexi-grid-media-channel, because only M and N are needed
+       from the initial grouping.
+     */
+    description
+      "The effective frequency slot is an attribute
+       of a media channel and, being a frequency slot, it is
+       described by its nominal central frequency and slot
+       width";
+    reference
+      "rfc7698";
+    leaf N {
+      type int32;
+      description
+        "Is used to determine the Nominal Central
+         Frequency. The set of nominal central frequencies
+         can be built using the following expression:
+           f = 193.1 THz + n x 0.00625 THz,
+         where 193.1 THz is ITU-T ''anchor frequency'' for
+         transmission over the C band, n is a positive or
+         negative integer including 0.";
+      reference
+        "rfc7698";
+    }
+    leaf M {
+      type int32;
+      description
+        "Is used to determine the slot width. A slot width
+         is constrained to be M x SWG (that is, M x 12.5 GHz),
+         where M is an integer greater than or equal to 1.";
+      reference
+        "rfc7698";
+    }
+  }
+
+  grouping gnpy-specific-parameters {
+    description
+      "This grouping defines the gnpy specific parameters for requests.";
+    leaf technology {
+      type string;
+      default "flexi-grid";
+      description
+        "Data plane technology type.";
+    }
+    leaf trx_type {
+      type string;
+      mandatory true;
+      description
+        "name of the transponder type (to be read from equipment library";
+    }
+    leaf trx_mode {
+      type string;
+      description
+        "name of the transponder mode (to be read from equipment library";
+    }
+    list effective-freq-slot {
+      key "N";
+      uses effective-freq-slot;
+    }
+    leaf spacing {
+      type decimal64 {
+        fraction-digits 1;
+      }
+      units "Hz";
+      mandatory true;
+      description
+        "It is the spacing between channels assuming full load with
+         same channels as the requested one. multiple of 12.5 GHz";
+    }
+    leaf max-nb-of-channel {
+      type uint32;
+      description
+        "Nb of channel to take into account for the full load case.\n";
+    }
+    leaf output-power {
+      type decimal64 {
+        fraction-digits 5;
       }
+      units "W";
       description
-          "type useable for accumulative-value";
+        "optical power setting to be used for the propagation";
+    }
+    leaf path_bandwidth {
+      type decimal64 {
+        fraction-digits 5;
+      }
+      units "bit/s";
+      mandatory true;
+      description
+        "Capacity required";
+    }
+  }
+
+  grouping transponder {
+    leaf transponder-type {
+      type string;
+      description
+        "transponder type.";
+    }
+    leaf transponder-mode {
+      type string;
+      description
+        "transponder mode.";
+    }
+  }
+
+  grouping hop-attribute {
+    description
+      "This grouping defines the hop attribute parameters for request or response";
+    choice hop-type {
+      case tsp {
+        container transponder {
+          uses transponder;
+        }
+      }
+      case regen {
+        container regenerator {
+          leaf regenerator-id {
+            type string;
+          }
+          uses transponder;
+        }
+      }
+      case pow {
+        container optical-power {
+          leaf optical-power {
+            type decimal64 {
+              fraction-digits 5;
+            }
+            units "W";
+            description
+              "hop output (input??) power";
+          }
+        }
+      }
+    }
   }
 
   grouping path-route-objects {
@@ -306,7 +317,7 @@ module gnpy-path-computation-simplified {
       description
         "Container for the route object list";
       list route-object-include-exclude {
-        key index;
+        key "index";
         description
           "List of explicit route objects to include or
            exclude in path computation";
@@ -314,15 +325,17 @@ module gnpy-path-computation-simplified {
           type identityref {
             base route-usage-type;
           }
-          description "Explicit-route usage.";
+          description
+            "Explicit-route usage.";
         }
-        uses explicit-route-hop ;
+        uses explicit-route-hop;
       }
     }
   }
 
   grouping generic-path-disjointness {
-    description "Path disjointness grouping";
+    description
+      "Path disjointness grouping";
     leaf disjointness {
       type te-path-disjointness;
       description
@@ -342,26 +355,30 @@ module gnpy-path-computation-simplified {
   grouping generic-path-constraints {
     description
       "Global named path constraints configuration
-      grouping";
+       grouping";
     container path-constraints {
-      description "TE named path constraints container";
+      description
+        "TE named path constraints container";
       uses common-path-constraints-attributes;
     }
   }
 
-
   grouping explicit-route-hop {
     description
       "The explicit route subobject grouping";
     leaf index {
       type uint32;
-      description "ERO subobject index";
+      description
+        "ERO subobject index";
     }
     choice type {
       description
         "The explicit route subobject type";
       case num-unnum-hop {
         container num-unnum-hop {
+          description
+            "Numbered and Unnumbered link/node explicit route
+             subobject";
           leaf node-id {
             //type te-node-id;
             type string;
@@ -373,28 +390,27 @@ module gnpy-path-computation-simplified {
             type string;
             description
               "TE link termination point identifier. The combination
-              of TE link ID and the TE node ID is used to identify an
-              unnumbered TE link.";
+               of TE link ID and the TE node ID is used to identify an
+               unnumbered TE link.";
           }
           leaf hop-type {
             type te-hop-type;
-            description "strict or loose hop";
+            description
+              "strict or loose hop";
           }
-          description
-            "Numbered and Unnumbered link/node explicit route
-            subobject";
         }
       }
       case label {
+        description
+          "The Label ERO subobject";
         container label-hop {
-          description "Label hop type";
+          description
+            "Label hop type";
           uses effective-freq-slot;
         }
-        description
-          "The Label ERO subobject";
       }
-      case hop-attribute{
-        uses gnpypc:hop-attribute ;
+      case hop-attribute {
+        uses gnpypc:hop-attribute;
       }
     }
   }
@@ -403,129 +419,144 @@ module gnpy-path-computation-simplified {
     description
       "Common constraints grouping that can be set on
        a constraint set or directly on the tunnel";
-
     container te-bandwidth {
-      uses gnpy-specific-parameters ;
       description
         "A requested bandwidth to use for path computation";
+      uses gnpy-specific-parameters;
     }
   }
 
   grouping end-points {
     description
       "Common grouping to define the TE tunnel end-points";
-
     leaf source {
       type inet:ip-address;
-      description "TE tunnel source address.";
+      description
+        "TE tunnel source address.";
     }
     leaf destination {
       type inet:ip-address;
-      description "P2P tunnel destination address";
+      description
+        "P2P tunnel destination address";
     }
     leaf src-tp-id {
       type binary;
-      description "TE tunnel source termination point identifier.";
+      description
+        "TE tunnel source termination point identifier.";
     }
     leaf dst-tp-id {
       type binary;
-
-      description "TE tunnel destination termination point
-identifier.";
+      description
+        "TE tunnel destination termination point
+         identifier.";
     }
   }
 
   grouping synchronization-info {
-    description "Information for sync";
+    description
+      "Information for sync";
     list synchronization {
       key "synchronization-id";
-      description "sync list";
+      description
+        "sync list";
       leaf synchronization-id {
         type uint32;
-        description "index";
+        description
+          "index";
       }
       container svec {
         description
-         "Synchronization VECtor";
+          "Synchronization VECtor";
         leaf relaxable {
           type boolean;
-          default true;
+          default "true";
           description
-           "If this leaf is true, path computation process is free
-to ignore svec content.
-            otherwise it must take into account this svec.";
+            "If this leaf is true, path computation process is free
+             to ignore svec content.
+             otherwise it must take into account this svec.";
         }
         uses generic-path-disjointness;
         leaf-list request-id-number {
           type uint32;
-          description "This list reports the set of M path computation requests that must be synchronized.";
+          description
+            "This list reports the set of M path computation requests that must be synchronized.";
         }
       }
     }
   }
 
   grouping generic-path-properties {
-    description "TE generic path properties grouping";
+    description
+      "TE generic path properties grouping";
     container path-properties {
       config false;
-      description "The TE path properties";
+      description
+        "The TE path properties";
       list path-metric {
-        key metric-type;
-        description "TE path metric type";
+        key "metric-type";
+        description
+          "TE path metric type";
         leaf metric-type {
           type identityref {
             base path-metric-type;
           }
-          description "TE path metric type";
+          description
+            "TE path metric type";
         }
         leaf accumulative-value {
           type decimal64 {
-              fraction-digits 2;
+            fraction-digits 2;
           }
-          description "TE path metric accumulative value";
+          description
+            "TE path metric accumulative value";
         }
       }
-//      container path-route-objects {
-//        description
-//          "Container for the list of route objects either returned by
-//           the computation engine or actually used by an LSP";
-//        list path-route-object {
-//          key index;
-//          description
-//            "List of route objects either returned by the computation
-//             engine or actually used by an LSP";
-//          uses explicit-route-hop;
-//        }
-//      }
+      //      container path-route-objects {
+      //        description
+      //          "Container for the list of route objects either returned by
+      //           the computation engine or actually used by an LSP";
+      //        list path-route-object {
+      //          key index;
+      //          description
+      //            "List of route objects either returned by the computation
+      //             engine or actually used by an LSP";
+      //          uses explicit-route-hop;
+      //        }
+      //      }
       list path-route-objects {
+        description
+          "Container for the list of route objects either returned by
+           the computation engine or actually used by an LSP";
+        container path-route-object {
           description
-            "Container for the list of route objects either returned by
-             the computation engine or actually used by an LSP";
-          container path-route-object {
-            description
-              "List of route objects either returned by the computation
-               engine or actually used by an LSP";
-            uses explicit-route-hop;
-          }
+            "List of route objects either returned by the computation
+             engine or actually used by an LSP";
+          uses explicit-route-hop;
         }
+      }
     }
   }
 
   grouping path-info {
+    description
+      "Path computation output information";
     uses generic-path-properties;
-    description "Path computation output information";
   }
 
-// adding some blocking reasons and info on path in case of blocking
+  // adding some blocking reasons and info on path in case of blocking
 
   grouping no-path-info {
-    description "no-path-info";
+    description
+      "no-path-info";
     container no-path {
       presence "Response without path information, due to failure
-        performing the path computation";
+                performing the path computation";
+      description
+        "if path computation cannot identify a path,
+         rpc returns no path.";
       leaf no-path {
         type string;
-        mandatory true ;
+        mandatory true;
         description
           "returned blocking reasons:
             NO_PATH
@@ -536,60 +567,64 @@ to ignore svec content.
             MODE_NOT_FEASIBLE
             NO_SPECTRUM
           ";
-        }
-      uses generic-path-properties ;
-      description "if path computation cannot identify a path,
-        rpc returns no path.";
+      }
+      uses generic-path-properties;
     }
   }
 
   /* TODO : correct the following with good trees:
-  *  te:tunnels-rpc/te:input/te:tunnel-info
-  *  te:tunnels-rpc/te:output/te:result
-  */
-   grouping service {
-     list path-request {
-       key "request-id";
-       description "request-list";
-       leaf request-id {
-         type uint32;
-         mandatory true;
-         description "Each path computation request is uniquely identified by the request-id-number.";
-       }
-
-       uses end-points;
-       uses path-route-objects;
-       uses generic-path-constraints;
-     }
-     uses synchronization-info;
-   }
-
-   grouping result {
-     list response {
-       key response-id;
-       config false;
-       description "response";
-       leaf response-id {
-         type uint32;
-         description
-         "The list key that has to reuse request-id-number.";
-       }
-       choice response-type {
-         config false;
-         description "response-type";
-         case no-path-case {
-           uses no-path-info;
-         }
-         case path-case {
-           uses path-info;
-           description "Path computation service.";
-         }
-       }
-     }
-   }
-   container result {
-     uses result;
-     description
-     "Describe the service file to connect to gnpy";
-   }
+   *  te:tunnels-rpc/te:input/te:tunnel-info
+   *  te:tunnels-rpc/te:output/te:result
+   */
+
+  grouping service {
+    list path-request {
+      key "request-id";
+      description
+        "request-list";
+      leaf request-id {
+        type uint32;
+        mandatory true;
+        description
+          "Each path computation request is uniquely identified by the request-id-number.";
+      }
+      uses end-points;
+      uses path-route-objects;
+      uses generic-path-constraints;
+    }
+    uses synchronization-info;
+  }
+
+  grouping result {
+    list response {
+      key "response-id";
+      config false;
+      description
+        "response";
+      leaf response-id {
+        type uint32;
+        description
+          "The list key that has to reuse request-id-number.";
+      }
+      choice response-type {
+        config false;
+        description
+          "response-type";
+        case no-path-case {
+          uses no-path-info;
+        }
+        case path-case {
+          description
+            "Path computation service.";
+          uses path-info;
+        }
+      }
+    }
+  }
+
+  container result {
+    description
+      "Describe the service file to connect to gnpy";
+    uses result;
+  }
 }
index fcecc4494eaf36ae0994fe2be66918337a467ca1..b7995d8f988ff8782824841c722af16b4dfa7890 100644 (file)
@@ -75,56 +75,53 @@ module transportpce-common-service-path-types {
 
   revision 2020-01-28 {
     description
-        "Version 1.7";
-        // General consolidation to handle OTN and ONAP MDONS use case
+      "Version 1.7";
+    // General consolidation to handle OTN and ONAP MDONS use case
   }
-
   revision 2019-10-09 {
     description
       "Version 1.6.1";
   }
-
   revision 2017-10-16 {
     description
       "Version 1.6";
   }
-
   revision 2017-04-26 {
-      description
-        "Version 1.5";
+    description
+      "Version 1.5";
   }
 
   typedef service-path-notification-types {
     type enumeration {
-      enum "path-computation-request" {
+      enum path-computation-request {
         value 1;
       }
-      enum "cancel-resource-reserve" {
+      enum cancel-resource-reserve {
         value 2;
       }
-      enum "service-implementation-request" {
+      enum service-implementation-request {
         value 3;
       }
-      enum "service-delete" {
+      enum service-delete {
         value 4;
       }
     }
   }
 
   typedef rpc-status-ex {
-    description
-      "extended status of RPC ";
     type enumeration {
-      enum "Successful" {
+      enum Successful {
         value 1;
       }
-      enum "Failed" {
+      enum Failed {
         value 2;
       }
-      enum "Pending" {
+      enum Pending {
         value 3;
       }
     }
+    description
+      "extended status of RPC ";
   }
 
   grouping rpc-response-status-ex {
@@ -133,22 +130,19 @@ module transportpce-common-service-path-types {
       mandatory true;
       description
         "Successful, Failed or Pending";
-
-        }
-
+    }
     leaf status-message {
-        type string;
-        description
-          "Gives a more detailed reason for failure";
-        }
-
-   }
+      type string;
+      description
+        "Gives a more detailed reason for failure";
+    }
+  }
 
   grouping response-parameters-sp {
     container response-parameters {
       uses transportpce-routing-constraints:routing-constraints-sp;
       container path-description {
-           uses transportpce-pathDescription:path-description;
+        uses transportpce-pathDescription:path-description;
       }
     }
   }
@@ -161,40 +155,44 @@ module transportpce-common-service-path-types {
         "Format of the requested service: Ethernet, OTU, etc.";
     }
     leaf service-rate {
-      when "../service-format!='OMS'"{
-        description "service rate not applicable when service format is roadmline";
+      when "../service-format!='OMS'" {
+        description
+          "service rate not applicable when service format is roadmline";
       }
       type uint32;
       mandatory true;
       description
-            "Rate of the requested service in GBps";
+        "Rate of the requested service in GBps";
     }
     leaf otu-service-rate {
       when "../service-format='OTU'" {
-        description "service rate not applicable when service format is OTU";
+        description
+          "service rate not applicable when service format is OTU";
       }
       type identityref {
         base org-openroadm-otn-common-types:otu-rate-identity;
       }
       mandatory false;
       description
-            "OTU Rate of the requested service";
+        "OTU Rate of the requested service";
     }
     leaf odu-service-rate {
       when "../service-format='ODU'" {
-        description "service rate not applicable when service format is ODU";
+        description
+          "service rate not applicable when service format is ODU";
       }
       type identityref {
         base org-openroadm-otn-common-types:odu-rate-identity;
       }
       mandatory false;
       description
-            "OTU Rate of the requested service";
+        "OTU Rate of the requested service";
     }
     leaf other-service-format-and-rate {
       type string;
-      description "This value encodes both the service format and the rate supported.
-            This field should not be specified when service format != other.";
+      description
+        "This value encodes both the service format and the rate supported.
+         This field should not be specified when service format != other.";
     }
     leaf clli {
       type string;
@@ -203,14 +201,15 @@ module transportpce-common-service-path-types {
         "CLLI";
     }
     leaf node-id {
-         type string;
+      type string;
     }
     container tx-direction {
       leaf logical-connection-point {
         type string;
-        description "PCE works on topology --> change from port (device) to node-id+logical-connection-point
-                (topology) assuming Portmapping will be used by both the Renderer
-                and the SH to make the conversion from device to topology";
+        description
+          "PCE works on topology --> change from port (device) to node-id+logical-connection-point
+           (topology) assuming Portmapping will be used by both the Renderer
+           and the SH to make the conversion from device to topology";
       }
       uses org-openroadm-common-service-types:service-port;
       //     uses service-lgx;
@@ -219,9 +218,10 @@ module transportpce-common-service-path-types {
     container rx-direction {
       leaf logical-connection-point {
         type string;
-        description "PCE works on topology --> change from port (device) to node-id+logical-connection-point
-                (topology) assuming Portmapping will be used by both the Renderer
-                and the SH to make the conversion from device to topology";
+        description
+          "PCE works on topology --> change from port (device) to node-id+logical-connection-point
+           (topology) assuming Portmapping will be used by both the Renderer
+           and the SH to make the conversion from device to topology";
       }
       uses org-openroadm-common-service-types:service-port;
       //     uses service-lgx;
@@ -229,7 +229,7 @@ module transportpce-common-service-path-types {
     }
   }
 
-    grouping service-handler-header {
+  grouping service-handler-header {
     container service-handler-header {
       leaf request-id {
         type string;
@@ -241,12 +241,11 @@ module transportpce-common-service-path-types {
   grouping service-path {
     leaf service-path-name {
       type string;
+      mandatory true;
       description
         "Identifier for the service-path to be calculated by the PCE";
-      mandatory true;
     }
     uses service-handler-header;
-
     container service-a-end {
       uses service-endpoint-sp;
     }
@@ -254,7 +253,6 @@ module transportpce-common-service-path-types {
       uses service-endpoint-sp;
     }
     uses transportpce-routing-constraints:routing-constraints-sp;
-
     leaf latency {
       type uint32;
       description
@@ -270,14 +268,13 @@ module transportpce-common-service-path-types {
       uses org-openroadm-resource-types:srg-number;
     }
     leaf-list supporting-service-name {
+      type string;
       description
         "The service name that this runs over top. If connection-type is service, then this is the related
          connection-type = infrastructure service, for example.";
-      type string;
     }
     container path-description {
       uses transportpce-pathDescription:path-description;
     }
   }
-
 }
index c8879914361758ed0609b6815f72843f708c3ce5..cbc719e20bcb24f34f7874e10aa5a0350101a3ad 100644 (file)
 module transportpce-common-types {
-    namespace "http://org/transportpce/common-types";
-    prefix org-transportpce-common-types;
+  namespace "http://org/transportpce/common-types";
+  prefix org-transportpce-common-types;
 
-    import org-openroadm-resource-types {
-        prefix org-openroadm-resource-types;
-        revision-date 2016-10-14;
-    }
-    import org-openroadm-pm-types {
-        prefix org-openroadm-pm-types;
-        revision-date 2016-10-14;
-    }
-    import org-openroadm-otn-common-types {
-        prefix org-openroadm-otn-common-types;
-        revision-date 2018-11-30;
-    }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2016-10-14;
+  }
+  import org-openroadm-pm-types {
+    prefix org-openroadm-pm-types;
+    revision-date 2016-10-14;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2018-11-30;
+  }
 
-    revision "2020-01-28" {
-        description "Add necessary parameters to consolidate OTN and address ONAP
-            MDONS use case, including grouping otn-renderer-input";
-    }
-    revision "2019-12-12" {
-        description "Add grouping otn-renderer-input";
-    }
+  revision 2020-01-28 {
+    description
+      "Add necessary parameters to consolidate OTN and address ONAP
+       MDONS use case, including grouping otn-renderer-input";
+  }
+  revision 2019-12-12 {
+    description
+      "Add grouping otn-renderer-input";
+  }
+  revision 2017-09-07 {
+    description
+      "Initial revision of TransportPCE common-types";
+  }
 
-    revision "2017-09-07" {
-        description "Initial revision of TransportPCE common-types";
+  typedef pm-names-enum {
+    type enumeration {
+      enum vendorExtension {
+        value 1;
+        description
+          "vendor extension";
+      }
+      enum bitErrorRate {
+        value 2;
+        description
+          "Bit error rate (BER)";
+      }
+      enum opticalPowerOutput {
+        value 3;
+        description
+          "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalReturnLoss {
+        value 4;
+        description
+          "Optical Return Loss (ORL-OTS) - at MW port(s) B";
+      }
+      enum opticalPowerInput {
+        value 5;
+        description
+          "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power";
+      }
+      enum codeViolations {
+        value 8;
+        description
+          "Code Violations (CV)";
+      }
+      enum erroredSeconds {
+        value 9;
+        description
+          "Errored Seconds (ES)";
+      }
+      enum severelyErroredSeconds {
+        value 10;
+        description
+          "Severely Errored Seconds (SES)";
+      }
+      enum unavailableSeconds {
+        value 11;
+        description
+          "Unavailable Seconds (UAS)";
+      }
+      enum inFrames {
+        value 12;
+        description
+          "In frames (INFRAMES-E)";
+      }
+      enum inFramesErrored {
+        value 13;
+        description
+          "In frames errored (INFRAMESERR-E)";
+      }
+      enum outFrames {
+        value 14;
+        description
+          "Out frames (OUTFRAMES-E)";
+      }
+      enum erroredSecondsEthernet {
+        value 15;
+        description
+          "Errored Seconds Ethernet (ES-E)";
+      }
+      enum severelyErroredSecondsEthernet {
+        value 16;
+        description
+          "Severly Errored Seconds, Ethernet (SES-E)";
+      }
+      enum unavailableSecondsEthernet {
+        value 17;
+        description
+          "Unavailable Seconds, Ethernet (UAS-E)";
+      }
+      enum erroredBlockCount {
+        value 18;
+        description
+          "Errored block count";
+      }
+      enum delay {
+        value 19;
+        description
+          "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
+      }
+      enum defectSeconds {
+        value 20;
+        description
+          "Defect Seconds (DS)";
+      }
+      enum backwardIncomingAlignmentError {
+        value 21;
+        description
+          "Backward Incoming Alignment Error (BIAE)";
+      }
+      enum incomingAlignmentError {
+        value 22;
+        description
+          "Incoming Alignment Error (IAE)";
+      }
+      enum opticalPowerOutputMin {
+        value 23;
+        description
+          "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerOutputMax {
+        value 24;
+        description
+          "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerOutputAvg {
+        value 25;
+        description
+          "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerInputMin {
+        value 26;
+        description
+          "Minimum Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerInputMax {
+        value 27;
+        description
+          "Maximum Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerInputAvg {
+        value 28;
+        description
+          "Average Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerOutputOSC {
+        value 29;
+        description
+          "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCMin {
+        value 30;
+        description
+          "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCMax {
+        value 31;
+        description
+          "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCAvg {
+        value 32;
+        description
+          "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerInputOSC {
+        value 33;
+        description
+          "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCMin {
+        value 34;
+        description
+          "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCMax {
+        value 35;
+        description
+          "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCAvg {
+        value 36;
+        description
+          "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum preFECCorrectedErrors {
+        value 37;
+        description
+          "pFEC corrected Errors";
+      }
+      enum totalOpticalPowerInput {
+        value 38;
+        description
+          "Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputMin {
+        value 39;
+        description
+          "Minumun Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputMax {
+        value 40;
+        description
+          "Maximum Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputAvg {
+        value 41;
+        description
+          "Average Total Optical Power Input.";
+      }
+      enum FECCorrectableBlocks {
+        value 42;
+        description
+          "FEC Correctable Blocks.";
+      }
+      enum FECUncorrectableBlocks {
+        value 43;
+        description
+          "FEC Uncorrectable Blocks.";
+      }
+      enum BIPErrorCounter {
+        value 56;
+        description
+          "BIP Error Counter";
+      }
+      enum protectionSwitchingCount {
+        value 57;
+        description
+          "Protection Switching Count (PSC)";
+      }
+      enum protectionSwitchingDuration {
+        value 58;
+        description
+          "Protection Switching Duration in seconds (PSD)";
+      }
+      enum erroredBlockCountTCM1-up {
+        value 59;
+        description
+          "errored Blocks Count on TCM1 up direction.";
+      }
+      enum erroredBlockCountTCM2-up {
+        value 60;
+        description
+          "errored Blocks Count on TCM2 up direction.";
+      }
+      enum erroredBlockCountTCM3-up {
+        value 61;
+        description
+          "errored Blocks Count on TCM3 up direction.";
+      }
+      enum erroredBlockCountTCM4-up {
+        value 62;
+        description
+          "errored Blocks Count on TCM4 up direction.";
+      }
+      enum erroredBlockCountTCM5-up {
+        value 63;
+        description
+          "errored Blocks Count on TCM5 up direction.";
+      }
+      enum erroredBlockCountTCM6-up {
+        value 64;
+        description
+          "errored Blocks Count on TCM6 up direction.";
+      }
+      enum delayTCM1-up {
+        value 65;
+        description
+          "Delay on TCM1 up direction.";
+      }
+      enum delayTCM2-up {
+        value 66;
+        description
+          "Delay on TCM2 up direction.";
+      }
+      enum delayTCM3-up {
+        value 67;
+        description
+          "Delay on TCM3 up direction.";
+      }
+      enum delayTCM4-up {
+        value 68;
+        description
+          "Delay on TCM4 up direction.";
+      }
+      enum delayTCM5-up {
+        value 69;
+        description
+          "Delay on TCM5 up direction.";
+      }
+      enum delayTCM6-up {
+        value 70;
+        description
+          "Delay on TCM6 up direction.";
+      }
+      enum erroredBlockCountTCM1-down {
+        value 71;
+        description
+          "errored Blocks Count on TCM1 down direction.";
+      }
+      enum erroredBlockCountTCM2-down {
+        value 72;
+        description
+          "errored Blocks Count on TCM2 down direction.";
+      }
+      enum erroredBlockCountTCM3-down {
+        value 73;
+        description
+          "errored Blocks Count on TCM3 down direction.";
+      }
+      enum erroredBlockCountTCM4-down {
+        value 74;
+        description
+          "errored Blocks Count on TCM4 down direction.";
+      }
+      enum erroredBlockCountTCM5-down {
+        value 75;
+        description
+          "errored Blocks Count on TCM5 down direction.";
+      }
+      enum erroredBlockCountTCM6-down {
+        value 76;
+        description
+          "errored Blocks Count on TCM6 down direction.";
+      }
+      enum delayTCM1-down {
+        value 77;
+        description
+          "Delay on TCM1 down direction.";
+      }
+      enum delayTCM2-down {
+        value 78;
+        description
+          "Delay on TCM2 down direction.";
+      }
+      enum delayTCM3-down {
+        value 79;
+        description
+          "Delay on TCM3 down direction.";
+      }
+      enum delayTCM4-down {
+        value 80;
+        description
+          "Delay on TCM4 down direction.";
+      }
+      enum delayTCM5-down {
+        value 81;
+        description
+          "Delay on TCM5 down direction.";
+      }
+      enum delayTCM6-down {
+        value 82;
+        description
+          "Delay on TCM6 down direction.";
+      }
     }
+  }
 
-    grouping olm-renderer-input {
-      leaf service-name {
-          type string;
-      }
-      leaf wave-number {
-          type uint32;
-      }
-      list nodes {
-          ordered-by user;
-          key "node-id";
-          leaf node-id {
-              type string;
-              description "Gloabally unique identifier for the node";
-          }
-          leaf src-tp {
-              type string;
-              description "Source termination point ";
-              mandatory true;
-          }
-          leaf dest-tp {
-              type string;
-              description "Destination termination point ";
-              mandatory true;
-          }
+  typedef location {
+    type enumeration {
+      enum notApplicable {
+        value 1;
       }
-      description
-          "Type to be used by OLM and Renderer RPCs";
-      list node-interface {
-        key node-id;
-        leaf node-id {
-          type string;
-        }
-        leaf-list och-interface-id {
-          type string;
-        }
-        leaf-list otu-interface-id {
-          type string;
-        }
-        leaf-list odu-interface-id {
-          type string;
-        }
-        leaf-list eth-interface-id {
-          type string;
-        }
-        leaf-list connection-id {
-          type string;
-        }
+      enum nearEnd {
+        value 2;
+      }
+      enum farEnd {
+        value 3;
       }
-
     }
+  }
 
-    grouping otn-renderer-input {
-      leaf service-name {
-          type string;
-      }
-      list nodes {
-        ordered-by user;
-        key "node-id";
-        leaf node-id {
-            type string;
-            description "Globally unique identifier for the node";
-        }
-        leaf network-tp {
-            type string;
-            description "Source termination point ";
-        }
-        leaf client-tp {
-          type string;
-          description "Destination termination point for end nodes";
-          //mandatory true;
-        }
-        leaf network2-tp {
-          type string;
-          description "Destination termination point for intermediate switch";
-        }
-      }
-      description "Type to be used by OLM and Renderer RPCs for OTN";
-     }
+  typedef direction {
+    type enumeration {
+      enum tx {
+        value 1;
+      }
+      enum rx {
+        value 2;
+      }
+      enum bidirectional {
+        value 3;
+      }
+      enum notApplicable {
+        value 4;
+      }
+    }
+  }
 
-    grouping olm-get-pm-input {
+  grouping olm-renderer-input {
+    description
+      "Type to be used by OLM and Renderer RPCs";
+    leaf service-name {
+      type string;
+    }
+    leaf wave-number {
+      type uint32;
+    }
+    list nodes {
+      key "node-id";
+      ordered-by user;
       leaf node-id {
-          type string;
-          description "Gloabally unique identifier
-              for the node";
-          mandatory true;
-      }
-      leaf resource-type {
-          type org-openroadm-resource-types:resource-type-enum;
-          description "Type of the PM resource";
-          mandatory true;
-      }
-      container resource-identifier {
-          leaf resource-name {
-              type string;
-              description "Identifier of particular resource of given type";
-              mandatory true;
-          }
-          leaf circuit-pack-name {
-              when "../../resource-type = 'port'";
-              type string;
-              description "In case resource type is port, then particular resource is identified by port-name
-                  (resource-name) and circuit-pack-name (this leaf).";
-              mandatory true;
-
-          }
+        type string;
+        description
+          "Gloabally unique identifier for the node";
       }
-      leaf granularity {
-          type org-openroadm-pm-types:pm-granularity;
-          description "Granularity of PM bin can be
-              notApplicable,15min,24Hour";
-          mandatory true;
+      leaf src-tp {
+        type string;
+        mandatory true;
+        description
+          "Source termination point ";
       }
-      leaf pm-name-type {
-          type pm-names-enum;
+      leaf dest-tp {
+        type string;
+        mandatory true;
+        description
+          "Destination termination point ";
       }
-      leaf pm-extension {
-          type string;
+    }
+    list node-interface {
+      key "node-id";
+      leaf node-id {
+        type string;
       }
-      leaf location {
-          type location;
+      leaf-list och-interface-id {
+        type string;
       }
-      leaf direction {
-          type direction;
+      leaf-list otu-interface-id {
+        type string;
       }
-    }
-
-    grouping node-interfaces {
-      list node-interface {
-        key node-id;
-        leaf node-id {
-            type string;
-        }
-        leaf-list och-interface-id {
-            type string;
-        }
-        leaf-list otu-interface-id {
-            type string;
-        }
-        leaf-list odu-interface-id {
-            type string;
-        }
-        leaf-list eth-interface-id {
-            type string;
-        }
-        leaf-list connection-id {
-          type string;
-        }
+      leaf-list odu-interface-id {
+        type string;
       }
-    }
-
-    grouping otn-constraint {
-      container otn-constraints {
-        leaf trib-port-number {
-          type uint16;
-          description
-                  "defines a trib-port that must be used at A or Z end";
-        }
-        leaf-list opu-trib-slots {
-          type uint16;
-          description
-                  "defines a list of trib-slots that must be used at A or Z end";
-        }
-        leaf-list opucn-trib-slots {
-          type string;
-          description
-                  "defines a list of opucn-trib-slots that must be used at A or
-                  Z end";
-        }
-        container imposed-api {
-          description "defines constraints on access point identifier to be used by
-                  local device when one end point of the path (service) is located
-                  in a remote domain not handled by the controller. These parameters
-                  are passed to the local controller (transportpce) for interoperability
-                  purposes.
-                  SAPI : The source api (local domain) to be used by A
-                  or Z end as expected by remote controller.
-                  DAPI: defines the destination api (remote domain) to be used by A
-                  or Z end as exposed in the remote domain. Used when the end of the path
-                  is in an external domain, handled by a remote controller.
-                  EXPECTED-SAPI : The api of the remote end of the path (in an external
-                  domain) as expected to be received by A or Z end.
-                  EXPECTED-DAPI : defines the destination api to be used by remote end
-                  as exposed in the local domain. Used when the end of the path is in an
-                  external domain, handled by a remote controller";
-          uses api-info;
-        }
+      leaf-list eth-interface-id {
+        type string;
+      }
+      leaf-list connection-id {
+        type string;
       }
     }
+  }
 
-    grouping api-info {
-      leaf sapi {
+  grouping otn-renderer-input {
+    description
+      "Type to be used by OLM and Renderer RPCs for OTN";
+    leaf service-name {
+      type string;
+    }
+    list nodes {
+      key "node-id";
+      ordered-by user;
+      leaf node-id {
         type string;
         description
-          "The source api used by the node";
+          "Globally unique identifier for the node";
       }
-      leaf dapi {
+      leaf network-tp {
         type string;
         description
-          "the destination api of the other end of the path";
+          "Source termination point ";
       }
-      leaf expected-sapi {
+      leaf client-tp {
         type string;
         description
-              "The api of the remote end of the path as expected to be received
-              by the node";
+          "Destination termination point for end nodes";
+        //mandatory true;
       }
-      leaf expected-dapi {
+      leaf network2-tp {
         type string;
         description
-              "api of the node itself, supposed to be used by remote end as
-              the destination";
+          "Destination termination point for intermediate switch";
       }
     }
+  }
 
-       typedef pm-names-enum {
-           type enumeration {
-             enum "vendorExtension" {
-               value 1;
-               description
-                 "vendor extension";
-             }
-             enum "bitErrorRate" {
-               value 2;
-               description
-                 "Bit error rate (BER)";
-             }
-             enum "opticalPowerOutput" {
-               value 3;
-               description
-                 "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
-             }
-             enum "opticalReturnLoss" {
-               value 4;
-               description
-                 "Optical Return Loss (ORL-OTS) - at MW port(s) B";
-             }
-             enum "opticalPowerInput" {
-               value 5;
-               description
-                 "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power";
-             }
-             enum "codeViolations" {
-               value 8;
-               description
-                 "Code Violations (CV)";
-             }
-             enum "erroredSeconds" {
-               value 9;
-               description
-                 "Errored Seconds (ES)";
-             }
-             enum "severelyErroredSeconds" {
-               value 10;
-               description
-                 "Severely Errored Seconds (SES)";
-             }
-             enum "unavailableSeconds" {
-               value 11;
-               description
-                 "Unavailable Seconds (UAS)";
-             }
-             enum "inFrames" {
-               value 12;
-               description
-                 "In frames (INFRAMES-E)";
-             }
-             enum "inFramesErrored" {
-               value 13;
-               description
-                 "In frames errored (INFRAMESERR-E)";
-             }
-             enum "outFrames" {
-               value 14;
-               description
-                 "Out frames (OUTFRAMES-E)";
-             }
-             enum "erroredSecondsEthernet" {
-               value 15;
-               description
-                 "Errored Seconds Ethernet (ES-E)";
-             }
-             enum "severelyErroredSecondsEthernet" {
-               value 16;
-               description
-                 "Severly Errored Seconds, Ethernet (SES-E)";
-             }
-             enum "unavailableSecondsEthernet" {
-               value 17;
-               description
-                 "Unavailable Seconds, Ethernet (UAS-E)";
-             }
-             enum "erroredBlockCount" {
-               value 18;
-               description
-                 "Errored block count";
-             }
-             enum "delay" {
-               value 19;
-               description
-                 "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
-             }
-             enum "defectSeconds" {
-               value 20;
-               description
-                 "Defect Seconds (DS)";
-             }
-             enum "backwardIncomingAlignmentError" {
-               value 21;
-               description
-                 "Backward Incoming Alignment Error (BIAE)";
-             }
-             enum "incomingAlignmentError" {
-               value 22;
-               description
-                 "Incoming Alignment Error (IAE)";
-             }
-             enum "opticalPowerOutputMin" {
-               value 23;
-               description
-                 "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
-             }
-             enum "opticalPowerOutputMax" {
-               value 24;
-               description
-                 "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
-             }
-             enum "opticalPowerOutputAvg" {
-               value 25;
-               description
-                 "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
-             }
-             enum "opticalPowerInputMin" {
-               value 26;
-               description
-                 "Minimum Optical Power Input (OPIN-OTS). Total optical power";
-             }
-             enum "opticalPowerInputMax" {
-               value 27;
-               description
-                 "Maximum Optical Power Input (OPIN-OTS). Total optical power";
-             }
-             enum "opticalPowerInputAvg" {
-               value 28;
-               description
-                 "Average Optical Power Input (OPIN-OTS). Total optical power";
-             }
-             enum "opticalPowerOutputOSC" {
-               value 29;
-               description
-                 "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
-             }
-             enum "opticalPowerOutputOSCMin" {
-               value 30;
-               description
-                 "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
-             }
-             enum "opticalPowerOutputOSCMax" {
-               value 31;
-               description
-                 "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
-             }
-             enum "opticalPowerOutputOSCAvg" {
-               value 32;
-               description
-                 "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
-             }
-             enum "opticalPowerInputOSC" {
-               value 33;
-               description
-                 "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
-             }
-             enum "opticalPowerInputOSCMin" {
-               value 34;
-               description
-                 "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
-             }
-             enum "opticalPowerInputOSCMax" {
-               value 35;
-               description
-                 "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
-             }
-             enum "opticalPowerInputOSCAvg" {
-               value 36;
-               description
-                 "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
-             }
-             enum "preFECCorrectedErrors" {
-               value 37;
-               description
-                 "pFEC corrected Errors";
-             }
-             enum "totalOpticalPowerInput" {
-               value 38;
-               description
-                 "Total Optical Power Input.";
-             }
-             enum "totalOpticalPowerInputMin" {
-               value 39;
-               description
-                 "Minumun Total Optical Power Input.";
-             }
-             enum "totalOpticalPowerInputMax" {
-               value 40;
-               description
-                 "Maximum Total Optical Power Input.";
-             }
-             enum "totalOpticalPowerInputAvg" {
-               value 41;
-               description
-                 "Average Total Optical Power Input.";
-             }
-             enum "FECCorrectableBlocks" {
-               value 42;
-               description
-                 "FEC Correctable Blocks.";
-             }
-             enum "FECUncorrectableBlocks" {
-               value 43;
-               description
-                 "FEC Uncorrectable Blocks.";
-             }
-             enum "BIPErrorCounter" {
-               value 56;
-               description
-                 "BIP Error Counter";
-             }
-             enum "protectionSwitchingCount" {
-               value 57;
-               description
-                 "Protection Switching Count (PSC)";
-             }
-             enum "protectionSwitchingDuration" {
-               value 58;
-               description
-                 "Protection Switching Duration in seconds (PSD)";
-             }
-             enum "erroredBlockCountTCM1-up" {
-               value 59;
-               description
-                 "errored Blocks Count on TCM1 up direction.";
-             }
-             enum "erroredBlockCountTCM2-up" {
-               value 60;
-               description
-                 "errored Blocks Count on TCM2 up direction.";
-             }
-             enum "erroredBlockCountTCM3-up" {
-               value 61;
-               description
-                 "errored Blocks Count on TCM3 up direction.";
-             }
-             enum "erroredBlockCountTCM4-up" {
-               value 62;
-               description
-                 "errored Blocks Count on TCM4 up direction.";
-             }
-             enum "erroredBlockCountTCM5-up" {
-               value 63;
-               description
-                 "errored Blocks Count on TCM5 up direction.";
-             }
-             enum "erroredBlockCountTCM6-up" {
-               value 64;
-               description
-                 "errored Blocks Count on TCM6 up direction.";
-             }
-             enum "delayTCM1-up" {
-               value 65;
-               description
-                 "Delay on TCM1 up direction.";
-             }
-             enum "delayTCM2-up" {
-               value 66;
-               description
-                 "Delay on TCM2 up direction.";
-             }
-             enum "delayTCM3-up" {
-               value 67;
-               description
-                 "Delay on TCM3 up direction.";
-             }
-             enum "delayTCM4-up" {
-               value 68;
-               description
-                 "Delay on TCM4 up direction.";
-             }
-             enum "delayTCM5-up" {
-               value 69;
-               description
-                 "Delay on TCM5 up direction.";
-             }
-             enum "delayTCM6-up" {
-               value 70;
-               description
-                 "Delay on TCM6 up direction.";
-             }
-             enum "erroredBlockCountTCM1-down" {
-               value 71;
-               description
-                 "errored Blocks Count on TCM1 down direction.";
-             }
-             enum "erroredBlockCountTCM2-down" {
-               value 72;
-               description
-                 "errored Blocks Count on TCM2 down direction.";
-             }
-             enum "erroredBlockCountTCM3-down" {
-               value 73;
-               description
-                 "errored Blocks Count on TCM3 down direction.";
-             }
-             enum "erroredBlockCountTCM4-down" {
-               value 74;
-               description
-                 "errored Blocks Count on TCM4 down direction.";
-             }
-             enum "erroredBlockCountTCM5-down" {
-               value 75;
-               description
-                 "errored Blocks Count on TCM5 down direction.";
-             }
-             enum "erroredBlockCountTCM6-down" {
-               value 76;
-               description
-                 "errored Blocks Count on TCM6 down direction.";
-             }
-             enum "delayTCM1-down" {
-               value 77;
-               description
-                 "Delay on TCM1 down direction.";
-             }
-             enum "delayTCM2-down" {
-               value 78;
-               description
-                 "Delay on TCM2 down direction.";
-             }
-             enum "delayTCM3-down" {
-               value 79;
-               description
-                 "Delay on TCM3 down direction.";
-             }
-             enum "delayTCM4-down" {
-               value 80;
-               description
-                 "Delay on TCM4 down direction.";
-             }
-             enum "delayTCM5-down" {
-               value 81;
-               description
-                 "Delay on TCM5 down direction.";
-             }
-             enum "delayTCM6-down" {
-               value 82;
-               description
-                 "Delay on TCM6 down direction.";
-             }
-           }
-         }
+  grouping olm-get-pm-input {
+    leaf node-id {
+      type string;
+      mandatory true;
+      description
+        "Gloabally unique identifier
+         for the node";
+    }
+    leaf resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      mandatory true;
+      description
+        "Type of the PM resource";
+    }
+    container resource-identifier {
+      leaf resource-name {
+        type string;
+        mandatory true;
+        description
+          "Identifier of particular resource of given type";
+      }
+      leaf circuit-pack-name {
+        when "../../resource-type = 'port'";
+        type string;
+        mandatory true;
+        description
+          "In case resource type is port, then particular resource is identified by port-name
+           (resource-name) and circuit-pack-name (this leaf).";
+      }
+    }
+    leaf granularity {
+      type org-openroadm-pm-types:pm-granularity;
+      mandatory true;
+      description
+        "Granularity of PM bin can be
+         notApplicable,15min,24Hour";
+    }
+    leaf pm-name-type {
+      type pm-names-enum;
+    }
+    leaf pm-extension {
+      type string;
+    }
+    leaf location {
+      type location;
+    }
+    leaf direction {
+      type direction;
+    }
+  }
 
-      typedef location {
-        type enumeration {
-          enum "notApplicable" {
-            value 1;
-          }
-          enum "nearEnd" {
-            value 2;
-          }
-          enum "farEnd" {
-            value 3;
-          }
-        }
-      }
-      typedef direction {
-        type enumeration {
-          enum "tx" {
-            value 1;
-          }
-          enum "rx" {
-            value 2;
-          }
-          enum "bidirectional" {
-            value 3;
-          }
-          enum "notApplicable" {
-            value 4;
-          }
-        }
+  grouping node-interfaces {
+    list node-interface {
+      key "node-id";
+      leaf node-id {
+        type string;
       }
+      leaf-list och-interface-id {
+        type string;
+      }
+      leaf-list otu-interface-id {
+        type string;
+      }
+      leaf-list odu-interface-id {
+        type string;
+      }
+      leaf-list eth-interface-id {
+        type string;
+      }
+      leaf-list connection-id {
+        type string;
+      }
+    }
+  }
 
+  grouping otn-constraint {
+    container otn-constraints {
+      leaf trib-port-number {
+        type uint16;
+        description
+          "defines a trib-port that must be used at A or Z end";
+      }
+      leaf-list opu-trib-slots {
+        type uint16;
+        description
+          "defines a list of trib-slots that must be used at A or Z end";
+      }
+      leaf-list opucn-trib-slots {
+        type string;
+        description
+          "defines a list of opucn-trib-slots that must be used at A or
+           Z end";
+      }
+      container imposed-api {
+        description
+          "defines constraints on access point identifier to be used by
+           local device when one end point of the path (service) is located
+           in a remote domain not handled by the controller. These parameters
+           are passed to the local controller (transportpce) for interoperability
+           purposes.
+           SAPI : The source api (local domain) to be used by A
+           or Z end as expected by remote controller.
+           DAPI: defines the destination api (remote domain) to be used by A
+           or Z end as exposed in the remote domain. Used when the end of the path
+           is in an external domain, handled by a remote controller.
+           EXPECTED-SAPI : The api of the remote end of the path (in an external
+           domain) as expected to be received by A or Z end.
+           EXPECTED-DAPI : defines the destination api to be used by remote end
+           as exposed in the local domain. Used when the end of the path is in an
+           external domain, handled by a remote controller";
+        uses api-info;
+      }
+    }
+  }
+
+  grouping api-info {
+    leaf sapi {
+      type string;
+      description
+        "The source api used by the node";
+    }
+    leaf dapi {
+      type string;
+      description
+        "the destination api of the other end of the path";
+    }
+    leaf expected-sapi {
+      type string;
+      description
+        "The api of the remote end of the path as expected to be received
+         by the node";
+    }
+    leaf expected-dapi {
+      type string;
+      description
+        "api of the node itself, supposed to be used by remote end as
+         the destination";
+    }
+  }
 }
index f265b4db8e27462aeb11d6cd1da0af658c37bc3d..b41482e7295b7c69109cedd50397e93350818317 100644 (file)
@@ -42,15 +42,15 @@ module transportpce-pathDescription {
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-04-26 {
-      description
-        "Version 1.5";
+    description
+      "Version 1.5";
   }
-
   revision 2017-10-17 {
     description
       "Version 1.6";
   }
- grouping PCE-resource {
+
+  grouping PCE-resource {
     description
       "This resource identifier is intended to provide a generic identifer
        for any resource that can be used without specific knowledge of
@@ -59,29 +59,30 @@ module transportpce-pathDescription {
       choice resource {
         case termination-point {
           leaf tp-id {
-               type string; //to be clarified with topology model
+            type string;
+            //to be clarified with topology model
           }
           leaf tp-node-id {
-               type string; //to be clarified with topology model
+            type string;
+            //to be clarified with topology model
           }
         }
-
         case link {
           leaf link-id {
-               type string; //to be clarified with topology model
+            type string;
+            //to be clarified with topology model
           }
         }
-
         case node {
           leaf node-id {
-               type string; // to be clarified with topology model
+            type string;
+            // to be clarified with topology model
           }
         }
       }
     }
   }
 
-
   grouping path-description {
     description
       "Topology reports the individual hops along the service in the A to Z direction and Z to A directions.  This includes both ports internal to a device and those
@@ -90,52 +91,52 @@ module transportpce-pathDescription {
        a.\tOn ingress to a node/card, physical then logical
        b.\tOn egress to a node/card, logical then physical";
     container aToZ-direction {
-         leaf aToZ-wavelength-number {
-              type uint32;
-              mandatory true;
-         }
-         leaf rate {
-              type uint32;
-              mandatory true;
-         }
-         leaf modulation-format {
-              type string; // enum ?
-         }
-         list aToZ {
-           key "id";
-           leaf id {
-             description
-               "Unique identifier for this topology component within this service";
-             type string;
-           }
-           uses hop;
-         }
+      leaf aToZ-wavelength-number {
+        type uint32;
+        mandatory true;
+      }
+      leaf rate {
+        type uint32;
+        mandatory true;
+      }
+      leaf modulation-format {
+        type string;
+        // enum ?
+      }
+      list aToZ {
+        key "id";
+        leaf id {
+          type string;
+          description
+            "Unique identifier for this topology component within this service";
+        }
+        uses hop;
+      }
     }
-
     container zToA-direction {
-         leaf zToA-wavelength-number {
-              type uint32;
-              mandatory true;
-         }
-         leaf rate {
-              type uint32;
-              mandatory true;
-         }
-         leaf modulation-format {
-              type string; // enum ?
-         }
-         list zToA {
-           key "id";
-           leaf id {
-             description
-               "Unigue identifier for this topology component within this service";
-             type string;
-           }
-           uses hop;
-         }
-       }
+      leaf zToA-wavelength-number {
+        type uint32;
+        mandatory true;
+      }
+      leaf rate {
+        type uint32;
+        mandatory true;
+      }
+      leaf modulation-format {
+        type string;
+        // enum ?
+      }
+      list zToA {
+        key "id";
+        leaf id {
+          type string;
+          description
+            "Unigue identifier for this topology component within this service";
+        }
+        uses hop;
+      }
     }
-
+  }
 
   grouping hop {
     uses PCE-resource;
index 579c665e4ff71cd12c201c7fa88a35c5b051b5f8..0d40d33675a5f463993842e26a67494f26d2c6b2 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-pce {
-    namespace "http://org/opendaylight/transportpce/pce";
-    prefix "org-opendaylight-transportpce-pce";
+  namespace "http://org/opendaylight/transportpce/pce";
+  prefix org-opendaylight-transportpce-pce;
 
   import ietf-yang-types {
     prefix yang;
@@ -18,7 +18,7 @@ module transportpce-pce {
     prefix transportpce-pathDescription;
   }
   import gnpy-path-computation-simplified {
-    prefix "gnpypc";
+    prefix gnpypc;
   }
 
   organization
@@ -60,38 +60,103 @@ module transportpce-pce {
     description
       "Version 1.7";
   }
-
   revision 2019-06-24 {
     description
       "Version 1.6.1";
   }
-
   revision 2017-10-17 {
     description
       "Version 1.6";
   }
-
   revision 2017-04-26 {
     description
       "Version 1.5";
   }
 
+  grouping stubpce-path-description {
+    leaf path-name {
+      type string;
+      mandatory true;
+      description
+        "Identifier for the pathDescription to be created in the ROADM
+         network, e.g., CLFI, CLCI, etc.";
+    }
+    uses transportpce-pathDescription:path-description;
+  }
+
+  grouping gnpy {
+    list gnpy-response {
+      key "path-dir";
+      config false;
+      description
+        "GNPy response";
+      leaf path-dir {
+        type string;
+        description
+          "A-to-Z or Z-to-A";
+      }
+      leaf feasibility {
+        type boolean;
+        description
+          "true : feasible path / False : non-feasible.";
+      }
+      choice response-type {
+        config false;
+        description
+          "response-type";
+        case no-path-case {
+          uses gnpypc:no-path-info;
+        }
+        case path-case {
+          description
+            "Path computation service.";
+          uses path-performance;
+        }
+      }
+    }
+  }
+
+  grouping path-performance {
+    description
+      "TE generic path properties grouping";
+    container path-properties {
+      config false;
+      description
+        "The TE path properties";
+      list path-metric {
+        key "metric-type";
+        description
+          "TE path metric type";
+        leaf metric-type {
+          type identityref {
+            base gnpypc:path-metric-type;
+          }
+        }
+        leaf accumulative-value {
+          type decimal64 {
+            fraction-digits 2;
+          }
+        }
+      }
+    }
+  }
+
   rpc path-computation-request {
     input {
       leaf service-name {
         type string;
+        mandatory true;
         description
           "Identifier for the service to be created in the ROADM network,
            e.g., CLFI, CLCI, etc. This is reported against the service, but
            may not get reflected in the service in the network.";
-        mandatory true;
       }
       leaf resource-reserve {
         type boolean;
-        description
-                "indicates if resources (from local PCE topology) must be reserved
-                until further notice (cancel-resource-reserve or topology update)";
         mandatory true;
+        description
+          "indicates if resources (from local PCE topology) must be reserved
+           until further notice (cancel-resource-reserve or topology update)";
       }
       uses transportpce-common-service-path-types:service-handler-header;
       container service-a-end {
@@ -125,7 +190,7 @@ module transportpce-pce {
 
   notification service-path-rpc-result {
     description
-        "This Notification indicates result of  service RPC";
+      "This Notification indicates result of  service RPC";
     leaf notification-type {
       type transportpce-common-service-path-types:service-path-notification-types;
     }
@@ -137,74 +202,13 @@ module transportpce-pce {
     uses org-openroadm-common-service-types:routing-metric;
   }
 
-  grouping stubpce-path-description {
-    leaf path-name {
-      type string;
-      description
-            "Identifier for the pathDescription to be created in the ROADM
-            network, e.g., CLFI, CLCI, etc.";
-      mandatory true;
-    }
-    uses transportpce-pathDescription:path-description;
-  }
-
   container path-description-list {
     description
-        "List of pathDescription. Can only be created, deleted, modified,
-        etc. using special RPCs.";
+      "List of pathDescription. Can only be created, deleted, modified,
+       etc. using special RPCs.";
     list pathDescriptions {
       key "path-name";
       uses stubpce-path-description;
     }
   }
-
-  grouping gnpy {
-    list gnpy-response {
-      key path-dir;
-      config false;
-      description "GNPy response";
-      leaf path-dir {
-        type string;
-        description "A-to-Z or Z-to-A";
-      }
-      leaf feasibility {
-        type boolean;
-        description
-                "true : feasible path / False : non-feasible.";
-      }
-      choice response-type {
-        config false;
-        description "response-type";
-        case no-path-case {
-          uses gnpypc:no-path-info;
-        }
-        case path-case {
-          uses path-performance;
-          description "Path computation service.";
-        }
-      }
-    }
-  }
-
-  grouping path-performance {
-    description "TE generic path properties grouping";
-    container path-properties {
-      config false;
-      description "The TE path properties";
-      list path-metric {
-        key metric-type;
-        description "TE path metric type";
-        leaf metric-type {
-          type identityref {
-            base gnpypc:path-metric-type;
-          }
-        }
-        leaf accumulative-value {
-          type decimal64 {
-            fraction-digits 2;
-          }
-        }
-      }
-    }
-  }
 }
index 69b48101b84a058645efbc9bfede382603b96960..410077e52b667b8dbac582320e5f7b4e71ba2c21 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-device-renderer {
   namespace "http://org/opendaylight/transportpce/renderer/device";
-  prefix "org-opendaylight-transportpce-renderer-device";
+  prefix org-opendaylight-transportpce-renderer-device;
 
   import transportpce-common-types {
     prefix org-transportpce-common-types;
@@ -12,25 +12,26 @@ module transportpce-device-renderer {
   }
 
   organization
-       "transportPCE";
+    "transportPCE";
   contact
-       "transportPCE committers - ODL";
+    "transportPCE committers - ODL";
   description
-       "YANG definitions of RPCs supported by renderer.
-        Copyright (c) 2017 AT&T and others.  All rights reserved.
-        authors: Dhruv Bhardwaj ( db929a@att.com )
-                 Shweta Vachhani ( sv111y@att.com )";
+    "YANG definitions of RPCs supported by renderer.
+     Copyright (c) 2017 AT&T and others.  All rights reserved.
+     authors: Dhruv Bhardwaj ( db929a@att.com )
+              Shweta Vachhani ( sv111y@att.com )";
 
-  revision "2020-01-28" {
-    description "Complement rpc otn-service-path";
+  revision 2020-01-28 {
+    description
+      "Complement rpc otn-service-path";
   }
-
-  revision "2019-12-12" {
-    description "Add rpc otn-service-path";
+  revision 2019-12-12 {
+    description
+      "Add rpc otn-service-path";
   }
-
-  revision "2017-02-28" {
-    description "Initial revision of renderer model version 1.5";
+  revision 2017-02-28 {
+    description
+      "Initial revision of renderer model version 1.5";
   }
 
   rpc service-path {
@@ -40,10 +41,10 @@ module transportpce-device-renderer {
       }
       leaf operation {
         type enumeration {
-          enum "create" {
+          enum create {
             value 1;
           }
-          enum "delete" {
+          enum delete {
             value 2;
           }
         }
@@ -62,63 +63,64 @@ module transportpce-device-renderer {
   }
 
   rpc otn-service-path {
-      input {
-          leaf service-rate {
-              type string;
-          }
-          leaf service-type {
-              type string;
-          }
-          leaf ethernet-encoding {
-              type string;
-          }
-          leaf trib-slot {
-              type int16;
-          }
-          leaf-list complex-trib-slots {
-              type int16;
-                description "Used in case trib-slot allocation policy of an equipment would
-                    not correspond to contiguous trib-slots";
-          }
-          leaf-list opucn-trib-slots {
-              type org-openroadm-otn-common-types:opucn-trib-slot-def;
-          }
-          leaf trib-port-number {
-              type int16;
-          }
-          leaf operation {
-              type enumeration {
-                  enum "create" {
-                      value 1;
-                  }
-                  enum "delete" {
-                      value 2;
-                  }
-             }
-          }
-          container a-end-api-info {
-              leaf node-id {
-                  type string;
-              }
-          uses org-transportpce-common-types:api-info;
-          }
-          container z-end-api-info {
-              leaf node-id {
-                  type string;
-              }
-              uses org-transportpce-common-types:api-info;
-          }
-          uses org-transportpce-common-types:otn-renderer-input;
+    input {
+      leaf service-rate {
+        type string;
+      }
+      leaf service-type {
+        type string;
+      }
+      leaf ethernet-encoding {
+        type string;
       }
-      output {
-          leaf success {
-              type boolean;
+      leaf trib-slot {
+        type int16;
+      }
+      leaf-list complex-trib-slots {
+        type int16;
+        description
+          "Used in case trib-slot allocation policy of an equipment would
+           not correspond to contiguous trib-slots";
+      }
+      leaf-list opucn-trib-slots {
+        type org-openroadm-otn-common-types:opucn-trib-slot-def;
+      }
+      leaf trib-port-number {
+        type int16;
+      }
+      leaf operation {
+        type enumeration {
+          enum create {
+            value 1;
           }
-          leaf result {
-              type string;
+          enum delete {
+            value 2;
           }
-          uses org-transportpce-common-types:node-interfaces;
+        }
+      }
+      container a-end-api-info {
+        leaf node-id {
+          type string;
+        }
+        uses org-transportpce-common-types:api-info;
+      }
+      container z-end-api-info {
+        leaf node-id {
+          type string;
+        }
+        uses org-transportpce-common-types:api-info;
+      }
+      uses org-transportpce-common-types:otn-renderer-input;
+    }
+    output {
+      leaf success {
+        type boolean;
       }
+      leaf result {
+        type string;
+      }
+      uses org-transportpce-common-types:node-interfaces;
+    }
   }
 
   rpc renderer-rollback {
@@ -130,7 +132,7 @@ module transportpce-device-renderer {
         type boolean;
       }
       list failed-to-rollback {
-        key node-id;
+        key "node-id";
         leaf node-id {
           type string;
         }
index 7edef88c7d40daafd9606582dd11953a6fb96213..6a6a31ad8dba32ba71958f550973e05dee4a202a 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-renderer {
-    namespace "http://org/opendaylight/transportpce/renderer";
-    prefix "org-opendaylight-transportpce-renderer";
+  namespace "http://org/opendaylight/transportpce/renderer";
+  prefix org-opendaylight-transportpce-renderer;
 
   import ietf-yang-types {
     prefix yang;
@@ -57,19 +57,19 @@ module transportpce-renderer {
     description
       "Version 1.6";
   }
-
-  revision "2017-02-28" {
-      description "Initial revision of renderer model version 1.5";
+  revision 2017-02-28 {
+    description
+      "Initial revision of renderer model version 1.5";
   }
 
   rpc service-implementation-request {
     input {
       leaf service-name {
         type string;
+        mandatory true;
         description
           "Identifier for the service to be created in
            the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
-        mandatory true;
       }
       uses transportpce-common-service-path-types:service-handler-header;
       container service-a-end {
@@ -83,7 +83,7 @@ module transportpce-renderer {
       }
     }
     output {
-       uses org-openroadm-common-service-types:configuration-response-common;
+      uses org-openroadm-common-service-types:configuration-response-common;
     }
   }
 
@@ -91,19 +91,19 @@ module transportpce-renderer {
     input {
       leaf service-name {
         type string;
+        mandatory true;
         description
           "Identifier for the service to be created in
            the ROADM network, e.g., CLFI, CLCI, etc. This is reported against the service, but may not get reflected in the service in the network.";
-        mandatory true;
       }
       uses transportpce-common-service-path-types:service-handler-header;
     }
     output {
-         uses org-openroadm-common-service-types:configuration-response-common;
+      uses org-openroadm-common-service-types:configuration-response-common;
     }
   }
 
-notification service-rpc-result-sp {
+  notification service-rpc-result-sp {
     description
       "This Notification indicates result of  service RPC and provides the topology";
     leaf notification-type {
index a235bbbdb71e65ac0db6e27df05f3b367e48d8a0..af265c566bc177d5e82cd2965e3ea4d721c17100 100644 (file)
@@ -37,10 +37,9 @@ module transportpce-routing-constraints {
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-04-26 {
-      description
-        "Version 1.5";
+    description
+      "Version 1.5";
   }
-
   revision 2017-10-17 {
     description
       "Version 1.6";
@@ -58,33 +57,33 @@ module transportpce-routing-constraints {
     }
   }
 
-grouping ordered-constraints-sp {
+  grouping ordered-constraints-sp {
     description
       "";
     container hop-type {
       choice hop-type {
         case SRLG {
           leaf SRLG {
-               type string; //to be clarified with topology model
+            type string;
+            //to be clarified with topology model
           }
         }
-
         case clli {
           leaf clli {
-               type string; //to be clarified with topology model
+            type string;
+            //to be clarified with topology model
           }
         }
-
         case node {
           leaf node-id {
-               type string; // to be clarified with topology model
+            type string;
+            // to be clarified with topology model
           }
         }
       }
     }
   }
 
-
   grouping diversity-existing-service-contraints-sp {
     leaf-list existing-service {
       type string;
@@ -103,6 +102,7 @@ grouping ordered-constraints-sp {
       }
     }
   }
+
   grouping routing-constraints-sp {
     container hard-constraints {
       uses constraints-sp;
@@ -111,16 +111,17 @@ grouping ordered-constraints-sp {
       uses constraints-sp;
     }
     leaf pce-metric {
-         type enumeration {
-              enum hop-count;
-              enum propagation-delay;
-              enum TE-metric;
-              enum IGP-metric;
-         }
+      type enumeration {
+        enum hop-count;
+        enum propagation-delay;
+        enum TE-metric;
+        enum IGP-metric;
+      }
     }
     leaf locally-protected-links {
-         type boolean;
-         description "indicates whether it must use locally protected links or not";
+      type boolean;
+      description
+        "indicates whether it must use locally protected links or not";
     }
   }
 
@@ -136,25 +137,24 @@ grouping ordered-constraints-sp {
         container exclude_ {
           uses common-constraints-sp;
           leaf-list supporting-service-name {
+            type string;
             description
               "Supporting service(s) to exclude from this route.";
-            type string;
           }
           leaf affinity {
-               type uint32;
+            type uint32;
           }
         }
         container include_ {
           list ordered-hops {
-               key hop-number;
-               leaf hop-number {
-                    description
-                      "designates the id of the hop: node-id, SRLG-id, site-id";
-                    type uint16;
-               }
-               uses ordered-constraints-sp;
+            key "hop-number";
+            leaf hop-number {
+              type uint16;
+              description
+                "designates the id of the hop: node-id, SRLG-id, site-id";
+            }
+            uses ordered-constraints-sp;
           }
-
         }
         container latency {
           description
@@ -176,6 +176,4 @@ grouping ordered-constraints-sp {
       }
     }
   }
-
-
 }
index 577513489b274b839cdb48e9e5b2ba37c3d32cd6..8e063130cc80e1ab5eae2967a34b6221be0d9e0c 100644 (file)
@@ -45,13 +45,12 @@ module transportpce-servicepath {
       POSSIBILITY OF SUCH DAMAGE";
 
   revision 2017-10-17 {
-      description
-        "Version 1.6";
+    description
+      "Version 1.6";
   }
-
   revision 2017-04-26 {
-      description
-        "Version 1.5";
+    description
+      "Version 1.5";
   }
 
   container service-path-list {
@@ -62,5 +61,4 @@ module transportpce-servicepath {
       uses transportpce-common-service-path-types:service-path;
     }
   }
-
 }
index bebfbf02a56109cb87f2e83d6a7e6f0a71b8d678..f967bc89b94e54186af60236c1d392d9e5aed4ff 100644 (file)
@@ -1,6 +1,6 @@
 module transportpce-servicehandler {
-    namespace "http://org/opendaylight/transportpce/servicehandler";
-    prefix "org-opendaylight-transportpce-servicehandler";
+  namespace "http://org/opendaylight/transportpce/servicehandler";
+  prefix org-opendaylight-transportpce-servicehandler;
 
   import ietf-yang-types {
     prefix yang;
@@ -66,14 +66,12 @@ module transportpce-servicehandler {
     description
       "Version 1.6";
   }
-
   revision 2017-09-30 {
-      description
-        "Version 1.2";
+    description
+      "Version 1.2";
   }
 
-
-  notification service-rpc-result-sh{
+  notification service-rpc-result-sh {
     description
       "This Notification indicates result of service RPC";
     leaf notification-type {
@@ -82,6 +80,4 @@ module transportpce-servicehandler {
     uses transportpce-common-service-path-types:rpc-response-status-ex;
     uses org-openroadm-common-service-types:service-notification-result;
   }
-
-
 }
index ceff731c141cdb9023b9387e2bd0a6ac66c30a24..4ae39532f02fa59886bad468f8ebbdd421a23cd0 100644 (file)
@@ -1,91 +1,91 @@
 module tapi {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:tapi";
-    prefix "tapi";
+  yang-version 1;
+  namespace "urn:opendaylight:params:xml:ns:yang:tapi";
+  prefix tapi;
 
-    import tapi-topology {
-        prefix tapi-topology;
-        revision-date 2018-12-10;
-    }
-
-    import org-openroadm-service {
-        prefix oor-service;
-        revision-date 2019-05-31;
-    }
+  import tapi-topology {
+    prefix tapi-topology;
+    revision-date 2018-12-10;
+  }
+  import org-openroadm-service {
+    prefix oor-service;
+    revision-date 2019-05-31;
+  }
+  import tapi-common {
+    prefix tapi-common;
+    revision-date 2018-12-10;
+  }
+  import org-openroadm-common-service-types {
+    prefix org-openroadm-common-service-types;
+    revision-date 2019-05-31;
+  }
 
-    import tapi-common {
-        prefix tapi-common;
-        revision-date 2018-12-10;
-    }
-
-    import org-openroadm-common-service-types {
-        prefix org-openroadm-common-service-types;
-        revision-date 2019-05-31;
-    }
+  organization
+    "transportPCE";
+  contact
+    "transportPCE committers - ODL";
+  description
+    "YANG definitions for using REST API in TAPI module. Copyright
+     (c) 2018 ORANGE and others. All rights reserved. authors: Gilles
+     Thouenon ( gilles.thouenon@orange.com ) Christophe Betoule ( christophe.betoule@orange.com
+     )";
 
-    organization
-        "transportPCE";
-    contact
-        "transportPCE committers - ODL";
+  revision 2018-09-28 {
     description
-        "YANG definitions for using REST API in TAPI module. Copyright
-        (c) 2018 ORANGE and others. All rights reserved. authors: Gilles
-        Thouenon ( gilles.thouenon@orange.com ) Christophe Betoule ( christophe.betoule@orange.com
-        )";
+      "Initial revision of TAPI model for internal use";
+  }
 
-    revision "2018-09-28" {
-        description "Initial revision of TAPI model for internal use";
+  typedef end-point-type {
+    type enumeration {
+      enum Aend {
+        value 1;
+      }
+      enum Zend {
+        value 2;
+      }
     }
+    description
+      "help to identify if the generic service end point is usable as a service termination for A or Z end-point";
+  }
 
-    typedef end-point-type {
-        type enumeration {
-            enum "Aend" {
-                value 1;
-            }
-            enum "Zend" {
-                value 2;
-            }
-        }
+  rpc load-topology {
+    input {
+      leaf topology-name {
+        type string;
+        description
+          "none";
+      }
+      container topology {
         description
-            "help to identify if the generic service end point is usable as a service termination for A or Z end-point";
+          "none";
+        uses tapi-topology:topology;
+      }
     }
-
-    rpc load-topology {
-        input {
-            leaf topology-name {
-                type string;
-                description "none";
-            }
-            container topology {
-                uses tapi-topology:topology;
-                description "none";
-            }
-        }
-        output {
-            leaf success {
-              type boolean;
-            }
-            leaf result {
-              type string;
-            }
-        }
+    output {
+      leaf success {
+        type boolean;
+      }
+      leaf result {
+        type string;
+      }
     }
+  }
 
-    container service-interface-points {
-        list service-end-point {
-            description
-              "List of service-interface-point from tapi-topology available
-               for an org-openroadm-service usage";
-            key "uuid";
-            leaf uuid {
-                type tapi-common:uuid;
-            }
-            container end-point {
-                leaf service-end-point-type {
-                    type end-point-type;
-                }
-                uses org-openroadm-common-service-types:service-endpoint;
-            }
+  container service-interface-points {
+    list service-end-point {
+      key "uuid";
+      description
+        "List of service-interface-point from tapi-topology available
+         for an org-openroadm-service usage";
+      leaf uuid {
+        type tapi-common:uuid;
+      }
+      container end-point {
+        leaf service-end-point-type {
+          type end-point-type;
         }
+        uses org-openroadm-common-service-types:service-endpoint;
+      }
     }
+  }
 }
index 8d165da3e39c61103acd40f7ab878622b3595f8f..cac390a0503872b941875acc7cb94dd091e4cc4b 100644 (file)
@@ -1,9 +1,9 @@
 module transportpce-alarmsuppression {
   yang-version 1;
   namespace "http://org/opendaylight/transportpce/alarmsuppression";
-  prefix "org-opendaylight-transportpce-alarmsuppression";
+  prefix org-opendaylight-transportpce-alarmsuppression;
 
- organization
 organization
     "transportPCE";
   contact
     "transportPCE committers - ODL";
@@ -13,43 +13,45 @@ module transportpce-alarmsuppression {
      authors: Dhruv Bhardwaj ( db929a@att.com )
               Shweta Vachhani ( sv111y@att.com )";
 
-  revision "2017-11-02" {
-    description "Initial revision of alarm suppression model";
+  revision 2017-11-02 {
+    description
+      "Initial revision of alarm suppression model";
   }
-  container service-nodelist{
+
+  container service-nodelist {
     list nodelist {
-      key service-name;
-      leaf service-name{
+      key "service-name";
+      leaf service-name {
         type string;
         description
           "Unique identifier for service";
       }
-      list nodes{
-        key node-id;
-        leaf node-id{
+      list nodes {
+        key "node-id";
+        leaf node-id {
           type string;
           description
-          "Unique identifier for node in the network";
+            "Unique identifier for node in the network";
         }
-      /*leaf-list interface-list {
-          type string;
-      }
-      leaf-list connection-list {
-          type string;
-      }
-      leaf-list degree-number-list {
-          type uint16;
-      }
-      leaf-list srg-number-list {
-          type uint16;
-      }
-      leaf-list circuit-pack-list {
-          type string;
-      }
-      leaf-list port-list {
-          type string;
-      }
-      */
+        /*leaf-list interface-list {
+            type string;
+        }
+        leaf-list connection-list {
+            type string;
+        }
+        leaf-list degree-number-list {
+            type uint16;
+        }
+        leaf-list srg-number-list {
+            type uint16;
+        }
+        leaf-list circuit-pack-list {
+            type string;
+        }
+        leaf-list port-list {
+            type string;
+        }
+         */
       }
     }
   }
index 1a1a0c73bc340b2b0afde58941ae35656d74e3fd..8426fa31bc77988d66d974b1f1b5794406eadce7 100644 (file)
 module transportpce-networkutils {
-    yang-version 1;
-    namespace "http://org/opendaylight/transportpce/networkutils";
-    prefix "org-opendaylight-transportpce-networkutils";
+  yang-version 1;
+  namespace "http://org/opendaylight/transportpce/networkutils";
+  prefix org-opendaylight-transportpce-networkutils;
 
-    revision "2017-08-18" {
-        description "Initial revision of networkutils model";
-    }
+  revision 2017-08-18 {
+    description
+      "Initial revision of networkutils model";
+  }
 
-    grouping links-input-grouping {
-        container links-input {
-            description "This is the input to initialize the nodes";
-            leaf xpdr-node {
-                type string;
-            }
-            leaf xpdr-num {
-                type uint8;
-            }
-            leaf network-num {
-                type uint8;
-            }
-            leaf rdm-node {
-                type string;
-            }
-            leaf srg-num {
-                type uint8;
-            }
-            leaf termination-point-num {
-                type string;
-            }
-        }
+  grouping links-input-grouping {
+    container links-input {
+      description
+        "This is the input to initialize the nodes";
+      leaf xpdr-node {
+        type string;
+      }
+      leaf xpdr-num {
+        type uint8;
+      }
+      leaf network-num {
+        type uint8;
+      }
+      leaf rdm-node {
+        type string;
+      }
+      leaf srg-num {
+        type uint8;
+      }
+      leaf termination-point-num {
+        type string;
+      }
     }
+  }
 
-    rpc init-roadm-nodes {
-        description "This rpc initiates roadm to roadm link";
-        input {
-            leaf rdm-a-node {
-                type string;
-            }
-            leaf deg-a-num {
-                type uint8;
-            }
-            leaf termination-point-a {
-                type string;
-            }
-            leaf rdm-z-node {
-                type string;
-            }
-            leaf deg-z-num {
-                type uint8;
-            }
-            leaf termination-point-z {
-                type string;
-            }
-        }
-        output {
-            leaf result {
-                type string;
-            }
-        }
+  rpc init-roadm-nodes {
+    description
+      "This rpc initiates roadm to roadm link";
+    input {
+      leaf rdm-a-node {
+        type string;
+      }
+      leaf deg-a-num {
+        type uint8;
+      }
+      leaf termination-point-a {
+        type string;
+      }
+      leaf rdm-z-node {
+        type string;
+      }
+      leaf deg-z-num {
+        type uint8;
+      }
+      leaf termination-point-z {
+        type string;
+      }
+    }
+    output {
+      leaf result {
+        type string;
+      }
     }
+  }
 
-    rpc init-xpdr-rdm-links {
-        description "This rpc initiates xponder to rdm link";
-        input {
-            uses links-input-grouping;
-        }
-        output {
-            leaf result {
-                type string;
-            }
-        }
+  rpc init-xpdr-rdm-links {
+    description
+      "This rpc initiates xponder to rdm link";
+    input {
+      uses links-input-grouping;
+    }
+    output {
+      leaf result {
+        type string;
+      }
     }
+  }
 
-    rpc init-rdm-xpdr-links {
-        description "This rpc initiates rdm to xponder link";
-        input {
-            uses links-input-grouping;
-        }
-        output {
-            leaf result {
-                type string;
-            }
-        }
+  rpc init-rdm-xpdr-links {
+    description
+      "This rpc initiates rdm to xponder link";
+    input {
+      uses links-input-grouping;
     }
-    rpc delete-link {
-        description "This rpc deletes a given link in openroadm Topology layer";
-        input {
-            leaf link-id {
-                type string;
-            }
-        }
-        output {
-            leaf result {
-              type string;
-            }
-        }
+    output {
+      leaf result {
+        type string;
+      }
     }
+  }
 
+  rpc delete-link {
+    description
+      "This rpc deletes a given link in openroadm Topology layer";
+    input {
+      leaf link-id {
+        type string;
+      }
+    }
+    output {
+      leaf result {
+        type string;
+      }
+    }
+  }
 }
index a814e480cc6cb6a2a5e0ad48d0e0816c66e70bbd..1ae23a1557c5391d2dea1bd29d286cd23b6804c4 100644 (file)
@@ -1,18 +1,17 @@
 module transportpce-olm {
   yang-version 1;
   namespace "http://org/opendaylight/transportpce/olm";
-  prefix "org-opendaylight-transportpce-olm";
+  prefix org-opendaylight-transportpce-olm;
 
   import transportpce-common-types {
-      prefix org-transportpce-common-types;
+    prefix org-transportpce-common-types;
   }
-
   import ietf-network-topology {
-     prefix ietf-network-topology;
-     revision-date 2018-02-26;
+    prefix ietf-network-topology;
+    revision-date 2018-02-26;
   }
 
- organization
 organization
     "transportPCE";
   contact
     "transportPCE committers - ODL";
@@ -22,127 +21,132 @@ module transportpce-olm {
      authors: Dhruv Bhardwaj ( db929a@att.com )
               Shweta Vachhani ( sv111y@att.com )";
 
-  revision "2017-04-18" {
-    description "Initial revision of olm model";
+  revision 2017-04-18 {
+    description
+      "Initial revision of olm model";
   }
 
-  rpc get-pm{
-   description
+  rpc get-pm {
+    description
       "This RPC fetches from the device a list of pm measurements
        on a given resource and granularity.";
-    input{
+    input {
       uses org-transportpce-common-types:olm-get-pm-input;
     }
-    output{
+    output {
       uses org-transportpce-common-types:olm-get-pm-input;
-      leaf resource-id{
+      leaf resource-id {
         type string;
       }
       list measurements {
-          description
-             "Set of parameters related to a PM Measurement";
-      leaf pmparameter-name{
-        type string;
-      }
-      leaf pmparameter-value {
-        type string;
+        description
+          "Set of parameters related to a PM Measurement";
+        leaf pmparameter-name {
+          type string;
+        }
+        leaf pmparameter-value {
+          type string;
         }
       }
     }
   }
-  rpc service-power-setup{
-   description
+
+  rpc service-power-setup {
+    description
       "This RPC sets up output power values on a list of ROADMs/Transponders
          based on the path the wavelength takes";
-    input{
-       uses org-transportpce-common-types:olm-renderer-input;
+    input {
+      uses org-transportpce-common-types:olm-renderer-input;
     }
-    output{
-      leaf result{
+    output {
+      leaf result {
         type string;
       }
     }
   }
-  rpc service-power-turndown{
-   description
+
+  rpc service-power-turndown {
+    description
       "This RPC turn down the output power values on a list of ROADMs/Transponders
          based on the path the wavelength takes";
-    input{
-       uses org-transportpce-common-types:olm-renderer-input;
+    input {
+      uses org-transportpce-common-types:olm-renderer-input;
     }
-    output{
-      leaf result{
+    output {
+      leaf result {
         type string;
       }
     }
   }
-  rpc service-power-reset{
-      description
-         "This RPC re-calculates and re-sets power for all nodes part of a
-              service given in input";
-       input{
-         leaf service-name{
-              type string;
-              description
-               "Name of the service. Unique identifier for serivice";
-         }
-       }
-       output{
-         leaf result{
-           type string;
-         }
-       }
+
+  rpc service-power-reset {
+    description
+      "This RPC re-calculates and re-sets power for all nodes part of a
+           service given in input";
+    input {
+      leaf service-name {
+        type string;
+        description
+          "Name of the service. Unique identifier for serivice";
+      }
+    }
+    output {
+      leaf result {
+        type string;
+      }
+    }
   }
-  rpc calculate-spanloss-base{
-      description
-         "This RPC calculates spanloss for the very first time on all links
-            in the network model or any newly discovered link";
-       input{
-         leaf src-type {
-           description
-             "Soruce type defines whether RPC runs for all links or given link Id";
-          type enumeration{
-             enum "link"{
-               value 1;
-             }
-             enum "all"{
-               value 2;
-             }
-           }
-         }
-         leaf link-id {
-            when "../src-type = 'link'";
-            type ietf-network-topology:link-id;
-            default "all";
-             description
-               "Link-Id for the link where spanloss-base needs to be calculated. Default option is
-               calculating spanloss for all Roadm to Roadm links";
-         }
-       }
-       output{
-         leaf result{
-           type string;
-         }
-         list spans {
-             leaf link-id {
-                 type ietf-network-topology:link-id;
-             }
-             leaf spanloss {
-                 type string;
-             }
-         }
-       }
+
+  rpc calculate-spanloss-base {
+    description
+      "This RPC calculates spanloss for the very first time on all links
+         in the network model or any newly discovered link";
+    input {
+      leaf src-type {
+        type enumeration {
+          enum link {
+            value 1;
+          }
+          enum all {
+            value 2;
+          }
+        }
+        description
+          "Soruce type defines whether RPC runs for all links or given link Id";
+      }
+      leaf link-id {
+        when "../src-type = 'link'";
+        type ietf-network-topology:link-id;
+        default "all";
+        description
+          "Link-Id for the link where spanloss-base needs to be calculated. Default option is
+           calculating spanloss for all Roadm to Roadm links";
+      }
+    }
+    output {
+      leaf result {
+        type string;
+      }
+      list spans {
+        leaf link-id {
+          type ietf-network-topology:link-id;
+        }
+        leaf spanloss {
+          type string;
+        }
+      }
+    }
   }
-  rpc calculate-spanloss-current{
-      description
-         "This RPC can be used by PM monitoring to calculate spanloss
-            periodically";
-       input{
-       }
-       output{
-         leaf result{
-           type string;
-         }
-       }
+
+  rpc calculate-spanloss-current {
+    description
+      "This RPC can be used by PM monitoring to calculate spanloss
+         periodically";
+    input;
+    output {
+      leaf result {
+        type string;
+      }
+    }
   }
 }
index a8b3ed54e54e39f6328f056fad1ea05b705dde8f..0c8b4cf9af02104751c2a14028c4edcca67db8cb 100644 (file)
@@ -1,13 +1,24 @@
 module transportpce-portmapping {
   yang-version 1;
   namespace "http://org/opendaylight/transportpce/portmapping";
-  prefix "org-opendaylight-transportpce-portmapping";
+  prefix org-opendaylight-transportpce-portmapping;
 
-  import org-openroadm-common-types { prefix org-openroadm-common-types; revision-date 2018-10-19; }
-  import org-openroadm-switching-pool-types { prefix org-openroadm-switching-pool-types; revision-date 2017-12-15; }
-  import org-openroadm-port-types {prefix org-openroadm-port-types; revision-date 2018-10-19; }
-
-  import ietf-inet-types { prefix ietf-inet-types; revision-date 2013-07-15; }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2018-10-19;
+  }
+  import org-openroadm-switching-pool-types {
+    prefix org-openroadm-switching-pool-types;
+    revision-date 2017-12-15;
+  }
+  import org-openroadm-port-types {
+    prefix org-openroadm-port-types;
+    revision-date 2018-10-19;
+  }
+  import ietf-inet-types {
+    prefix ietf-inet-types;
+    revision-date 2013-07-15;
+  }
 
   organization
     "transportPCE";
@@ -15,35 +26,35 @@ module transportpce-portmapping {
     "transportPCE committers - ODL";
   description
     "YANG definitions of RPCs supported by OLM. Copyright (c) 2017
-    AT&T and others. All rights reserved. authors: Dhruv Bhardwaj
-    ( db929a@att.com ) Shweta Vachhani ( sv111y@att.com )";
+     AT&T and others. All rights reserved. authors: Dhruv Bhardwaj
+     ( db929a@att.com ) Shweta Vachhani ( sv111y@att.com )";
 
-  revision "2020-01-28" {
-      description "Add necessary parameters to consolidate OTN
-          and address ONAP MDONS use case";
-    }
-
-  revision "2020-01-13" {
-      description "Add OTN data from device and necessary
-          to build node inside otn topology";
-    }
-
-  revision "2019-11-15" {
-    description "OTN support";
+  revision 2020-01-28 {
+    description
+      "Add necessary parameters to consolidate OTN
+       and address ONAP MDONS use case";
+  }
+  revision 2020-01-13 {
+    description
+      "Add OTN data from device and necessary
+       to build node inside otn topology";
+  }
+  revision 2019-11-15 {
+    description
+      "OTN support";
   }
-
   revision 2019-07-02 {
     description
-        "Version 2. To manage device 2.2.1";
+      "Version 2. To manage device 2.2.1";
   }
-
   revision 2017-02-28 {
-    description "Initial revision of port mapping model";
+    description
+      "Initial revision of port mapping model";
   }
 
   container network {
     list nodes {
-      key node-id;
+      key "node-id";
       leaf node-id {
         type string;
         description
@@ -57,12 +68,12 @@ module transportpce-portmapping {
         }
         leaf openroadm-version {
           type enumeration {
-            enum "1.2.1" {
+            enum 1.2.1 {
               value 1;
               description
                 "Version 1.2.1";
             }
-            enum "2.2.1" {
+            enum 2.2.1 {
               value 2;
               description
                 "Version 2.2.1";
@@ -90,12 +101,11 @@ module transportpce-portmapping {
             "Current IP Address of device";
         }
       }
-
       list mapping {
+        key "logical-connection-point";
         description
           "Mapping for Physical circuit pack/port/parent interfaces corresponding
-          to each logical connection point present in the node.";
-        key logical-connection-point;
+           to each logical connection point present in the node.";
         leaf logical-connection-point {
           type string;
         }
@@ -123,25 +133,25 @@ module transportpce-portmapping {
           type string;
           description
             "Useful for line port of XPDR, for which there is no indication
-            in its logical-termination-point naming";
+             in its logical-termination-point naming";
         }
         leaf port-qual {
           type string;
           description
             "Useful to identify from portmapping client from network ports
-            of XPDR";
+             of XPDR";
         }
-        leaf supporting-ethernet{
+        leaf supporting-ethernet {
           type string;
           description
             "Ethernet interface provisioned on the port";
         }
-        leaf supporting-odu4{
+        leaf supporting-odu4 {
           type string;
           description
             "ODU4 interface provisioned on the port";
         }
-        leaf rate{
+        leaf rate {
           type string;
           description
             "Rate supported by the port";
@@ -158,20 +168,20 @@ module transportpce-portmapping {
           type string;
           description
             "For XPDR, associate two logical-connection-points from device/connnection-map
-            data";
+             data";
         }
         leaf partner-lcp {
           type string;
           description
             "For XPDR unidirectional NETWORK port, associate two logical-connection-points
-            from device/partner port data";
+             from device/partner port data";
         }
       }
       list cp-to-degree {
+        key "circuit-pack-name";
         description
           "This mapping helps locate degree number of the circuitpack that
-          does lldp protocol management";
-        key circuit-pack-name;
+           does lldp protocol management";
         leaf circuit-pack-name {
           type string;
         }
@@ -182,11 +192,10 @@ module transportpce-portmapping {
           type string;
         }
       }
-
       list switching-pool-lcp {
+        key "switching-pool-number";
         description
           "For MUXPDR and SWITCH, associates from device/odu-switching-pools data, the logical-connection-points";
-        key "switching-pool-number";
         leaf switching-pool-number {
           type uint16;
           description