reformat API YANG models
[transportpce.git] / api / src / main / yang / service_path / transportpce-renderer-device@2020-01-28.yang
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;
         }