trestle.core.catalog_validator
trestle.core.catalog_validator ¤
Validate catalog by confirming no duplicate param ids.
Attributes¤
logger = logging.getLogger(__name__) module-attribute ¤
Classes¤
CatalogValidator ¤
Bases: Validator
flowchart TD
trestle.core.catalog_validator.CatalogValidator[CatalogValidator]
trestle.core.validator.Validator[Validator]
trestle.core.validator.Validator --> trestle.core.catalog_validator.CatalogValidator
click trestle.core.catalog_validator.CatalogValidator href "" "trestle.core.catalog_validator.CatalogValidator"
click trestle.core.validator.Validator href "" "trestle.core.validator.Validator"
Validator to confirm all param ids in catalog are unique.
Source code in trestle/core/catalog_validator.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
Functions¤
model_is_valid(model, quiet, trestle_root=None) ¤
Test if the model is valid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model | TopLevelOscalModel | A top level OSCAL model. | required |
quiet | bool | Don't report msgs unless invalid. | required |
Returns:
| Type | Description |
|---|---|
bool | True (valid) if it is not a catalog, or it is a catalog and its links are 1:1 with resources. |
Source code in trestle/core/catalog_validator.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
Functions¤
handler: python