Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vyconf: T5083: add childRequirement to reference tree #29

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

thomasfinstad
Copy link

@thomasfinstad thomasfinstad commented Jun 2, 2024

Change Summary

Implements validation of node children, allowing for declarative validation through XML schemas

NOTE: remember to change the container library pinning: https://github.com/vyos/vyos-build/blob/257496d6bf022c36bd13651b247921b2f22c6db6/docker/Dockerfile#L156

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Other (please describe): Added test case

Related Task(s)

https://vyos.dev/T5083

Related PR(s)

vyos/vyos-1x#3575

Proposed changes

How to test

OPAM must be setup to function properly, and dependencies must be installed.

apt-get install -y opam
opam init --auto-setup --disable-sandboxing
eval $(opam env)
make deps

Makefile runs the test case

# make test
+ dune clean
+ rm -rf test/testresults
+ opam install -y .
[WARNING] Running as root is not recommended
[NOTE] Ignoring uncommitted changes in /workspaces/vyos1x-config (`--working-dir' not active).
[vyos1x-config.0.2] synchronised (git+file:///workspaces/vyos1x-config#T5083)
The following actions will be performed:
  - recompile vyos1x-config 0.2*

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   vyos1x-config.0.2
-> installed vyos1x-config.0.2
Done.
+ dune build ./test/
+ cd _build/default/test/             
+ dune exec ./test_vyos1x.bc
Entering directory '/workspaces/vyos1x-config'
Leaving directory '/workspaces/vyos1x-config'
Testing `Test Suite'.                
This run has ID `FS2CCJWK'.

  [OK]          InterfaceDefinitions          0   can greet Tom.
  [OK]          InterfaceDefinitions          1   Generate xml to json cache.

Full test results in `/workspaces/vyos1x-config/_build/default/test/_build/_tests/Test Suite'.
Test Successful in 0.005s. 2 tests run.
+ cd /workspaces/vyos1x-config

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@jestabro
Copy link
Contributor

See comments in companion PR:
vyos/vyos-1x#3575 (review)
This is nice work, inviting further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants