okflint.vault module

OKF vault manifest loading and validation.

class okflint.vault.BundleEntry(path, manifest_path)[source]

Bases: object

A bundle entry resolved from the vault manifest.

manifest_path: Path
path: Path
class okflint.vault.VaultConfig(okf_vault_version, name, bundles)[source]

Bases: object

Loaded and validated vault configuration.

bundles: list[BundleEntry]
name: str
okf_vault_version: str | None
exception okflint.vault.VaultError[source]

Bases: Exception

Invalid or unreadable okf-vault.json.

okflint.vault.load_vault(path)[source]

Load and validate an okf-vault.json file.

Resolution rules: - path is absolute or resolved relative to the vault JSON file’s parent. - manifest is resolved relative to the bundle path (not the vault file). - If manifest is absent in an entry, okf-base.yaml is used as default.

Parameters:

path (Path) – Path to the okf-vault.json file.

Return type:

VaultConfig

Returns:

Validated VaultConfig.

Raises:

VaultError – If the file is unreadable, invalid JSON, or violates constraints.