Skip to content

Commit 5ccd6de

Browse files
committed
Merge branch 'devel'
2 parents 48f9801 + cea8b32 commit 5ccd6de

File tree

201 files changed

+17488
-1830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+17488
-1830
lines changed

CMakeLists.txt

Lines changed: 176 additions & 147 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ master branch. If you want the latest code from the devel branch, install `libya
5858
```
5959
$ mkdir build; cd build
6060
$ cmake ..
61-
$ make
61+
$ make
6262
# make install
6363
```
6464

@@ -125,6 +125,26 @@ The directory path can be also changed runtime via environment variable, e.g.:
125125
$ LIBYANG_EXTENSIONS_PLUGINS_DIR=`pwd`/my/relative/path yanglint
126126
```
127127

128+
#### Optimizations
129+
130+
Whenever the latest revision of a schema is supposed to be loaded (import without specific revision),
131+
it is performed in the standard way, the first time. By default, every other time when the latest
132+
revision of the same schema is needed, the one initially loaded is reused. If you know this can cause
133+
problems meaning the latest available revision of a schema can change during operation, you can force
134+
libyang to always search for the schema anew by:
135+
136+
```
137+
$ cmake -DENABLE_LATEST_REVISIONS=OFF ..
138+
```
139+
140+
Also, it can be efficient to store certain information about schemas that is generated during parsing
141+
so that it does not need to be generated every time the schema is used, but it will consume some
142+
additional space. You can enable this cache with:
143+
144+
```
145+
$ cmake -DENABLE_CACHE=ON ..
146+
```
147+
128148
### CMake Notes
129149

130150
Note that, with CMake, if you want to change the compiler or its options after
@@ -158,7 +178,7 @@ libyang project includes features rich tool called `yanglint(1)` for validation
158178
and conversion of the schemas and YANG modeled data. The source codes are
159179
located at [`/tools/lint`](./tools/lint) and can be used to explore how an
160180
application is supposed to use the libyang library. `yanglint(1)` binary as
161-
well as its man page are installed together with the library itself.
181+
well as its man page are installed together with the library itself.
162182

163183
There is also [README](./tools/lint/examples/README.md) describing some examples of
164184
using `yanglint`.

models/[email protected]

Lines changed: 262 additions & 0 deletions
Large diffs are not rendered by default.

models/[email protected]

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
module ietf-datastores {
2+
yang-version 1.1;
3+
namespace "urn:ietf:params:xml:ns:yang:ietf-datastores";
4+
prefix ds;
5+
6+
organization
7+
"IETF Network Modeling (NETMOD) Working Group";
8+
9+
contact
10+
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
11+
12+
WG List: <mailto:[email protected]>
13+
14+
Author: Martin Bjorklund
15+
16+
17+
Author: Juergen Schoenwaelder
18+
19+
20+
Author: Phil Shafer
21+
22+
23+
Author: Kent Watsen
24+
25+
26+
Author: Rob Wilton
27+
28+
29+
description
30+
"This YANG module defines two sets of identities for datastores.
31+
The first identifies the datastores themselves, the second
32+
identifies datastore properties.
33+
34+
Copyright (c) 2017 IETF Trust and the persons identified as
35+
authors of the code. All rights reserved.
36+
37+
Redistribution and use in source and binary forms, with or
38+
without modification, is permitted pursuant to, and subject to
39+
the license terms contained in, the Simplified BSD License set
40+
forth in Section 4.c of the IETF Trust's Legal Provisions
41+
Relating to IETF Documents
42+
(http://trustee.ietf.org/license-info).
43+
44+
This version of this YANG module is part of RFC XXXX
45+
(http://www.rfc-editor.org/info/rfcxxxx); see the RFC itself
46+
for full legal notices.";
47+
48+
revision 2017-08-17 {
49+
description
50+
"Initial revision.";
51+
reference
52+
"RFC XXXX: Network Management Datastore Architecture";
53+
}
54+
55+
/*
56+
* Identities
57+
*/
58+
59+
identity datastore {
60+
description
61+
"Abstract base identity for datastore identities.";
62+
}
63+
64+
identity conventional {
65+
base datastore;
66+
description
67+
"Abstract base identity for conventional configuration
68+
datastores.";
69+
}
70+
71+
identity running {
72+
base conventional;
73+
description
74+
"The running configuration datastore.";
75+
}
76+
77+
identity candidate {
78+
base conventional;
79+
description
80+
"The candidate configuration datastore.";
81+
}
82+
83+
identity startup {
84+
base conventional;
85+
description
86+
"The startup configuration datastore.";
87+
}
88+
89+
identity intended {
90+
base conventional;
91+
description
92+
"The intended configuration datastore.";
93+
}
94+
95+
identity dynamic {
96+
base datastore;
97+
description
98+
"Abstract base identity for dynamic configuration datastores.";
99+
}
100+
101+
identity operational {
102+
base datastore;
103+
description
104+
"The operational state datastore.";
105+
}
106+
107+
/*
108+
* Type definitions
109+
*/
110+
111+
typedef datastore-ref {
112+
type identityref {
113+
base datastore;
114+
}
115+
description
116+
"A datastore identity reference.";
117+
}
118+
119+
}

0 commit comments

Comments
 (0)