Cloud

../_images/o-ran-smo-teiv-cloud.svg ../_images/o-ran-smo-teiv-cloud-rel.svg
module o-ran-smo-teiv-cloud {
    yang-version 1.1;
    namespace "urn:o-ran:smo-teiv-cloud";
    prefix or-teiv-cloud;

    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 ietf-geo-location {
        prefix geo;
        reference "RFC 9179: A YANG Grouping for Geographic Locations";
    }

    organization "ORAN";
    contact "The Authors";
    description
        "RAN Cloud topology model.

        This model contains the topology entities and relations in the
        RAN CLOUD domain, which comprises cloud infrastructure and
        deployment aspects that can be used in the topology model.

        Copyright (C) 2024 Ericsson
        Modifications Copyright (C) 2024 OpenInfra Foundation Europe

        Licensed under the Apache License, Version 2.0 (the \"License\");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an \"AS IS\" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.

        SPDX-License-Identifier: Apache-2.0";

    revision "2024-10-04" {
        description "Added groupings, Origin_Entity_Mapping_Grp or Origin_Relationship_Mapping_Grp
        to the corresponding topology objects.";
        or-teiv-yext:label 0.4.0;
    }

    revision "2024-05-02" {
        description "Initial revision.";
        or-teiv-yext:label 0.3.0;
    }

    revision "2024-07-15" {
        description "This revision aligns O-RAN Work Group 10 Stage 2 Specification (O-RAN.WG10.TE&IV-CIMI.0-R004.v02.00)";
        or-teiv-yext:label 0.4.0;
    }

    or-teiv-yext:domain CLOUD;

    list CloudifiedNF {
        description "A RAN Network Function software that is deployed in the O-Cloud via one or more NF Deployments.";

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Entity_Mapping_Grp;
        key id;

        container attributes {
            leaf name {
                description "Name of Cloudified NF";
                type string;
            }
        }
    }

    list NFDeployment {
        description "A software deployment on O-Cloud resources that realizes, all or part of, a Cloudified NF.";

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Entity_Mapping_Grp;
        key id;

        container attributes {
            leaf name {
                description "Name of NF Deployment";
                type string;
            }
        }
    }

    list OCloudNamespace {
        description "OCloudNamespace provide a mechanism for isolating
        groups of resources within a single cluster.";

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Entity_Mapping_Grp;
        key id;

        container attributes {
            leaf name {
                description "Name of Cloud Namespace";
                type string;
            }
        }
    }

    list NodeCluster {
        description "A NodeCluster manages a collection of Nodes.";

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Entity_Mapping_Grp;
        key id;

        container attributes {
            leaf name {
                description "Name of Node Cluster";
                type string;
            }
        }
    }

    list OCloudSite {
        description "Represents the infrastructure that
        hosts the NF Deployment.";

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Entity_Mapping_Grp;
        key id;

        container attributes {
            leaf name {
                description "Name of Cloud Site";
                type string;
            }

            uses geo:geo-location;
        }
    }


    or-teiv-yext:biDirectionalTopologyRelationship CLOUDIFIEDNF_COMPRISES_NFDEPLOYMENT { // 1 to 1..n

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        leaf-list comprised-nFDeployment {
            description "Cloudified NF comprises of these NF Deployment.";
            or-teiv-yext:aSide CloudifiedNF;
            type instance-identifier;
            min-elements 1;
        }

        leaf comprised-by-cloudifiedNF {
            description "NF Deployment part of Cloudified NF.";
            or-teiv-yext:bSide NFDeployment;
            type instance-identifier;
            mandatory true;
        }
    }

    or-teiv-yext:biDirectionalTopologyRelationship NFDEPLOYMENT_DEPLOYED_ON_OCLOUDNAMESPACE { // 1..n to 1..n

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        leaf-list deployed-on-ocloudNamespace {
            description "NF Deployment deployed on O-Cloud Namespace.";
            or-teiv-yext:aSide NFDeployment;
            type instance-identifier;
            min-elements 1;
        }

        leaf-list deployed-nFDeployment {
            description "OCloud Namespace deploys NF Deployment.";
            or-teiv-yext:bSide OCloudNamespace;
            type instance-identifier;
            min-elements 1;
        }
    }

    or-teiv-yext:biDirectionalTopologyRelationship OCLOUDNAMESPACE_DEPLOYED_ON_NODECLUSTER { // 1..n to 1

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        leaf deployed-on-nodeCluster {
            description "O-Cloud Namespace deployed on Node Cluster.";
            or-teiv-yext:aSide OCloudNamespace;
            type instance-identifier;
            mandatory true;
        }

        leaf-list deployed-ocloudNamespace {
            description "Node Cluster deploys O-Cloud Namespace.";
            or-teiv-yext:bSide NodeCluster;
            type instance-identifier;
            min-elements 1;
        }
    }

    or-teiv-yext:biDirectionalTopologyRelationship NODECLUSTER_LOCATED_AT_OCLOUDSITE { // 1..n to 1..n

        uses or-teiv-types:Top_Grp_Type;
        uses or-teiv-types:Origin_Relationship_Mapping_Grp;
        key id;

        leaf-list located-at-ocloudSite {
            description "Node Cluster located at O-Cloud Site.";
            or-teiv-yext:aSide NodeCluster;
            type instance-identifier;
            min-elements 1;
        }

        leaf-list location-of-onodeCluster {
            description "O-Cloud Site is location of Node Cluster.";
            or-teiv-yext:bSide OCloudSite;
            type instance-identifier;
            min-elements 1;
        }
    }
}