summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-02-14Add functions for copying and moving nodes.Daniil Baturin
2018-09-02Add support for node renaming.Daniil Baturin
2018-02-18Do not quote values that don't need quoting in Config_tree.renderDaniil Baturin
i.e. if they don't contain whitespace or characters of special significance to the parser (;[]{}#).
2018-02-17Add Config_tree.render_at_level function for correct rendering of configs ↵Daniil Baturin
for human consumption. The idea of the correct (for subsequent parsing) and familiar for all other purposes rendering: * When rendering the entire config, do not render the invisible "root" node, only render its children. * When rendering config at specified path, do not include any nodes that are within the path (e.g. if path "system login" exists, "show system" request output should start with "login {", not "system { login { ...").
2018-02-16Add logging of interface definition file loading.Daniil Baturin
Move the high level load_interface_definitions function from Reference_tree to Startup.
2018-02-11Rename Util.string_of_path to string_of_list since it can be used for any lists,Daniil Baturin
not just config tree paths. Add analogous function for converting a list of strings to JSON.
2017-04-03T255: Add curly config renderer (#8)Shon Feder
* Add stand-alone config_tree renderer * Add tests for stand-alone config_tree renderer * Add renderer with reference tree * Add tests for Config_tree renderer with reftree * Update config files * Add refactoring functions and correct tests
2017-01-17Fix test of loading interface definitions.Daniil Baturin
It was failing because reference tree loader doesn't make guarantess about the order of children in the resulting tree.
2017-01-17T231: Add a function for loading interface definitions from a directory (#5)Shon Feder
* T231: Load directory of interface definitions * T231: Add ounit package to merlin config * T231: Add tests for loading dir of definitions * squash! T231: Load directory of interface definitions * squash! T231: Add tests for loading dir of definitions
2017-01-16Remove the assumptions about validator argument being mandatory.Daniil Baturin
2017-01-16Re-generate RNG schema, update files that use it.Daniil Baturin
2017-01-13T249: add support for inactive and ephemeral nodes to the curly config parser.Daniil Baturin
2017-01-13T254: disallow node names with characters significant to the curly config parserDaniil Baturin
(whitespace, braces, square brackets, quotes, and hash).
2017-01-13A few touches to the curly config lexer and parser.Daniil Baturin
Allow single quoted strings. Allow \r's as whitespace. Set line numbers on \n to enable better error reporting. Allow any non-reserved characters ([^\s\{\}\[\]\"\']) in identifiers and unquoted values.
2017-01-12T245: improve handling of nodes with duplicate names.Daniil Baturin
Two tag nodes with the same name ("ethernet eth0 {...} ethernet eth0 {...}") is an error. Two leaf nodes with the same name, however, are not an error. Values of the next nodes are merged into the first one, while all other data (comment and inactive and ephemeral properties are inherited from the first node. This mimics the old syntax of multi nodes, so a person who uses the old syntax out of habit in a handwritten config will get the result they expect.
2017-01-10Allow valueless nodes in the curly parser.Daniil Baturin
2017-01-09Not quite T245: add some unit tests for the curly parser.Daniil Baturin
2017-01-09T245: add Vytree.merge_children function for de-duplicating childrenDaniil Baturin
that share the same name by merging subsequent nodes into the first one. Bad thing: the comments of the outer nodes will be lost, but then again one should attach them to the inner node anyway, in non-pathological cases.
2017-01-05Remove the old tag node format from the example grammar.Daniil Baturin
2017-01-04Add a grammar for generating curly configs for parser fuzzing tests.Daniil Baturin
Subject to improvement and extension to cover more cases.
2016-12-30Add some unit tests for the Session.string_of_op function.Daniil Baturin
2016-12-30Fix the string_of_path test (square brackets are no longer part of the output).Daniil Baturin
2016-12-23T230: Add missing data access functions to the Reference_tree module with ↵Phil Summers
Unit tests
2016-12-23T230: Add missing data access functions to the Reference_tree module with ↵Phil Summers
unit tests
2016-12-22T226: Add secret and hidden properties to the reference tree.Phil Summers
2016-12-21T225: Added inactive and ephemeral fields to node data in Config_treePhil Summers
2016-12-20Add tests for the Reference_tree.is_multi function.Daniil Baturin
2016-12-20T224: add node comment functionality to the config tree.Daniil Baturin
2016-12-15Add a few missing reference tree test cases for valueless nodes and garbage ↵Daniil Baturin
after the value.
2016-12-15T212: use a directory (normally $program_dir/validators) for external ↵Daniil Baturin
validators. What's bad is that right now way too many things are aware of the nature of external validators, and the validators dir (formerly validators hashtable) is passed around a lot. We'll need to think it through.
2016-12-14T210: Add tests and test data for the vyconfd config loader.Daniil Baturin
2016-12-13Fix a few instances of sloppy sequences (with non-unit expressions).Daniil Baturin
2016-12-07Better test descriptions in vylist test, also add missing test.Daniil Baturin
2015-09-23Add more tests for set and delete.Daniil Baturin
2015-09-23Add delete function to Config_tree, add some tests for it.Daniil Baturin
2015-09-21Update tests for the Vylist API change.Daniil Baturin
2015-09-21Fix multilevel insert logic.Daniil Baturin
2015-06-03Add get_data function, a shortcut for getting a data of node at specified path.Daniil Baturin
Mainly for quickly getting data from a reference tree.
2015-06-03Make tree insert position-aware.Daniil Baturin
Make insertion at the beginning default behaviour. Implement insertion at the end.
2015-05-11Add vytree insertion load test.Daniil Baturin
2015-04-28Rename vyconf_tree_test to just vytree_test.Daniil Baturin
2015-04-28Add Vylist.in_list for quick checks.Daniil Baturin
2015-04-26Add config tree module.Daniil Baturin
2015-04-26Add Vytree.exists for checking if path exists in a tree.Daniil Baturin
2015-04-26Add path validation functionality.Daniil Baturin
2015-04-26Make Value_checker.validate_any return true if constraint list is emptyDaniil Baturin
(i.e. no constraints means anything goes).
2015-04-24Add validate_any to Value_checker for testing if a value passes at least one ↵Daniil Baturin
test.
2015-04-24Trivial reference tree load test.Daniil Baturin
2015-04-24Add test data for reference tree tests.Daniil Baturin
2015-04-24Initial implementation of the reference tree module.Daniil Baturin