Modules/api: export constraints, filter by inventory

This commit is contained in:
Johannes Kirschbauer
2024-11-19 10:36:29 +01:00
parent cfe9dbf117
commit 3a46119722
3 changed files with 18 additions and 3 deletions

View File

@@ -139,6 +139,7 @@ class ModuleInfo:
categories: list[str]
roles: list[str] | None
features: list[str] = field(default_factory=list)
constraints: dict[str, Any] = field(default_factory=dict)
def get_modules(base_path: str) -> dict[str, str]:
@@ -208,6 +209,7 @@ def get_module_info(
roles=get_roles(module_path),
readme=readme_content,
features=["inventory"] if has_inventory_feature(module_path) else [],
constraints=frontmatter.constraints,
)