diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-12-08 20:31:16 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-12-09 16:58:53 +0100 |
commit | 99fb518fef7d40c20921ce63764e7578d1149fa8 (patch) | |
tree | c2f15f9d552ed00f4cc1b5f8bbf3dbbc30a71b26 /yang | |
parent | Merge pull request #3449 from opensourcerouting/network-wide-transactions (diff) | |
download | frr-99fb518fef7d40c20921ce63764e7578d1149fa8.tar.xz frr-99fb518fef7d40c20921ce63764e7578d1149fa8.zip |
lib, tests: add support for keyless YANG lists
YANG allows lists without keys for operational data, in which case
the list elements are uniquely identified using a positional index
(starting from one).
This commit does the following:
* Remove the need to implement the 'get_keys' and 'lookup_entry'
callbacks for keyless lists.
* Extend nb_oper_data_iter_list() so that it special-cases keyless
lists appropriately. Since both the CLI and the sysrepo plugin
use nb_oper_data_iterate() to fetch operational data, both these
northbound clients automatically gain the ability to understand
keyless lists without additional changes.
* Extend the confd plugin to special-case keyless lists as well. This
was a bit painful to implement given ConfD's clumsy API, but
keyless lists should work ok now.
* Update the "test_oper_data" unit test to test keyless YANG lists in
addition to regular lists.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'yang')
-rw-r--r-- | yang/frr-test-module.yang | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/yang/frr-test-module.yang b/yang/frr-test-module.yang index c02c0a11d..d85b12ea0 100644 --- a/yang/frr-test-module.yang +++ b/yang/frr-test-module.yang @@ -34,8 +34,6 @@ module frr-test-module { } container routes { list route { - key "prefix"; - leaf prefix { type inet:ipv4-prefix; } |