1 module o-ran-smo-teiv-common-yang-extensions {
3 namespace "urn:o-ran:smo-teiv-common-yang-extensions";
9 "Topology and Inventory YANG extensions model.
11 Copyright (C) 2024 Ericsson
12 Modifications Copyright (C) 2024 OpenInfra Foundation Europe
14 This model contains extensions to the YANG language that topology and
15 inventory models will use to define and annotate types and relationships.";
17 revision "2024-05-14" {
18 description "Initial revision.";
19 or-teiv-yext:label 0.3.0;
22 extension biDirectionalTopologyRelationship {
24 "Defines a bi-directional relationship in the topology.
26 A bi-directional-association (BDA) is a relationship comprising of an
27 A-side and a B-side. The A-side is considered the originating side of
28 the relationship; the B-side is considered the terminating side of the
29 relationship. The order of A-side and B-side is of importance and MUST
30 NOT be changed once defined.
32 Both A-side and B-side are defined on a type, and are given a role. A
33 type may have multiple originating and/or terminating sides of a
34 relationship, all distinguished by role name.
36 The statement MUST only be a substatement of the 'module' statement.
37 Multiple 'bi-directional-topology-relationship' statements are allowed
40 Substatements to the 'bi-directional-topology-relationship' define the
41 A-side and the B-side, respectively, and optionally properties of the
42 relationship. Data nodes of types 'leaf' and 'leaf-list' are used for
43 this purpose. One of the data nodes MUST be annotated with the 'a-side'
44 extension; another data node MUST be annotated with the 'b-side'
45 extension. Other data nodes define properties of the relationship.
47 The argument is the name of the relationship. The relationship name is
48 scoped to the namespace of the declaring module and MUST be unique
51 argument relationshipName;
56 "Defines the A-side of a relationship.
58 The statement MUST only be a substatement of a 'leaf' or 'leaf-list'
59 statement, which itself must be a substatement of the
60 'uni-directional-topology-relationship' statement.
62 The data type of the parent 'leaf' or 'leaf-list' MUST be
63 'instance-identifier'. Constraints MAY be used as part of the parent
64 'leaf' or 'leaf-list' to enforce cardinality.
66 The identifier of the parent 'leaf' or 'leaf-list' is used as name of
67 the role of the A-side of the relationship. The name of the role is
68 scoped to the type on which the A-side is defined and MUST be unique
71 While the parent 'leaf' or 'leaf-list' does not result in a property of
72 the relationship, it is RECOMMENDED to avoid using the name of an
73 existing type property as role name to avoid potential ambiguities
74 between properties of a type, and roles of a relationship on the type.
76 The argument is the name of the type on which the A-side resides. If the
77 type is declared in another module, the type must be prefixed, and a
78 corresponding 'import' statement be used to declare the prefix.";
85 "Defines the B-side of a relationship.
87 The statement MUST only be a substatement of a 'leaf' or 'leaf-list'
88 statement, which itself must be a substatement of the
89 'uni-directional-topology-relationship' statement.
91 The data type of the parent 'leaf' or 'leaf-list' MUST be
92 'instance-identifier'. Constraints MAY be used as part of the parent
93 'leaf' or 'leaf-list' to enforce cardinality.
95 The identifier of the parent 'leaf' or 'leaf-list' is used as name of
96 the role of the B-side of the relationship. The name of the role is
97 scoped to the type on which the B-side is defined and MUST be unique
100 While the parent 'leaf' or 'leaf-list' does not result in a property of
101 the relationship, it is RECOMMENDED to avoid using the name of an
102 existing type property as role name to avoid potential ambiguities
103 between properties of a type, and roles of a relationship on the type.
105 The argument is the name of the type on which the B-side resides. If the
106 type is declared in another module, the type must be prefixed, and a
107 corresponding 'import' statement be used to declare the prefix.";
113 description "Keyword used to carry domain information.";
119 "The label can be used to give modules and submodules a semantic version, in addition to their revision.
121 The format of the label is āx.y.zā ā expressed as pattern, it is [0-9]+\\.[0-9]+\\.[0-9]+
123 The statement MUST only be a substatement of the revision statement. Zero or one revision label statements
124 per parent statement are allowed.
126 Revision labels MUST be unique amongst all revisions of a module or submodule.";