Merge "Update YANG models for OpenFronthaul M-Plane."
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-hardware.yang
@@ -22,9 +22,9 @@ module o-ran-hardware {
     "www.o-ran.org";
 
   description
     "www.o-ran.org";
 
   description
-    "This module defines the YANG definitions for managng the O-RAN hardware.
+    "This module defines the YANG definitions for managing the O-RAN hardware.
 
 
-     Copyright 2020 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
@@ -50,15 +50,51 @@ module o-ran-hardware {
      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 "2020-12-10" {
-  description
-    "version 5.0.0
+  revision "2022-12-05" {
+   description
+     "version 10.1.0
+
+     1) Clarifications for Network Energy Saving";
+
+   reference "ORAN-WG4.M.0-v10.00";
+  }
+
+  revision "2022-08-15" {
+    description
+      "version 10.0.0
+
+      1) introduction of O-RU connector functionality.
+      2) fixing constraints";
+
+    reference "ORAN-WG4.M.0-v10.00";
+  }
+
+  revision "2021-12-01" {
+    description
+      "version 5.2.0
+
+      1) typographical corrections in descriptions.";
 
 
-    1) added date-last-service leaf used in pnfRegistration";
+    reference "ORAN-WG4.M.0-v05.00";
+  }
+
+  revision "2021-03-22" {
+    description
+      "version 5.1.0
+
+      1) typographical corrections in descriptions.";
 
 
-  reference "ORAN-WG4.O1.0-v05.00";
-//update reference
- }
+    reference "ORAN-WG4.M.0-v05.00";
+  }
+
+  revision "2020-12-10" {
+    description
+      "version 5.0.0
+
+      1) added date-last-service leaf used in pnfRegistration";
+
+    reference "ORAN-WG4.M.0-v05.00";
+  }
 
   revision "2020-04-17" {
     description
 
   revision "2020-04-17" {
     description
@@ -68,9 +104,9 @@ module o-ran-hardware {
       2) added new identities for PA and FPGA";
 
     reference "ORAN-WG4.M.0-v03.00";
       2) added new identities for PA and FPGA";
 
     reference "ORAN-WG4.M.0-v03.00";
-   }
+  }
 
 
-   revision "2019-07-03" {
+  revision "2019-07-03" {
     description
       "version 1.1.0
 
     description
       "version 1.1.0
 
@@ -79,16 +115,16 @@ module o-ran-hardware {
       compatible to version 1.0.0";
 
     reference "ORAN-WG4.M.0-v01.00";
       compatible to version 1.0.0";
 
     reference "ORAN-WG4.M.0-v01.00";
-   }
+  }
 
   revision "2019-02-04" {
 
   revision "2019-02-04" {
-   description
-     "version 1.0.0
+    description
+      "version 1.0.0
 
 
-     1) imported model from xRAN
-     2) changed namespace and reference from xran to o-ran";
+      1) imported model from xRAN
+      2) changed namespace and reference from xran to o-ran";
 
 
-   reference "ORAN-WG4.M.0-v01.00";
+    reference "ORAN-WG4.M.0-v01.00";
   }
 
   feature ENERGYSAVING {
   }
 
   feature ENERGYSAVING {
@@ -136,7 +172,7 @@ module o-ran-hardware {
       measurements on a per class basis";
   }
 
       measurements on a per class basis";
   }
 
