Fix working with libyang parsed info

Before now, yang_schema expected that parsed info was available,
however, in most cases it was not:

For YangAccess, we directly manage the context, so we'll just use the
flag needed.

For NetconfAccess, we need to create our custom context and supply it.
This context is treated by libnetconf2 as shared and it won't try to
free it. We will hold a reference to this context via a new member
variable inside NetconfAccess so that it stays alive for the whole
netconf client session.

sysrepo does not support this flag as of now. Simply patching sysrepo to
always use this flag doesn't work (it gives internal errors), so it
needs an upstream patch.

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

  • A C++20 compiler
  • Boost (we're testing with 1.75)
  • cmake for managing the build
  • libyang version 1.0.x built with C++ support (-DGEN_LANGUAGE_BINDINGS=ON) for working with YANG models
  • libnetconf2 version 1.1.x for connecting to NETCONF servers
  • replxx which provides interactive line prompts
  • docopt for CLI option parsing
  • pkg-config for building
  • optionally, Doctest as a C++ unit test framework
  • optionally, trompeloeil for mock objects in C++
  • optionally, sysrepo version 1.4.x for the local sysrepo backend, and for the comprehensive test suite
  • optionally, netopeer2 version 1.1.x for a test suite

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.