module o-ran-smo-teiv-common-yang-types {
yang-version 1.1;
namespace "urn:o-ran:smo-teiv-common-yang-types";
prefix or-teiv-types;
import ietf-yang-types { prefix yang; }
import o-ran-smo-teiv-common-yang-extensions { prefix or-teiv-yext; }
import _3gpp-common-yang-types { prefix types3gpp; }
organization "ORAN";
contact "The Authors";
description
"Topology and Inventory common types model.
This model contains re-usable data types that topology and inventory models
will frequently use as part of types and relationships.
Copyright (C) 2024 Ericsson
Modifications Copyright (C) 2024-2025 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 "2025-03-20" {
description "Proposed metadata, decorators and classifiers";
or-teiv-yext:label 1.1.1;
}
revision "2025-02-24" {
description "Renamed Adapter Entity to Origin Entity. Added Geo-Information";
or-teiv-yext:label 1.1.0;
reference "O-RAN.WG10.TE&IV-DM.0-R004-v02.00";
}
revision "2024-10-10" {
description "Initial revision.";
or-teiv-yext:label 1.0.0;
reference "O-RAN.WG10.TE&IV-DM.0-R004-v01.00.00";
}
grouping Top_Grp_Type {
description "Grouping containing the key attribute common to all types. All types MUST use this grouping.";
leaf id {
type string;
description "Unique identifier of topology entities. Represents the Entity Instance Identifier.";
}
}
grouping Origin_Entity_Mapping_Grp {
description "Grouping to identify sourceIds on a topology entity.";
leaf-list sourceIds {
type sourceId;
min-elements 1;
ordered-by user;
description
"An ordered list of identities that represent the set of native
source identifiers for participating entities.
This must be attached to Topology Entity instance, outside of the
declared Topology Entity's attributes. This is exposed to the
consumers and can only be set by the responsible adapter. This
cannot be instantiated, and it MUST NOT be augmented or deviated
in any way, unless stated otherwise.";
}
}
grouping Origin_Relationship_Mapping_Grp {
description "Grouping to identify sourceIds on a topology relationship.";
leaf-list sourceIds {
type sourceId;
min-elements 2;
ordered-by user;
description
"An ordered list of identities that represent the set of native
source identifiers for participating entities in the relationship.
This must be attached to the Topology Relation instance, outside of the
declared Topology Relationship's attributes. This is exposed to the
consumers and can only be set by the responsible adapter. This
cannot be instantiated, and it MUST NOT be augmented or deviated in
any way, unless stated otherwise.";
}
}
typedef sourceId {
type string;
description "An identity that represents a native identifier of a topology entity.";
}
grouping GeoInformation {
description "A physical location with address and coordinates.";
leaf address {
type string;
description "Address of the physical location.";
}
container coordinate {
uses types3gpp:GeoCoordinateGrp;
description "Geographical coordinate containing Latitude, Longitude and Altitude. Reference: 3GPP TS 28.622";
}
}
container metadata {
description
"This container serves as an extension point to define metadata. They
can only be defined in name value pairs.
This must be attached to the Topology Entity or Topology Relation instance,
outside of the declared Topology Entity or Topology Relationship's
attributes. This is exposed to the consumers and can only be set by
Topology and Inventory Exposure Handling and Discovery and Reconciliation Adapter.
This cannot be instantiated, and it MUST NOT be augmented or deviated in any way,
unless stated otherwise.";
leaf reliabilityIndicator {
type enumeration {
enum OK {
description "The data is in alignment with the source of truth,
as far as Topology and Inventory Exposure Handling is aware.";
value 0;
}
enum RESTORED {
description "The data was restored from backup and the responsible
adapters are checking to ensure the data is current.";
value 1;
}
enum ADVISED {
description "Entity implicitly created by Topology and Inventory Exposure
Handling and potentially not aligned with the source of truth.";
value 2;
}
}
}
leaf firstDiscovered {
type yang:date-and-time;
description "Timestamp indicating when an instance of Topology Entity or Relation
was first represented in Topology and Inventory Exposure Handling via discovery.";
}
leaf lastModified {
type yang:date-and-time;
description "Timestamp indicating when an instance of Topology Entity or Relation
was last updated (excluding classifiers and decorators).";
}
}
container decorators {
description
"This container serves as extension point for applications wishing
to define their own decorators. This is done via augmentations. They
can only be defined in name value pair.
This is a consumer data and can be attached to Topology Entity or
Topology Relation instance, outside of the declared Topology Entity
or Topology Relationship's attributes. This cannot be instantiated,
and it MUST NOT be augmented or deviated in any way, unless stated
otherwise.";
}
leaf-list classifiers {
description
"Consumer defined tags to topology entities and relationships.
This is a consumer data and can be attached to Topology Entity or
Topology Relation instance, outside of the declared Topology Entity
or Topology Relationship's attributes. This cannot be instantiated,
and it MUST NOT be augmented or deviated in any way, unless stated
otherwise.";
type identityref { base classifier; }
}
identity classifier {
description "The classifier is used as a base to provide all classifiers
with identity. ";
}
}