-    identity O-RU-FPGA {
+  identity O-RU-FPGA {
     base O-RU-COMPONENT;
     description
       "Used in /hw:/hardware/hw:component/hw:class to represent
     base O-RU-COMPONENT;
     description
       "Used in /hw:/hardware/hw:component/hw:class to represent
@@ -144,26 +180,57 @@ module o-ran-hardware {
       measurements on a per class basis";
   }
 
       measurements on a per class basis";
   }
 
+  identity O-RU-CONNECTOR {
+    base ianahw:hardware-class;
+    description
+      "This identity is applicable if the hardware class is some sort
+      of O-RU connector.";
+  }
+
+  identity O-RU-ANTENNA-CONNECTOR {
+    base O-RU-CONNECTOR;
+    description
+      "This identity is applicable if the hardware class is some sort
+      of connector capable of interfacing between an O-RU and some
+      antenna function.";
+  }
+
+  identity O-RU-FEEDER {
+    base O-RU-ANTENNA-CONNECTOR;
+    description
+      "This identity is applicable if the hardware class is an
+      antenna feeder.";
+  }
+
+  identity O-RU-BF-CAL {
+    base O-RU-ANTENNA-CONNECTOR;
+    description
+      "This identity is applicable if the hardware class is for
+      beamforming calibration.";
+  }
+
   // typedef statements
   typedef energysaving-state {
     type enumeration {
       enum UNKNOWN {
   // typedef statements
   typedef energysaving-state {
     type enumeration {
       enum UNKNOWN {
-        description "The Radio Unit is unable to report energy saving state.";
+        description
+          "The O-RU is unable to report its energy saving state.";
       }
       enum SLEEPING {
         description
       }
       enum SLEEPING {
         description
-          "The Radio Unit is in a sleep state. The NETCONF management plane
-           connection is functioning. Other functions and hardware which are
-           not needed for management plane may be in energy saving mode.";
+          "The O-RU is in energy saving state. In this mode M-Plane connection is active. Depending
+          on the O-RU's design - other planes, functions and hardware components which are not needed
+          by the O-RU in energy saving state can be disabled or switched off by the O-RU autonomously.";
       }
       enum AWAKE {
         description
       }
       enum AWAKE {
         description
-          "The Radio Unit is not in an energy saving state.";
+          "The O-RU is not in an energy saving state.";
       }
     }
     description
       }
     }
     description
-      "new typedef since ietf-hardware only covers pwer-state
-      for redundancy purposes and not power saving operations.";
+      "New typedef since ietf-hardware only covers power-state
+      for redundancy purposes, not to indicate energy saving operations.
+      For details please see O-RAN WG4 M-Plane specification, clause 9.1.3 'Modify state'";
   }
 
   typedef availability-type {
   }
 
   typedef availability-type {
@@ -183,7 +250,7 @@ module o-ran-hardware {
            in a degraded state.
 
            Used for example, when the equipment has M identical sub-components and
            in a degraded state.
 
            Used for example, when the equipment has M identical sub-components and
-           when a critical alarm is imapcting only N subcomponents, where N<M.";
+           when a critical alarm is impacting only N subcomponents, where N<M.";
       }
       enum FAULTY {
         description
       }
       enum FAULTY {
         description
@@ -198,7 +265,7 @@ module o-ran-hardware {
        to serve traffic.";
   }
 
        to serve traffic.";
   }
 
-  // common WG4 and croos-WG augmentations using O-RAN-RADIO identity
+  // common WG4 and cross-WG augmentations using O-RAN-RADIO identity
 
   augment "/hw:hardware/hw:component" {
     when "(derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-RADIO')) or
 
   augment "/hw:hardware/hw:component" {
     when "(derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-RADIO')) or
@@ -230,20 +297,29 @@ module o-ran-hardware {
     leaf energy-saving-enabled {
       if-feature "ENERGYSAVING";
       type boolean;
     leaf energy-saving-enabled {
       if-feature "ENERGYSAVING";
       type boolean;
-      config true;
       default false;
       description
       default false;
       description
-        "This parameter can enable O-RAN unit to be switched to energy
-         saving mode.
-         TRUE indicates to switch the energy saving mode.
-         FALSE indicates to cancel the energy saving mode.
-         At the energy saving mode, all power of whole O-RAN unit becomes
-         lowest level whereas M-plane is still available";
+        "This parameter enables the O-RU to enter into energy saving state if there is no need to keep processing
+         paths working.
+         TRUE is used to permit the O-RU to enter energy saving state. If there is still need keep any
+         processing path, functions or HW components working.
+         The O-RU shall keep necessary processing paths working if there is any [tr]x-array-carrier with
+         'state' != DISABLED.
+         There may be also additional implementation-specific conditions which may require keeping processing paths,
+         functions or HW components working.
+         FALSE is used to prohibit the O-RU to enter or to stay in energy saving state. This value is also used
+         to awake the O-RU from sleeping when the O-RU is already in energy saving state. Setting this value has
+         no effect on [tr]x-array-carrier::active.
+         When the O-RU enters energy saving state, the O-RU shall reduce its power consumption to the lowest level
+         whilst M-plane remains available. Ongoing Netconf session(s) shall not be affected when the O-RU enters
+         energy saving state.
+         The O-RU uses RO node power-state to inform if the O-RU is in energy saving state.
+         NETCONF client should set energy-saving-enabled to FALSE to ensure O-RU is ready to immediately activate a carrier.";
     }
     leaf dying-gasp-support {
       type boolean;
     }
     leaf dying-gasp-support {
       type boolean;
-      config false;
       default false;
       default false;
+      config false;
       description
         "indicates whether the O-RU supports the dying gasp
         capability";
       description
         "indicates whether the O-RU supports the dying gasp
         capability";
@@ -289,8 +365,8 @@ module o-ran-hardware {
       config false;
       description
         "The current power saving state for this component.
       config false;
       description
         "The current power saving state for this component.
-        Note - hw:/hardware/compnent/state/standby-state defined in RFC 4268 is
-        used for redundancy purposes and not power saving operations.";
+        Note - hw:/hardware/component/state/standby-state defined in RFC 4268 is
+        used for redundancy purposes but not for power saving operations.";
     }
     leaf availability-state {
       type availability-type;
     }
     leaf availability-state {
       type availability-type;
@@ -303,12 +379,25 @@ module o-ran-hardware {
     }
   }
 
     }
   }
 
+  augment "/hw:hardware/hw:component" {
+    when "(derived-from-or-self(hw:class, 'o-ran-hw:O-RU-ANTENNA-CONNECTOR'))";
+    description "New O-RAN parameters for O-RAN Antenna connectors";
+
+    leaf connector-label {
+      type string;
+      config false;
+      description
+        "the label used to identify the connector on an O-RU ";
+    }
+  }
+
 
 // augmentations to Notifications
 
   augment "/hw:hardware-state-oper-enabled"  {
     description "new availability state";
     leaf availability-state {
 
 // augmentations to Notifications
 
   augment "/hw:hardware-state-oper-enabled"  {
     description "new availability state";
     leaf availability-state {
+    if-feature hw:hardware-state;
       type leafref {
         path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";
       }
       type leafref {
         path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";
       }
@@ -320,6 +409,7 @@ module o-ran-hardware {
   augment "/hw:hardware-state-oper-disabled"  {
     description "new availability state";
     leaf availability-state {
   augment "/hw:hardware-state-oper-disabled"  {
     description "new availability state";
     leaf availability-state {
+     if-feature hw:hardware-state;
       type leafref {
         path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";
       }
       type leafref {
         path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";
       }