Skip to content

Commit 1f427dc

Browse files
committed
tests BUGFIX missing YANG module
1 parent 4d9bffd commit 1f427dc

1 file changed

Lines changed: 229 additions & 0 deletions

File tree

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
module openconfig-extensions {
2+
3+
yang-version "1";
4+
5+
// namespace
6+
namespace "http://openconfig.net/yang/openconfig-ext";
7+
8+
prefix "oc-ext";
9+
10+
// meta
11+
organization "OpenConfig working group";
12+
13+
contact
14+
"OpenConfig working group
15+
www.openconfig.net";
16+
17+
description
18+
"This module provides extensions to the YANG language to allow
19+
OpenConfig specific functionality and meta-data to be defined.";
20+
21+
oc-ext:openconfig-version "0.6.0";
22+
23+
revision "2024-09-19" {
24+
description
25+
"Add telemetry-atomic-exempt annotation.";
26+
reference "0.6.0";
27+
}
28+
29+
revision "2022-10-05" {
30+
description
31+
"Add missing version statement.";
32+
reference "0.5.1";
33+
}
34+
35+
revision "2020-06-16" {
36+
description
37+
"Add extension for POSIX pattern statements.";
38+
reference "0.5.0";
39+
}
40+
41+
revision "2018-10-17" {
42+
description
43+
"Add extension for regular expression type.";
44+
reference "0.4.0";
45+
}
46+
47+
revision "2017-04-11" {
48+
description
49+
"rename password type to 'hashed' and clarify description";
50+
reference "0.3.0";
51+
}
52+
53+
revision "2017-01-29" {
54+
description
55+
"Added extension for annotating encrypted values.";
56+
reference "0.2.0";
57+
}
58+
59+
revision "2015-10-09" {
60+
description
61+
"Initial OpenConfig public release";
62+
reference "0.1.0";
63+
}
64+
65+
66+
// extension statements
67+
extension openconfig-version {
68+
argument "semver" {
69+
yin-element false;
70+
}
71+
description
72+
"The OpenConfig version number for the module. This is
73+
expressed as a semantic version number of the form:
74+
x.y.z
75+
where:
76+
* x corresponds to the major version,
77+
* y corresponds to a minor version,
78+
* z corresponds to a patch version.
79+
This version corresponds to the model file within which it is
80+
defined, and does not cover the whole set of OpenConfig models.
81+
82+
Individual YANG modules are versioned independently -- the
83+
semantic version is generally incremented only when there is a
84+
change in the corresponding file. Submodules should always
85+
have the same semantic version as their parent modules.
86+
87+
A major version number of 0 indicates that this model is still
88+
in development (whether within OpenConfig or with industry
89+
partners), and is potentially subject to change.
90+
91+
Following a release of major version 1, all modules will
92+
increment major revision number where backwards incompatible
93+
changes to the model are made.
94+
95+
The minor version is changed when features are added to the
96+
model that do not impact current clients use of the model.
97+
98+
The patch-level version is incremented when non-feature changes
99+
(such as bugfixes or clarifications to human-readable
100+
descriptions that do not impact model functionality) are made
101+
that maintain backwards compatibility.
102+
103+
The version number is stored in the module meta-data.";
104+
}
105+
106+
extension openconfig-hashed-value {
107+
description
108+
"This extension provides an annotation on schema nodes to
109+
indicate that the corresponding value should be stored and
110+
reported in hashed form.
111+
112+
Hash algorithms are by definition not reversible. Clients
113+
reading the configuration or applied configuration for the node
114+
should expect to receive only the hashed value. Values written
115+
in cleartext will be hashed. This annotation may be used on
116+
nodes such as secure passwords in which the device never reports
117+
a cleartext value, even if the input is provided as cleartext.";
118+
}
119+
120+
extension regexp-posix {
121+
description
122+
"This extension indicates that the regular expressions included
123+
within the YANG module specified are conformant with the POSIX
124+
regular expression format rather than the W3C standard that is
125+
specified by RFC6020 and RFC7950.";
126+
}
127+
128+
extension posix-pattern {
129+
argument "pattern" {
130+
yin-element false;
131+
}
132+
description
133+
"Provides a POSIX ERE regular expression pattern statement as an
134+
alternative to YANG regular expresssions based on XML Schema Datatypes.
135+
It is used the same way as the standard YANG pattern statement defined in
136+
RFC6020 and RFC7950, but takes an argument that is a POSIX ERE regular
137+
expression string.";
138+
reference
139+
"POSIX Extended Regular Expressions (ERE) Specification:
140+
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04";
141+
}
142+
143+
extension telemetry-on-change {
144+
description
145+
"The telemetry-on-change annotation is specified in the context
146+
of a particular subtree (container, or list) or leaf within the
147+
YANG schema. Where specified, it indicates that the value stored
148+
by the nodes within the context change their value only in response
149+
to an event occurring. The event may be local to the target, for
150+
example - a configuration change, or external - such as the failure
151+
of a link.
152+
153+
When a telemetry subscription allows the target to determine whether
154+
to export the value of a leaf in a periodic or event-based fashion
155+
(e.g., TARGET_DEFINED mode in gNMI), leaves marked as
156+
telemetry-on-change should only be exported when they change,
157+
i.e., event-based.";
158+
}
159+
160+
extension telemetry-atomic {
161+
description
162+
"The telemetry-atomic annotation is specified in the context of
163+
a subtree (container, or list), and indicates that all nodes
164+
within the subtree are always updated together within the data
165+
model. For example, all elements under the subtree may be updated
166+
as a result of a new alarm being raised, or the arrival of a new
167+
protocol message.
168+
169+
Transport protocols may use the atomic specification to determine
170+
optimisations for sending or storing the corresponding data.";
171+
}
172+
173+
extension telemetry-atomic-exempt {
174+
description
175+
"The telemetry-atomic-exempt annotation is specified in the context
176+
of a node or subtree (container, or list), and indicates that the node
177+
or all nodes within the subtree are not always updated together within
178+
the data model of the parent tree. All elements under the subtree may
179+
not be updated as a result of a new alarm being raised, or the arrival
180+
of a new protocol message that updates the parent tree.
181+
182+
This annotation allows parent tree containers with telemetry-atomic
183+
annotation to not be updated when a more frequently updated node or
184+
subtree. For example, a counters container is present.
185+
186+
This extension should only be used when there is a parent that
187+
contains telemetry-atomic extension.";
188+
}
189+
190+
extension operational {
191+
description
192+
"The operational annotation is specified in the context of a
193+
grouping, leaf, or leaf-list within a YANG module. It indicates
194+
that the nodes within the context are derived state on the device.
195+
196+
OpenConfig data models divide nodes into the following three categories:
197+
198+
- intended configuration - these are leaves within a container named
199+
'config', and are the writable configuration of a target.
200+
- applied configuration - these are leaves within a container named
201+
'state' and are the currently running value of the intended configuration.
202+
- derived state - these are the values within the 'state' container which
203+
are not part of the applied configuration of the device. Typically, they
204+
represent state values reflecting underlying operational counters, or
205+
protocol statuses.";
206+
}
207+
208+
extension catalog-organization {
209+
argument "org" {
210+
yin-element false;
211+
}
212+
description
213+
"This extension specifies the organization name that should be used within
214+
the module catalogue on the device for the specified YANG module. It stores
215+
a pithy string where the YANG organization statement may contain more
216+
details.";
217+
}
218+
219+
extension origin {
220+
argument "origin" {
221+
yin-element false;
222+
}
223+
description
224+
"This extension specifies the name of the origin that the YANG module
225+
falls within. This allows multiple overlapping schema trees to be used
226+
on a single network element without requiring module based prefixing
227+
of paths.";
228+
}
229+
}

0 commit comments

Comments
 (0)