From 8cfa2efbc36d5df9d460d688c5e8209972fb559d Mon Sep 17 00:00:00 2001 From: jeanluc Date: Tue, 7 Nov 2023 21:50:41 +0100 Subject: [PATCH 1/2] Account for mods with singular module_dirs, fix renderers --- src/saltext/cli/__main__.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/saltext/cli/__main__.py b/src/saltext/cli/__main__.py index c0a6486..b1e6e3a 100755 --- a/src/saltext/cli/__main__.py +++ b/src/saltext/cli/__main__.py @@ -46,7 +46,7 @@ "pillar", "proxy", "queue", - "render", + "renderer", "returner", "roster", "runner", @@ -64,6 +64,22 @@ "wrapper", ) +SINGULAR_MODULE_DIRS = ( + "auth", + "cache", + "metaproxy", + "netapi", + "output", + "pillar", + "pkgdb", + "proxy", + "roster", + "sdb", + "thorium", + "wheel", + "wrapper", +) + @click.command() @click.version_option(version=__version__) @@ -253,7 +269,7 @@ def main( for loader_name in loader: templating_context["loader"] = loader_name loader_dir = None - if loader_name in ["sdb"]: + if loader_name in SINGULAR_MODULE_DIRS: loader_dir = loaders_package_path / loader_name.rstrip("s") else: loader_dir = loaders_package_path / (loader_name.rstrip("s") + "s") @@ -276,7 +292,7 @@ def main( loader_dir_module.write_text(loader_module_contents.rstrip() + "\n") loader_unit_tests_dir = None - if loader_name in ["sdb"]: + if loader_name in SINGULAR_MODULE_DIRS: loader_unit_tests_dir = loaders_unit_tests_path / loader_name.rstrip("s") else: loader_unit_tests_dir = loaders_unit_tests_path / (loader_name.rstrip("s") + "s") @@ -299,7 +315,7 @@ def main( loader_unit_test_module.write_text(loader_unit_test_contents.rstrip() + "\n") loader_integration_tests_dir = None - if loader_name in ["sdb"]: + if loader_name in SINGULAR_MODULE_DIRS: loader_integration_tests_dir = loaders_integration_tests_path / loader_name.rstrip("s") else: loader_integration_tests_dir = loaders_integration_tests_path / ( From de9f0c1c64fa92fd83b8f306d048f66cdb6e2538 Mon Sep 17 00:00:00 2001 From: jeanluc Date: Tue, 7 Nov 2023 21:53:14 +0100 Subject: [PATCH 2/2] Add fileserver modules --- src/saltext/cli/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/saltext/cli/__main__.py b/src/saltext/cli/__main__.py index b1e6e3a..650489a 100755 --- a/src/saltext/cli/__main__.py +++ b/src/saltext/cli/__main__.py @@ -36,6 +36,7 @@ "cloud", "engines", "executor", + "fileserver", "grain", "log_handlers", "matchers", @@ -67,6 +68,7 @@ SINGULAR_MODULE_DIRS = ( "auth", "cache", + "fileserver", "metaproxy", "netapi", "output",