Skip to content

Commit 69548ed

Browse files
jktjktclaude
andcommitted
tests: bundle core YANG modules now required by ly_ctx_new
Recent libyang moved several core modules (ietf-yang-semver and its transitive deps) out of the statically embedded set and into plain .yang files that ly_ctx_new() loads unconditionally. Without them available in a context's search dirs, every Context(YANG_DIR, ...) call in this test suite fails with "cannot create context" against that libyang version. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
1 parent 49a1e9a commit 69548ed

10 files changed

Lines changed: 2609 additions & 0 deletions

‎tests/yang/default@2025-06-18.yang‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module default {
2+
namespace "urn:ietf:params:xml:ns:netconf:default:1.0";
3+
prefix dflt;
4+
yang-version 1.1;
5+
6+
import ietf-yang-metadata {
7+
prefix md;
8+
revision-date 2016-08-05;
9+
}
10+
11+
organization
12+
"libyang";
13+
14+
contact
15+
"Web: <https://github.com/CESNET/libyang/>
16+
Author: Michal Vasko <mvasko@cesnet.cz>";
17+
18+
description
19+
"This is a dummy module with no data formally supplying the definition
20+
of metadata defined in RFC 6243.";
21+
22+
revision 2025-06-18 {
23+
description
24+
"Initial revision.";
25+
}
26+
27+
md:annotation default {
28+
type boolean;
29+
reference
30+
"RFC 6243 section 6";
31+
description
32+
"This attribute indicates whether the data node represented
33+
by the XML element containing this attribute is considered
34+
by the server to be default data. If set to 'true' or '1', then
35+
the data node is default data. If 'false' or '0', then the
36+
data node is not default data.";
37+
}
38+
}

0 commit comments

Comments
 (0)