Update YANG models for OpenFronthaul M-Plane.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-antenna-calibration.yang
@@ -12,7 +12,7 @@ module o-ran-antenna-calibration {
     "This module defines the configuration required for supporting the optional
     antenna calibration functionality.
 
-     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
@@ -29,15 +29,54 @@ module o-ran-antenna-calibration {
      Redistribution and use in source and binary forms, with or without
      modification, are permitted provided that the following conditions are met:
 
-     * Redistributions of source code must retain the above copyright notice,
+     * Redistribution of source code must retain the above copyright notice,
      this list of conditions and the above disclaimer.
-     * Redistributions in binary form must reproduce the above copyright notice,
+     * Redistribution in binary form must reproduce the above copyright notice,
      this list of conditions and the above disclaimer in the documentation
      and/or other materials provided with the distribution.
      * Neither the Members of the O-RAN Alliance nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.";
 
+  revision 2021-12-01 {
+   description
+     "version 7.1.0
+
+       1) typographical corrections in descriptions.";
+
+   reference "ORAN-WG4.MP-v07.00";
+  }
+
+  revision 2021-07-26 {
+    description
+      "version 7.0.0
+
+        1) O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE is added as optional feature
+        to provide support for multiple antenna calibration time resources configurations.
+        2) Flag for O-DU to control if O-RU is allowed to support this feature
+        'coordinated-calibration-multiple-time-resources-allowed'
+        3) defined grouping 'antenna-calibration-multiple-time-resource' from which list
+        for supporting multiple antenna calibration time resource configuration is supported.
+        4) created new container 'antenna-calibration-multiple-time-resource' with list
+        'antenna-calibration-multiple-time-resource-list' and key to index the list
+        'antenna-calibration-time-resource-index'.
+        5) added new notification 'antenna-calibration-multiple-time-resource-params' with
+        'antenna-calibration-time-resource-index' as a leaf to indicate index of time resource
+        6) Added support for configured preparedness timer for co-ordinated calibration";
+
+    reference "ORAN-WG4.MP-v07.00";
+  }
+
+   revision 2021-03-22 {
+     description
+       "version 5.1.0
+
+        1) removing non-ASCII characters in model.";
+
+     reference "ORAN-WG4.MP-v05.00";
+   }
+
+
   revision 2020-12-10 {
     description
       "version 5.0.0
@@ -62,7 +101,13 @@ module o-ran-antenna-calibration {
 
   feature O-RU-COORDINATED-ANT-CAL {
     description
-      "Indicates that the O-RU needs user traffic to be coordinated from O-DU for antenna calibration.";
+      "Indicates that the O-RU needs user traffic to be co-ordinated from O-DU for antenna calibration.";
+  }
+
+  feature O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE {
+    description
+      "Indicates O-RU support for antenna calibration with multiple timing resource sets. Refer Section
+      'Calibration with multiple timing resource sets' of M-Plane specification v7";
   }
 
   grouping antenna-calibration-capabilities {
@@ -75,7 +120,7 @@ module o-ran-antenna-calibration {
         "Indicates whether O-RU supports self-calibration or not.
 
         When true, indicates O-RU can initiate calibration without receiving an
-        rpc and/or impacting simultaneous CU-plane operation";
+        RPC and/or impacting simultaneous CU-plane operation";
     }
     leaf coordinated-calibration-support {
       if-feature O-RU-COORDINATED-ANT-CAL;
@@ -84,8 +129,98 @@ module o-ran-antenna-calibration {
       description
         "True means the O-RU is able to determine priori the time-frequency
          resources required for self-calibration and indicate those to the O-DU
-         in the antenna-calibration-coordination notification.";
+         in the antenna-calibration-coordinated notification.";
+    }
+    leaf number-of-calibration-symbols-per-block-dl {
+      type uint8 {
+        range "1..max";
+      }
+      units symbols;
+      mandatory true;
+      description
+        "Indicates how many consecutive symbols are required for DL antenna
+        calibration operation";
+    }
+    leaf number-of-calibration-symbols-per-block-ul {
+      type uint8 {
+        range "1..max";
+      }
+      units symbols;
+      mandatory true;
+      description
+        "Indicates how many consecutive symbols are required for UL antenna
+        calibration operation";
+    }
+    leaf interval-between-calibration-blocks {
+      type uint8;
+      units symbols;
+      description
+        "if time interval is required between consecutive antenna calibration
+        operation, defines this time value as unit of symbols.
+
+        A common value is used here for the intervals
+        between DL-DL blocks, UL-UL blocks, DL-UL blocks and UL-DL blocks,
+        which is the largest minimum interval required between any two adjacent
+        calibration blocks.";
+    }
+    leaf number-of-calibration-blocks-per-step-dl {
+      type uint8 {
+        range "1..max";
+      }
+      mandatory true;
+      description
+        "Indicates how many blocks are required for one step of DL antenna
+        calibration operation";
+    }
+    leaf number-of-calibration-blocks-per-step-ul {
+      type uint8 {
+        range "1..max";
+      }
+      mandatory true;
+      description
+        "Indicates how many blocks are required for one step of UL antenna
+        calibration operation";
+    }
+    leaf interval-between-calibration-steps {
+      type uint8;
+      units radio-frames;
+      description
+        "If time interval is required between consecutive step of antenna
+        calibration operation, defines this time value as unit of radio frames";
     }
+    leaf number-of-calibration-steps {
+      type uint8 {
+        range "1..max";
+      }
+      mandatory true;
+      description
+        "Indicates how many steps are required for whole DL/UL antenna
+        calibration operation";
+    }
+    leaf calibration-period {
+       if-feature O-RU-COORDINATED-ANT-CAL;
+       type uint16;
+       units minutes;
+       description "periodical interval between antenna calibrations in the case of support of feature O-RU-COORDINATED-ANT-CAL";
+    }
+    leaf configured-preparation-timer-supported {
+      if-feature O-RU-COORDINATED-ANT-CAL;
+      type boolean;
+      default false;
+      description
+        "indicates if the O-RU supports configuration of the preparedness timer
+        that controls how far in advance of the co-ordinated self calibration
+        procedure the O-RU is required to send the notification of impacted
+        resources.";
+    }
+  }
+
+  grouping antenna-calibration-multiple-time-resource {
+    description
+      "Grouping for collection of leafs for antenna calibration capability of O-RU supporting
+      multiple time resource when feature O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE
+      is supported in the O-RU";
+
     leaf number-of-calibration-symbols-per-block-dl {
       type uint8 {
         range "1..max";
@@ -156,7 +291,7 @@ module o-ran-antenna-calibration {
        if-feature O-RU-COORDINATED-ANT-CAL;
        type uint16;
        units minutes;
-       description "peiodical interval between antenna calibrations in the case of support of feature O-RU-COORDINATED-ANT-CAL";
+       description "periodical interval between antenna calibrations in the case of support of feature O-RU-COORDINATED-ANT-CAL";
     }
   }
 
@@ -165,7 +300,7 @@ module o-ran-antenna-calibration {
       config false;
       description
         "Describes the antenna calibration capabilities";
-      uses antenna-calibration-capabilities;
+        uses antenna-calibration-capabilities;
     }
     container self-calibration-policy {
       leaf self-calibration-allowed {
@@ -173,7 +308,7 @@ module o-ran-antenna-calibration {
         default false;
         description
           "whether the self-calibration is allowed by operator.
-          Note, self-calibration-alllowed and coordinated-calibration-allowed cannot both be set to true";
+          Note, self-calibration-allowed and coordinated-calibration-allowed cannot both be set to true";
       }
       leaf coordinated-calibration-allowed {
         if-feature O-RU-COORDINATED-ANT-CAL;
@@ -186,66 +321,62 @@ module o-ran-antenna-calibration {
           True means that O-DU may beneficially use the indicated time-frequency resources
           to adapt its operation during the antenna calibration operation,
           e.g., consider the time-frequency resources as reserved for calibration.
-          Both calibrations (self-calibration-alllowed and coordinated-calibration-support) disallowed
+          Both calibrations (self-calibration-allowed and coordinated-calibration-support) disallowed
           or one of them allowed only";
       }
-      description
-        "Describes the self calibration policy of the operator";
-    }
-    description
-      "Describe the grouping set of antenna calibration";
-  }
+      leaf coordinated-ant-calib-prep-timer {
+        if-feature O-RU-COORDINATED-ANT-CAL;
+        type uint8 {
+          range "2..10|60";
+        }
+        units seconds;
+        must "../coordinated-calibration-allowed = 'true'";
+        default 60;
+        description
+          "minimum time between O-RU sending notification of time-frequeny resources
+          for co-ordinated calibration to O-DU and O-RU starting co-ordinated
+          self-calibration procedure.
 
-  container antenna-calibration {
-    uses antenna-calibration;
-    description
-      "Describes the antenna calibration top node";
-  }
+          Note, the default value of 60 seconds is to accommodate earlier versions
+          which hard coded that value in the O-RAN.WG4.MP.0 specification.
 
-  rpc start-antenna-calibration {
-    description
-      "The antenna calibration operation can start when NETCONF client sends a
-      calibration start command with resource allocation parameters.
-      These parameters indicate how the O-RU can perform the antenna
-      calibration operation; at which Symbol, Slot, and Frame.
-      This scheduling information can be generated by O-RU itself.
-      However, in a dynamic TDD environment, the DL and UL configuration
-      is only determined and known by O-DU. Consequently, only O-DU (NETCONF
-      client ) can determine and configure the scheduling and resource
-      allocation permitted for use by the antenna calibration operation";
-    input  {
-       uses antenna-calibration-data;
-    }
-    output  {
-      leaf status {
-        type enumeration {
-          enum ACCEPTED {
-            description
-              "Status information to indicate that O-RU accepted RPC
-              antenna calibration start request";
-          }
-          enum REJECTED {
-            description
-              "Status information to indicate that O-RU rejected RPC antenna
-              calibration start request";
-          }
-        }
-        mandatory true;
+          An O-RU that has set configured-preparation-timer-supported=false shall
+          always use the default value of 60 seconds";
+      }
+      leaf coordinated-calibration-multiple-time-resources-allowed {
+        if-feature "O-RU-COORDINATED-ANT-CAL and O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE";
+        type boolean;
+        default false;
         description
-          "Status of whether antenna calibration trigger by RPC is accepted
-          by the O-RU";
+          "TRUE: O-RU is allowed to request for this calibration, FALSE: O-RU is prohibited to use this calibration";
       }
-      leaf error-message {
-        when "../status='REJECTED'";
-          type string;
+      description
+        "Describes the self calibration policies and configuration of the operator";
+    }
+
+    container antenna-calibration-multiple-time-resource {
+      if-feature "O-RU-COORDINATED-ANT-CAL and O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE";
+      config false;
+      list antenna-calibration-multiple-time-resource-list {
+        key "antenna-calibration-time-resource-index";
+        uses antenna-calibration-multiple-time-resource;
+
+        leaf antenna-calibration-time-resource-index {
+          type uint8;
           description
-            "Detailed error Message when the status is rejected, e.g.,
-             because O-RU can not start antenna calibration
-             such as already running antenna calibration,
-             resource mask mismatch with O-RU antenna calibration capability,
-                              overlapped DL and UL masks, insufficient memory, O-RU internal reason";
+            "Key for indexing 'antenna-calibration-multiple-time-resource-list'";
         }
+        description
+          "List of antenna calibration time resource configuration indexed by
+          antenna calibration time resource index";
       }
+      description
+        "Container to support multiple antenna calibration resource sets by defining
+        multiple calibration resources sets for different calibration types.";
+    }
+
+    description
+      "Describe the grouping set of antenna calibration";
   }
 
   grouping antenna-calibration-data {
@@ -258,7 +389,7 @@ module o-ran-antenna-calibration {
         }
         mandatory true;
         description
-          "Bitmask indicating DL calibration symbol within a calibration slot.
+          "Bit-mask indicating DL calibration symbol within a calibration slot.
            First character in the string indicate first symbol,
            next character in the string indicate second symbol and so on.
            Value 1 indicates that the symbol may be used for calibration
@@ -271,7 +402,7 @@ module o-ran-antenna-calibration {
         }
         mandatory true;
         description
-          "Bitmask indicating UL calibration symbol within a calibration slot.
+          "Bit-mask indicating UL calibration symbol within a calibration slot.
            First character in the string indicate first symbol,
            next character in the string indicate second symbol and so on.
            Value 1 indicates that the symbol may be used for calibration
@@ -284,7 +415,7 @@ module o-ran-antenna-calibration {
         }
         mandatory true;
         description
-          "Bitmask indicating DL calibration slot within a calibration frame.
+          "Bit-mask indicating DL calibration slot within a calibration frame.
            First character in the string indicate first slot,
            next character in the string indicate second slot and so on.
            Value 1 indicates that the slot may be used for calibration
@@ -297,7 +428,7 @@ module o-ran-antenna-calibration {
           }
           mandatory true;
           description
-            "Bitmask indicating UL calibration slot within a calibration frame.
+            "Bit-mask indicating UL calibration slot within a calibration frame.
              First character in the string indicate first slot,
              next character in the string indicate second slot and so on.
              Value 1 indicates that the slot may be used for calibration
@@ -310,7 +441,7 @@ module o-ran-antenna-calibration {
           }
           mandatory true;
           description
-            "Bitmask indicating DL calibration frame within a calibration step.
+            "Bit-mask indicating DL calibration frame within a calibration step.
              First character in the string indicate first radio frame equal to
              the start-SFN, next character in the string indicate the next frame
              and so on.
@@ -325,7 +456,7 @@ module o-ran-antenna-calibration {
           }
           mandatory true;
           description
-            "Bitmask indicating UL calibration frame within a calibration step.
+            "Bit-mask indicating UL calibration frame within a calibration step.
              First character in the string indicate first radio frame equal to
              the start-SFN, next character in the string indicate the next frame
              and so on.
@@ -352,6 +483,58 @@ module o-ran-antenna-calibration {
         }
   }
 
+  container antenna-calibration {
+    uses antenna-calibration;
+    description
+      "Describes the antenna calibration top node";
+  }
+
+  rpc start-antenna-calibration {
+    description
+      "The antenna calibration operation can start when NETCONF client sends a
+      calibration start command with resource allocation parameters.
+      These parameters indicate how the O-RU can perform the antenna
+      calibration operation; at which Symbol, Slot, and Frame.
+      This scheduling information can be generated by O-RU itself.
+      However, in a dynamic TDD environment, the DL and UL configuration
+      is only determined and known by O-DU. Consequently, only O-DU (NETCONF
+      client ) can determine and configure the scheduling and resource
+      allocation permitted for use by the antenna calibration operation";
+    input  {
+       uses antenna-calibration-data;
+    }
+    output  {
+      leaf status {
+        type enumeration {
+          enum ACCEPTED {
+            description
+              "Status information to indicate that O-RU accepted RPC
+              antenna calibration start request";
+          }
+          enum REJECTED {
+            description
+              "Status information to indicate that O-RU rejected RPC antenna
+              calibration start request";
+          }
+        }
+        mandatory true;
+        description
+          "Status of whether antenna calibration trigger by RPC is accepted
+          by the O-RU";
+      }
+      leaf error-message {
+        when "../status='REJECTED'";
+          type string;
+          description
+            "Detailed error Message when the status is rejected, e.g.,
+             because O-RU can not start antenna calibration
+             such as already running antenna calibration,
+             resource mask mismatch with O-RU antenna calibration capability,
+             overlapped DL and UL masks, insufficient memory, O-RU internal reason";
+      }
+    }
+  }
+
   notification antenna-calibration-required {
     list dl-calibration-frequency-chunk {
       leaf start-calibration-frequency-dl {
@@ -367,7 +550,7 @@ module o-ran-antenna-calibration {
            DL antenna calibration operation.";
       }
       description
-         "min/max frequency of dl spectrum chunk affected by calibration process";
+         "min/max frequency of DL spectrum chunk affected by calibration process";
     }
     list ul-calibration-frequency-chunk {
       leaf start-calibration-frequency-ul {
@@ -383,7 +566,7 @@ module o-ran-antenna-calibration {
            UL antenna calibration operation.";
       }
       description
-        "min/max frequency of ul spectrum chunk affected by calibration process";
+        "min/max frequency of UL spectrum chunk affected by calibration process";
     }
 
     description
@@ -406,7 +589,7 @@ module o-ran-antenna-calibration {
            DL antenna calibration operation.";
       }
       description
-         "min/max frequency of dl spectrum chunk affected by calibration process";
+         "min/max frequency of DL spectrum chunk affected by calibration process";
     }
     list ul-calibration-frequency-chunk {
       leaf start-calibration-frequency-ul {
@@ -422,7 +605,7 @@ module o-ran-antenna-calibration {
            UL antenna calibration operation.";
       }
       description
-        "min/max frequency of ul spectrum chunk affected by calibration process";
+        "min/max frequency of UL spectrum chunk affected by calibration process";
     }
     uses antenna-calibration-data {
       description
@@ -431,9 +614,9 @@ module o-ran-antenna-calibration {
     }
 
     description
-      "this notification indicates that coordinated antenna calibration is provided in O-RU.
-       It indicate the time-frequency resources will be sent to a subscribed O-DU at least 60 seconds
-       before the operation of the coordinated antenna calibration procedure.";
+      "this notification indicates that co-ordinated antenna calibration is provided in O-RU.
+       It indicates the time-frequency resources will be sent to a subscribed O-DU at least 60 seconds
+       before the operation of the co-ordinated antenna calibration procedure.";
   }
 
   notification antenna-calibration-result {
@@ -463,4 +646,50 @@ module o-ran-antenna-calibration {
     description
     "This notification indicates the antenna calibration result";
   }
+
+  notification antenna-calibration-multiple-time-resource-params {
+    if-feature "O-RU-COORDINATED-ANT-CAL and O-RU-COORDINATED-ANT-CAL-MULTIPLE-TIME-RESOURCE";
+    leaf antenna-calibration-time-resource-index {
+      type uint8;
+      description
+        "Index to use applicable antenna calibration time resources from the
+        list 'antenna-calibration-multiple-time-resource-list'";
+   }
+   list dl-calibration-frequency-chunk {
+      leaf start-calibration-frequency-dl {
+        type uint64;
+        description
+          "lowest frequency value in Hz of the frequency range is required for
+           DL antenna calibration operation.";
+      }
+      leaf end-calibration-frequency-dl {
+        type uint64;
+        description
+          "highest frequency value in Hz of the frequency range is required for
+           DL antenna calibration operation.";
+      }
+      description
+         "min/max frequency of DL spectrum chunk affected by calibration process";
+    }
+    list ul-calibration-frequency-chunk {
+      leaf start-calibration-frequency-ul {
+        type uint64;
+        description
+          "lowest frequency value in Hz of the frequency range is required for
+           UL antenna calibration operation.";
+      }
+      leaf end-calibration-frequency-ul {
+        type uint64;
+        description
+          "highest frequency value in Hz of the frequency range is required for
+           UL antenna calibration operation.";
+      }
+      description
+        "min/max frequency of UL spectrum chunk affected by calibration process";
+    }
+
+   description
+    "This notification indicates sending parameters related to supporting antenna calibration
+    with multiple time resource";
+  }
 }