Update YANG models for OpenFronthaul M-Plane.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-file-management.yang
@@ -5,6 +5,7 @@ module o-ran-file-management {
 
   import ietf-crypto-types {
     prefix "ct";
 
   import ietf-crypto-types {
     prefix "ct";
+    revision-date "2019-04-29";
   }
 
 
   }
 
 
@@ -16,7 +17,7 @@ module o-ran-file-management {
   description
     "This module defines the configuration and operations for handling upload.
 
   description
     "This module defines the configuration and operations for handling upload.
 
-    Copyright 2019 the O-RAN Alliance.
+    Copyright 2021 the O-RAN Alliance.
 
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -42,6 +43,34 @@ module o-ran-file-management {
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.";
 
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.";
 
+  revision "2022-08-15" {
+    description
+      "version 10.0.0
+
+      1) added password for FTPES
+      2) clarified path/folder description ";
+
+    reference "ORAN-WG4.M.0-v10.00";
+  }
+
+  revision "2021-12-01" {
+    description
+      "version 7.1.0
+
+      1) typographical corrections";
+
+    reference "ORAN-WG4.M.0-v07.00";
+  }
+
+  revision "2021-07-26" {
+    description
+      "version 7.0.0
+
+      1) added FTPES support";
+
+    reference "ORAN-WG4.M.0-v07.00";
+  }
+
   revision "2019-07-03" {
     description
       "version 1.1.0
   revision "2019-07-03" {
     description
       "version 1.1.0
@@ -64,20 +93,33 @@ module o-ran-file-management {
   }
 
   grouping file-path-grouping {
   }
 
   grouping file-path-grouping {
-    description "Complete logical path of the file to upload/download
-    (no wildcard is allowed) ex : /o-RAN/log/syslog.1";
+    description "Grouping, that provides local path and remote path for the
+    purpose of File Management scenarios.";
+
 
     leaf local-logical-file-path {
       type string;
       mandatory true;
 
     leaf local-logical-file-path {
       type string;
       mandatory true;
-      description "Local logical file path";
+      description "URI specifying the complete logical path relative to the root of the logical file system
+      structure (the common root for o-ran/log, o-ran/pm, o-ran/transceiver or o-ran/beamforming) of the file
+      to upload/download (no wildcard is allowed), including a file name and its extension.
+      Example: 'o-ran/log/file_1.abc', where 'o-ran/log/' represents relative path to folder containing log files
+      as specified by O-RAN, 'file_1' represents desired filename and 'abc' represents desired filename's extension.
+      The content shall conform to RFC3986 'Uniform Resource Identifier (URI): Generic Syntax'";
     }
 
     leaf remote-file-path {
       type string;
       mandatory true;
     }
 
     leaf remote-file-path {
       type string;
       mandatory true;
-      description "URI specifying the remote-file-path on O-DU/NMS.
-      Format:sftp://<username>@<host>[:port]/path";
+      description "URI specifying the remote-file-path on O-DU/SMO or on stand-alone file server.
+      The content shall conform to RFC3986 'Uniform Resource Identifier (URI): Generic Syntax'.
+      When upload/download is via sftp, the format shall be of the form
+      sftp://<username>@<host>[:port]/path
+      When upload/download is via ftpes, the format shall be of the form
+      ftpes://<username>@<host>[:port]/path
+
+      Note, ftpes is not an IANA registered URI scheme, but used here to signal
+      that a file transfer should be performed over FTPES";
     }
   }
 
     }
   }
 
@@ -102,7 +144,7 @@ module o-ran-file-management {
   }
 
   grouping credential-information {
   }
 
   grouping credential-information {
-    description "Type of authentication to use for SFTP upload or download.";
+    description "Type of authentication to use for file upload or download.";
     choice credentials {
       case password {
         container password {
     choice credentials {
       case password {
         container password {
@@ -111,10 +153,11 @@ module o-ran-file-management {
             type string;
             mandatory true;
             description
             type string;
             mandatory true;
             description
-              "password needed for O-RU authentication.";
+              "password used for O-RU authentication to sFTP server for the associated username defined in the remote-file-path.";
           }
           description
           }
           description
-            "password for O-RU authentication method in use";
+            "password for O-RU authentication method in use. This information
+            shall be ignored by an O-RU that is using FTPES based file transfer";
         }
         container server {
           list keys {
         }
         container server {
           list keys {
@@ -125,7 +168,7 @@ module o-ran-file-management {
               "List of allowed algorithms with its keys";
           }
           description
               "List of allowed algorithms with its keys";
           }
           description
-            "Key for sFTP server authentication";
+            "SSH Key for file server authentication";
         }
       }
       case certificate {
         }
       }
       case certificate {
@@ -134,9 +177,22 @@ module o-ran-file-management {
           description
             "certificate authentication method in use";
         }
           description
             "certificate authentication method in use";
         }
+
       }
      description "";
     }
       }
      description "";
     }
+    container application-layer-credential{
+
+      leaf appl-password {
+            type string;
+            description
+             "The parameter represents the password which may be needed for O-RU application level authentication.
+             For example, to perform authenticatation towards an FTPes server which does not allow anonymous account,
+             in addition to X.509v3 certificate for TLS authentication, password configured here need to be used together with username defined in the remote-file-path  ";
+      }
+      description
+        "Application layer credential information";
+    }
   }
 
   grouping retrieve-input {
   }
 
   grouping retrieve-input {
@@ -144,12 +200,13 @@ module o-ran-file-management {
     leaf logical-path {
       type string;
       mandatory true;
     leaf logical-path {
       type string;
       mandatory true;
-      description "O-RAN unit of which the files are to be listed.
-      ex :  O-RAN/log, o-RAN/PM, O-RAN/transceiver";
+      description "URL specifying the logical path relative to the root of the logical file system
+      structure (the common root for o-ran/log, o-ran/pm, o-ran/transceiver or o-ran/beamforming)
+      of the files to be listed.";
     }
     leaf file-name-filter {
       type string;
     }
     leaf file-name-filter {
       type string;
-      description "Filter which are to be applied on the result list of file names (* is allowed as wild-card).";
+      description "Filter which needs to be applied on the result list of file names (* is allowed as wild-card).";
     }
   }
 
     }
   }
 
@@ -166,7 +223,7 @@ module o-ran-file-management {
 // RPCs
 
   rpc file-upload {
 // RPCs
 
   rpc file-upload {
-    description "File upload over SFTP from equipment to NETCONF client";
+    description "Management plane trigger to upload file from O-RU to file-server";
     input {
       uses file-path-grouping;
       uses credential-information;
     input {
       uses file-path-grouping;
       uses credential-information;
@@ -187,15 +244,9 @@ module o-ran-file-management {
     }
   }
 
     }
   }
 
-  notification file-upload-notification {
-    uses file-path-grouping;
-    uses output-status-grouping;
-    description "";
-  }
-
   rpc file-download {
     description
   rpc file-download {
     description
-      "Management plane triggered to generate the download file of O-RU.";
+      "Management plane trigger to download file from file-server to O-RU.";
     input {
       uses file-path-grouping;
       uses credential-information;
     input {
       uses file-path-grouping;
       uses credential-information;
@@ -205,6 +256,12 @@ module o-ran-file-management {
     }
   }
 
     }
   }
 
+  notification file-upload-notification {
+    uses file-path-grouping;
+    uses output-status-grouping;
+    description "";
+  }
+
   notification file-download-event {
     uses file-path-grouping;
     uses output-status-grouping;
   notification file-download-event {
     uses file-path-grouping;
     uses output-status-grouping;