Commit 806be4c
Port to libyang 2
- There is no pretty print parameter for print functions (was LYP_FORMAT
in 1.x). Also there were renamed functions freeing libyang structures
from memory.
- Change test_data_parse_config_json() to be working
cdefs.h: Add lyd_parse_mem() and its parser and validation options.
context.py: Change keyword parameters for parse_data_mem() according
to a parser parameters in libyang2.
data.py: change parser flags, add validation flags. They have been
change and split for parse_*() fuctions in libyang2.
test_data.py: in test_data_parse_config_json(), change comparison data
for assert. There is no "pretty" parameter in libyang2 anymore (its
implicit now) and json data are printed with sorted keys.
However, test_data_parse_config_json() still does not pass because
resulting json have the "number" union listed with numbers as string
not as integer. It looks like a bug in libyang2.
- Function print_mem() needs to be used with with_siblings parameter,
otherwise prints only one unspecified node on the same level.
- Function feature_disable() was removed because there is no replace for
lys_features_disable() in libyang2. The only way how to disable
eparticular feature is to disable all and enable set required features
again.
- Parsed and compiled node schema trees corresponds closely to each
other. In order connecting both together LY_CTX_SET_PRIV_PARSED
context option is set by default. It is necessary for some features
(eg. node type resolving).
- Libyang 2 does not have derived types anymore. All the code refering
derived types removed. Removed also "description()" method, there is
no support for it anymore.
- Function data.print_dict() was rewritten. There is no function like
lys_should_print() in libyang2 thus nodes converted to json cannot be
limited by parameters of this function.
- Parsing edit operation from dictionary is not supported because
libyang2 is able to process LYD_TYPE_RPC_NETCONF operations only from
XML format. The reason is that NETCONF supports XML only.
- Remove functions deprecated in libyang2
- Remove rpcreply argument from data.dict_to_dnode() since this
information type is already know from DataType (lyd_type) structure.
Signed-off-by: Pepa Hajek <hajekpepa@gmail.com>
Signed-off-by: Jean-Sébastien Bevilacqua <jean-sebastien.bevilacqua@6wind.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent 77fe009 commit 806be4c
File tree
26 files changed
+3639
-1359
lines changed- .github/workflows
- cffi
- libyang
- tests
- data
- yang
- ietf
- yolo
26 files changed
+3639
-1359
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
0 commit comments