Relationship: PHYSICAL RAN — teiv master documentation

# Relationship: PHYSICAL RAN

    module o-ran-smo-teiv-rel-physical-ran {
      yang-version 1.1;
      namespace "urn:o-ran:smo-teiv-rel-physical-ran";
      prefix or-teiv-rel-phyran;

      import o-ran-smo-teiv-common-yang-types { prefix or-teiv-types; }

      import o-ran-smo-teiv-common-yang-extensions { prefix or-teiv-yext; }

      import o-ran-smo-teiv-physical { prefix or-teiv-physical; }

      import o-ran-smo-teiv-ran { prefix or-teiv-ran; }

      organization "O-RAN Alliance";

      contact
        "www.o-ran.org";

      description
        "Physical to RAN Logical topology domain model.

        This model contains the topology relationship between the
        physical domain and the RAN domain.

        Modifications Copyright (C) 2025 OpenInfra Foundation Europe
        Copyright 2025 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
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
        LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
        CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
        POSSIBILITY OF SUCH DAMAGE.

        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,
        this list of conditions and the above disclaimer.
        * Redistributions 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 "2025-04-14" {
            description "Formatting.";
            or-teiv-yext:label 1.1.0;
        }

      revision "2025-02-10" {
        description "Initial revision.";
          or-teiv-yext:label 1.0.0;
          reference "O-RAN.WG10.TE&IV-DM.0-R004-v02.00";
      }

      or-teiv-yext:domain REL_PHYSICAL_RAN;

      or-teiv-yext:biDirectionalTopologyRelationship PHYSICALAPPLIANCE_SERVES_ODUFUNCTION { // 1..n to 1..m
        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        description "The aSide of this relationship is an instance of the PhysicalAppliance type.
        The bSide of this relationship is an instance of the ODUFunction type.";

        leaf-list served-oduFunction {
            type instance-identifier;
            description "ODUFunction served by PhysicalAppliance.";
            or-teiv-yext:aSide or-teiv-physical:PhysicalAppliance;
        }

        leaf-list serving-physicalAppliance {
            type instance-identifier;
            description "PhysicalAppliance serving ODUFunction.";
            or-teiv-yext:bSide or-teiv-ran:ODUFunction;
        }
      }

      or-teiv-yext:biDirectionalTopologyRelationship PHYSICALAPPLIANCE_SERVES_OCUCPFUNCTION { // 1..n to 1..m
        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        description "The aSide of this relationship is an instance of the PhysicalAppliance type.
        The bSide of this relationship is an instance of the OCUCPFunction type.";

        leaf-list served-ocucpFunction {
            type instance-identifier;
            description "OCUCPFunction served by PhysicalAppliance.";
            or-teiv-yext:aSide or-teiv-physical:PhysicalAppliance;
        }

        leaf-list serving-physicalAppliance {
            type instance-identifier;
            description "PhysicalAppliance serving OCUCPFunction.";
            or-teiv-yext:bSide or-teiv-ran:OCUCPFunction;
        }
      }

      or-teiv-yext:biDirectionalTopologyRelationship PHYSICALAPPLIANCE_SERVES_OCUUPFUNCTION { // 1..n to 1..m
        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        description "The aSide of this relationship is an instance of the PhysicalAppliance type.
            The bSide of this relationship is an instance of the OCUUPFunction type.";

        leaf-list served-ocuupFunction {
            type instance-identifier;
            description "OCUUPFunction served by PhysicalAppliance.";
            or-teiv-yext:aSide or-teiv-physical:PhysicalAppliance;
        }

        leaf-list serving-physicalAppliance {
            type instance-identifier;
            description "PhysicalAppliance serving OCUUPFunction.";
            or-teiv-yext:bSide or-teiv-ran:OCUUPFunction;
        }
      }

      or-teiv-yext:biDirectionalTopologyRelationship PHYSICALAPPLIANCE_SERVES_NEARRTRICFUNCTION { // 1..n to 1..m
        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        description "The aSide of this relationship is an instance of the PhysicalAppliance type.
            The bSide of this relationship is an instance of the NearRTRICFunction type.";

        leaf-list served-nearRTRICFunction {
            type instance-identifier;
            description "NearRTRICFunction served by PhysicalAppliance.";
            or-teiv-yext:aSide or-teiv-physical:PhysicalAppliance;
        }

        leaf-list serving-physicalAppliance {
            type instance-identifier;
            description "PhysicalAppliance serving NearRTRICFunction.";
            or-teiv-yext:bSide or-teiv-ran:NearRTRICFunction;
        }
      }
    }