+++ /dev/null
-module o-ran-hardware {\r
- yang-version 1.1;\r
- namespace "urn:o-ran:hardware:1.0";\r
- prefix "o-ran-hw";\r
-\r
- import ietf-hardware {\r
- prefix hw;\r
- }\r
- import iana-hardware {\r
- prefix ianahw;\r
- }\r
-\r
- organization "O-RAN Alliance";\r
-\r
- contact\r
- "www.o-ran.org";\r
-\r
- description\r
- "This module defines the YANG definitions for managng the O-RAN hardware.\r
-\r
- Copyright 2019 the O-RAN Alliance.\r
-\r
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\r
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- POSSIBILITY OF SUCH DAMAGE.\r
-\r
- Redistribution and use in source and binary forms, with or without\r
- modification, are permitted provided that the following conditions are met:\r
-\r
- * Redistributions of source code must retain the above copyright notice,\r
- this list of conditions and the above disclaimer.\r
- * Redistributions in binary form must reproduce the above copyright notice,\r
- this list of conditions and the above disclaimer in the documentation\r
- and/or other materials provided with the distribution.\r
- * Neither the Members of the O-RAN Alliance nor the names of its\r
- contributors may be used to endorse or promote products derived from\r
- this software without specific prior written permission.";\r
-\r
- revision "2019-07-03" {\r
- description\r
- "version 1.1.0\r
-\r
- 1) added new identities to accommodate cross working group use of\r
- o-ran-hardware and assoicated set of augmentations that are backwards\r
- compatible to version 1.0.0";\r
-\r
- reference "ORAN-WG4.M.0-v01.00";\r
- }\r
-\r
- revision "2019-02-04" {\r
- description\r
- "version 1.0.0\r
-\r
- 1) imported model from xRAN\r
- 2) changed namespace and reference from xran to o-ran";\r
-\r
- reference "ORAN-WG4.M.0-v01.00";\r
- }\r
-\r
- feature ENERGYSAVING {\r
- description\r
- "Indicates that the Radio Unit supports energy saving state.";\r
- }\r
-\r
- // identity statements\r
- identity O-RAN-RADIO {\r
- base ianahw:module;\r
- description\r
- "Module used as it represents a self-contained sub-system\r
- used in /hw:/hardware/hw:component/hw:class to represent\r
- an O-RAN RU";\r
- }\r
-\r
- identity O-RAN-HW-COMPONENT {\r
- base ianahw:module;\r
- description\r
- "Module used as it represents a self-contained sub-system\r
- used in /hw:/hardware/hw:component/hw:class to represent\r
- any O-RAN hardware component";\r
- }\r
-\r
- identity O-DU-COMPONENT {\r
- base O-RAN-HW-COMPONENT;\r
- description\r
- "Used in /hw:/hardware/hw:component/hw:class to represent\r
- any O-RAN defined O-DU hardware component";\r
- }\r
-\r
- identity O-RU-COMPONENT {\r
- base O-RAN-HW-COMPONENT;\r
- description\r
- "Used in /hw:/hardware/hw:component/hw:class to represent\r
- any O-RAN defined O-RU hardware component, including a stand-alone\r
- O-RU or an O-RU component integrated into a multi-module system.";\r
- }\r
-\r
- // typedef statements\r
- typedef energysaving-state {\r
- type enumeration {\r
- enum UNKNOWN {\r
- description "The Radio Unit is unable to report energy saving state.";\r
- }\r
- enum SLEEPING {\r
- description\r
- "The Radio Unit is in a sleep state. The NETCONF management plane\r
- connection is functioning. Other functions and hardware which are\r
- not needed for management plane may be in energy saving mode.";\r
- }\r
- enum AWAKE {\r
- description\r
- "The Radio Unit is not in an energy saving state.";\r
- }\r
- }\r
- description\r
- "new typedef since ietf-hardware only covers pwer-state\r
- for redundancy purposes and not power saving operations.";\r
- }\r
-\r
- typedef availability-type {\r
- type enumeration {\r
- enum UNKNOWN {\r
- description "The Radio Unit is unable to report its availability state.";\r
- }\r
- enum NORMAL {\r
- description\r
- "The equipment is functioning correctly.";\r
- }\r
- enum DEGRADED {\r
- description\r
- "The equipment may be reporting a major alarm or may be reporting a critical\r
- alarm that is only impacting one or more subcomponent, but where the\r
- equipment's implementation permit it to continue operation (server traffic)\r
- in a degraded state.\r
-\r
- Used for example, when the equipment has M identical sub-components and\r
- when a critical alarm is imapcting only N subcomponents, where N<M.";\r
- }\r
- enum FAULTY {\r
- description\r
- "The (sub-)components impacted by the critical alarm(s) impact the\r
- ability of the equipment to continue operation (serve traffic).";\r
- }\r
- }\r
- description\r
- "Equipment's availability-state is derived by matching active faults\r
- and their impact to module's operation and enables an equipment to indicate\r
- that even though it may have one or more critical alarms, it can continue\r
- to serve traffic.";\r
- }\r
-\r
- // common WG4 and croos-WG augmentations using O-RAN-RADIO identity\r
-\r
- augment "/hw:hardware/hw:component" {\r
- when "(derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-RADIO')) or\r
- (derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-HW-COMPONENT'))";\r
- description "New O-RAN parameters for o-ran hardware";\r
-\r
- container label-content {\r
- config false;\r
- description\r
- "Which set of attributes are printed on the Radio Unit's label";\r
- leaf model-name {\r
- type boolean;\r
- description\r
- "indicates whether model-name is included on the equipment's label";\r
- }\r
- leaf serial-number {\r
- type boolean;\r
- description\r
- "indicates whether serial number is included on the equipment's label";\r
- }\r
- }\r
- leaf product-code {\r
- type string;\r
- config false;\r
- mandatory true;\r
- description\r
- "O-RAN term that is distinct from model-name in ietf-hardware.";\r
- }\r
- leaf energy-saving-enabled {\r
- if-feature "ENERGYSAVING";\r
- type boolean;\r
- config true;\r
- default false;\r
- description\r
- "This parameter can enable O-RAN unit to be switched to energy\r
- saving mode.\r
- TRUE indicates to switch the energy saving mode.\r
- FALSE indicates to cancel the energy saving mode.\r
- At the energy saving mode, all power of whole O-RAN unit becomes\r
- lowest level whereas M-plane is still available";\r
- }\r
- }\r
-\r
- augment "/hw:hardware/hw:component" {\r
- when "(derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-RADIO')) or\r
- (derived-from-or-self(hw:class, 'ianahw:port')) or\r
- (derived-from-or-self(hw:class, 'o-ran-hw:O-RAN-HW-COMPONENT'))";\r
- description "New O-RAN parameters for o-ran naming";\r
- leaf o-ran-name {\r
- type leafref {\r
- path "/hw:hardware/hw:component/hw:name";\r
- }\r
- must "re-match(current(),'[a-zA-Z0-9][a-zA-Z0-9\\.\\-_]{0,253}[a-zA-Z0-9]')" {\r
- error-message "Name must match pattern and length.";\r
- }\r
- mandatory true;\r
- description\r
- "O-RAN name needed to bind and match with the name of hw element,\r
- to be compliant with O-RAN naming convention.";\r
- }\r
- }\r
-\r
- augment "/hw:hardware/hw:component/hw:state" {\r
- when "(derived-from-or-self(../hw:class, 'o-ran-hw:O-RAN-RADIO')) or\r
- (derived-from-or-self(../hw:class, 'o-ran-hw:O-RAN-HW-COMPONENT'))";\r
- description\r
- "new O-RAN defined state";\r
- leaf power-state {\r
- if-feature "ENERGYSAVING";\r
- type energysaving-state;\r
- config false;\r
- description\r
- "The current power saving state for this component.\r
- Note - hw:/hardware/compnent/state/standby-state defined in RFC 4268 is\r
- used for redundancy purposes and not power saving operations.";\r
- }\r
- leaf availability-state {\r
- type availability-type;\r
- config false;\r
- description\r
- "Equipment's availability-state is derived by matching active faults\r
- and their impact to module's operation and enables an equipment to indicate\r
- that even though it may have one or more critical alarms, it can continue\r
- to serve traffic.";\r
- }\r
- }\r
-\r
-\r
-// augmentations to Notifications\r
-\r
- augment "/hw:hardware-state-oper-enabled" {\r
- description "new availability state";\r
- leaf availability-state {\r
- type leafref {\r
- path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";\r
- }\r
- description\r
- "The availability-state of the O-RU.";\r
- }\r
- }\r
-\r
- augment "/hw:hardware-state-oper-disabled" {\r
- description "new availability state";\r
- leaf availability-state {\r
- type leafref {\r
- path "/hw:hardware/hw:component/hw:state/o-ran-hw:availability-state";\r
- }\r
- description\r
- "The availability-state of the O-RU.";\r
- }\r
- }\r
-}\r