Commit 8077a63
committed
port to libyang v4
- the prefix of the "ietf-netconf-with-defaults" module has changed,
- RPC parsing needs a flag to reject unknown input data nodes,
- due to the "printed context" mess, we now need an extra flag to ensure
that we can still access the YANG schema source.
The last item is interesting. We could also read directly from the
on-disk location, but that looks a bit meh. It's also a bit annoying
that one has to change this thing over a lot of places, but I think that
this is much nicer than trying to force a change over an existing
connection (e.g., via a connection-specific call in the Server::Server
ctor which might hit some internal locks depending on how the sysrepo
state look like).
I was considering adding a wrapper for `ly_ctx_get_options()` and a
check in Server::Server, but then I decided that I won't bother.
Oh, and this "disable printed context" is also needed for the RESTCONF
*client* which is used in the unit test. The `lyd_parse_op` cannot parse
notifications *iff* the `notifications` module from RFC 5277 is missing
*and* when the libyang context does not have the "parsed" info from the
`ietf-yang-types` available. The printed context, as provided by
sysrepo, does not have that data available. This is all papered over as
long as the context flag setting works, which is the case with
post-4.2.4 version of sysrepo (still untagged). Yay.
We still set these flags to a single value in all of the unit tests and
in the main() as well to maintain the remaining bits of our sanity, of
course.
Change-Id: I142f650affb53411b5c1dd81311400a2aa6dec20
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/dependencies/+/8990
Bug: CESNET/libyang#2448
Depends-on: sysrepo/sysrepo@6dc56411 parent 4493316 commit 8077a63
File tree
14 files changed
+33
-9
lines changed- src/restconf
- tests
14 files changed
+33
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
794 | 796 | | |
795 | 797 | | |
796 | 798 | | |
797 | | - | |
| 799 | + | |
798 | 800 | | |
799 | 801 | | |
800 | 802 | | |
| |||
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
806 | | - | |
| 808 | + | |
807 | 809 | | |
808 | 810 | | |
809 | 811 | | |
| |||
868 | 870 | | |
869 | 871 | | |
870 | 872 | | |
871 | | - | |
| 873 | + | |
872 | 874 | | |
873 | 875 | | |
874 | 876 | | |
| |||
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
880 | | - | |
| 882 | + | |
881 | 883 | | |
882 | 884 | | |
883 | 885 | | |
| |||
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
935 | | - | |
| 937 | + | |
936 | 938 | | |
937 | 939 | | |
938 | 940 | | |
| |||
0 commit comments