pmotools.pmo_engine.pmo_checker module
- class pmotools.pmo_engine.pmo_checker.PMOChecker(pmo_jsonschema: dict | None = None)[source]
Bases:
objectA class to house utilities to help check the formatting of read in PMO files.
- check_for_required_base_fields(pmo_object)[source]
Check that all required base fields are present in a pmo object
- Parameters:
pmo_object – the pmo object to check
- Returns:
return void if passes, otherwise raises an exception
- pmotools.pmo_engine.pmo_checker.load_schema(name: str) dict[source]
Load a JSON schema from the pmotools.schemas package.
- Parameters:
name (str) – The filename of the schema (e.g. “pmo_schema.json”).
- Returns:
Parsed JSON schema as a Python dictionary.
- Return type:
dict
- Raises:
FileNotFoundError – If the schema file does not exist.
json.JSONDecodeError – If the schema file is not valid JSON.
- pmotools.pmo_engine.pmo_checker.load_schema_by_version(version: str) dict[source]
Load a JSON schema from the pmotools.schemas package.
- Parameters:
version (str) – The version of the schema to be loaded (e.g. “1.0.0”, “1.1.0”).
- Returns:
Parsed JSON schema as a Python dictionary.
- Return type:
dict
- Raises:
FileNotFoundError – If the schema file does not exist.
json.JSONDecodeError – If the schema file is not valid JSON.