Fix path completion on schema paths

The problem was that the grammar was deisgned wrongly. Before this, we
allowed the parser to leave some part of the string unparsed, if
completion was active. However, that lead to some problems where the
stopped prematurely on data path (because we allowed it to end with
unparsed output) while it was possible, to parse more stuff as a schema
path (for example a list without its keys).

The new grammar is a better take on this: first of all
createPathSuggestions is only used if there is a trailing slash (if
there isn't, the completions get created inside the dataNode parser).
Then, if we are doing completion, we parse characters until a next slash
or space. If there actually is another slash, it means that this type of
path wasn't parsed completely, so this whole path can be possibly parsed
even more with other types of path parsers.

Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/151
Change-Id: I7eb1712b28d987dde1192c8438dd055bed71360a
2 files changed
tree: faa376ad602977c00e0d39929a62eaa881c859ab
  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.