commit | cf5c636c54e1f10457b89f1ddf21d622f8703e65 | [log] [tgz] |
---|---|---|
author | Jan Kundrát <jan.kundrat@cesnet.cz> | Thu Jan 16 22:54:47 2020 +0100 |
committer | Jan Kundrát <jan.kundrat@cesnet.cz> | Tue Jan 21 14:31:49 2020 +0100 |
tree | bb2f49785da5071f0f41b7b43bcc68a12e8549f3 | |
parent | e56234d2b04e00093e17197c7e328f2dc3dba6fb [diff] |
Accessing NETCONF servers from Python This is pretty basic, but it allows me to read data over NETCONF while returning nice Python types, and to set leaf values as well. That's awesome if you ask me. The "nice Python types" have no way of distinguishing between different integer sizes. I was afraid that this might be a problem, but according to the test, it looks that libnetconf2 (and all the C++ layers in front of that) are happy even when a number is passed in as a string. That's nice. This test requires running "alone" with no other sysrepo- or NETCONF-talking tests in parallel. I do not really know why, but if I'm running this locally (T460s) with high parallelism, I'm getting failures about `ietf-netconf-server` module not being recognized. Strange, perhaps it does not like parallel `sysrepoctl --install` for some reason? Finally, the sanitizer handling is super-ugly, but at least it unbreaks my local workflow. That one also requires an extra fixup touch for libyang: diff --git a/src/common.c b/src/common.c index 7f941196..801a523f 100755 --- a/src/common.c +++ b/src/common.c @@ -37,6 +37,8 @@ API LY_ERR * ly_errno_glob_address(void) { FUN_IN; + static _Thread_local LY_ERR xx; + return &xx; return (LY_ERR *)&ly_errno_glob; } I'm not submitting that upstream because I think the old code is valid as well, and I somehow doubt that upstream would be thrilled by that. Change-Id: I4e81f8ba44700747f9bf719fcba2c460e079babd
This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, and also talk to sysrepo locally.
For building, one needs:
Use an exact commit of any dependencies as specified in submodules/dependencies/*
.
The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install
.
Issue reporting and feature requests are welcome via Taiga.io.
We are using Gerrit for patch submission, code review and Continuous Integration (CI). Development roadmap and planning happens over Taiga.io.
Copyright © CESNET, https://www.cesnet.cz/ . Portions copyright © Faculty of Information Technology, Czech Technical University in Prague, https://fit.cvut.cz/ . Most of the code was written by Václav Kubernát (CESNET, formerly FIT ČVUT) and Jan Kundrát (CESNET). The project is distributed under the terms of the Apache 2.0 license.