diff --git a/Makefile b/Makefile index cc382e2061..dc0e8dadee 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ interface_definitions: $(config_xml_obj) find $(BUILD_DIR)/interface-definitions -type f -name "*.xml" | xargs -I {} $(CURDIR)/scripts/build-command-templates {} $(CURDIR)/schema/interface_definition.rng $(TMPL_DIR) || exit 1 $(CURDIR)/python/vyos/xml_ref/generate_cache.py --xml-dir $(BUILD_DIR)/interface-definitions || exit 1 + $(CURDIR)/python/vyos/xml_ref/update_cache.py || exit 1 # XXX: delete top level node.def's that now live in other packages # IPSec VPN EAP-RADIUS does not support source-address diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index c83f329b88..eda5d10424 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -580,13 +580,15 @@ Registry Name - - authentication - - username - password - - + + + authentication + + username + password + + + docker.io quay.io diff --git a/schema/interface_definition.rnc b/schema/interface_definition.rnc index 18b8965dea..a44c972629 100644 --- a/schema/interface_definition.rnc +++ b/schema/interface_definition.rnc @@ -20,6 +20,8 @@ # The language of this file is compact form RELAX-NG # https://relaxng.org/compact-tutorial-20030326.html # (unless converted to XML, then just RELAX-NG :) +# +# A useful tool to find errors in the generated schemas can be found at https://www.liquid-technologies.com/online-relaxng-validator # Interface definition starts with interfaceDefinition tag that may contain node tags start = element interfaceDefinition diff --git a/schema/interface_definition.rng b/schema/interface_definition.rng index fd3eb7c767..acbdbfccba 100644 --- a/schema/interface_definition.rng +++ b/schema/interface_definition.rng @@ -24,6 +24,8 @@ The language of this file is compact form RELAX-NG https://relaxng.org/compact-tutorial-20030326.html (unless converted to XML, then just RELAX-NG :) + + A useful tool to find errors in the generated schemas can be found at https://www.liquid-technologies.com/online-relaxng-validator --> diff --git a/src/tests/test_xml_ref.py b/src/tests/test_xml_ref.py index beb5565fdb..7cdeb9d3f5 100644 --- a/src/tests/test_xml_ref.py +++ b/src/tests/test_xml_ref.py @@ -16,24 +16,6 @@ import unittest, sys, pathlib from copy import deepcopy - -# Useful for running only this test as a script instead of waiting for all tests to run, -# also makes it easier to run debuggers in some cases. -if __name__ == "__main__": - root = pathlib.Path(__file__) - root = root.parent.parent.parent - - # Fix import for vyos module in general - p = root.joinpath("python") - print("adding path", p) - sys.path.append(str(p)) - - # Fix import for update_cache - p = root.joinpath("python/vyos/xml_ref") - print("adding path", p) - sys.path.append(str(p)) - - from vyos.configsession import ConfigSessionError from vyos.xml_ref.child_specification import CSChildSpecification @@ -98,20 +80,6 @@ ) class TestChildSpecification(unittest.TestCase): - xml_cache_path = pathlib.Path(__file__).parent.parent.parent.joinpath("python/vyos/xml_ref/cache.py") - created_cache = False - - def setUp(self): - if not self.xml_cache_path.exists(): - from vyos.xml_ref.update_cache import main as updator - - updator() - self.created_cache = True - - def tearDown(self) -> None: - if self.created_cache: - self.xml_cache_path.unlink() - def test_all_good(self): # Verify good config CHILD_SPEC.verify(RPATH, BASE_CONF)