commit | 3a99f0058754f6b4557fd1fdc41e7b96980180f1 | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Tue Mar 31 02:27:41 2020 +0200 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Mon Apr 06 10:34:20 2020 +0200 |
tree | a3562cffd50eaa9cac632710dbf099c57864dfd9 | |
parent | b6d0275abfb3acdf235872ff380785cd903a85b9 [diff] |
Rework yang::LeafDataType Before this patch, Schema::leafType was used like this: you called the method, and it would give you an enum value from which you could tell the type. In case the type was, for example, yang::LeafDataTypes::Enum, you would call enumValues to get the valid values from the enum. However, this approach came up as a problem when implementing the union yang type. Example: if the union consisted of two different enums, there was no way to differentiate those two enums (so enumValues wouldn't know which one to return). The new approach encodes everything inside the return value of Schema::leafType, so no futher method calls are needed. This also means, that methods like Schema::leafEnumIsValid and others are unneeded, since you get all the info from Schema::leafType. Also, I got rid of all the on_success handlers, and moved the code to inside to impl_LeafData. This means that enum/identityref validity is checked inside there. If I wanted to keep the on_success handlers I would have create another member in ParserContext (which would contain the values), but it doesn't give any advantage, except that it automatically rolls back the iterator on fail (I have to do that myself now, but I don't think it's a huge deal). createSetSuggestions::on_success was also moved to impl_LeafData. Change-Id: Ie9a30174094b73f2c25af8cfc88d0aa5e9e882b3
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.