Skip to main content

infrahub_sdk.ctl.schema

Functions

callback

callback() -> None

Manage the schema in a remote Infrahub instance.

validate_schema_content_and_exit

validate_schema_content_and_exit(client: InfrahubClient, schemas: list[SchemaFile]) -> None

display_schema_load_errors

display_schema_load_errors(response: dict[str, Any], schemas_data: list[dict]) -> None

handle_non_detail_errors

handle_non_detail_errors(response: dict[str, Any]) -> None

valid_error_path

valid_error_path(loc_path: list[Any]) -> bool

get_node

get_node(schemas_data: list[dict], schema_index: int, node_index: int) -> dict | None

load

load(schemas: list[Path], debug: bool = False, branch: str = typer.Option(None, help='Branch on which to load the schema.'), wait: int = typer.Option(0, help='Time in seconds to wait until the schema has converged across all workers'), _: str = CONFIG_PARAM) -> None

Load one or multiple schema files into Infrahub.

check

check(schemas: list[Path], debug: bool = False, branch: str = typer.Option(None, help='Branch on which to check the schema.'), _: str = CONFIG_PARAM) -> None

Check if schema files are valid and what would be the impact of loading them with Infrahub.