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
4 files changed
tree: bb2f49785da5071f0f41b7b43bcc68a12e8549f3
  1. .clang-format
  2. .gitmodules
  3. .zuul.yaml
  4. CMakeLists.txt
  5. Doxyfile.in
  6. LICENSE
  7. LICENSE.md
  8. README.md
  9. ci/
  10. cmake/
  11. docs/
  12. src/
  13. submodules/
  14. tests/
README.md

Console interface to NETCONF servers

This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, and also talk to sysrepo locally.

Installation

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.

Bug Reporting

Issue reporting and feature requests are welcome via Taiga.io.

Development

We are using Gerrit for patch submission, code review and Continuous Integration (CI). Development roadmap and planning happens over Taiga.io.

Credits

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.