interfaces
trestle.core.models.interfaces
¤
Interfaces for use within other trestle functions defined as pydantic data models.
Classes¤
OSCALAssembly (TrestleBaseModel)
pydantic-model
¤
Data model to represent an assembled set of OSCAL objects.
Here the assembly represents the constraints as expected by the current OSCAL schema. At this point in time a 'flat' model has been chosen rather than an tree.
Source code in trestle/core/models/interfaces.py
class OSCALAssembly(TrestleBaseModel):
"""Data model to represent an assembled set of OSCAL objects.
Here the assembly represents the constraints as expected by the current OSCAL
schema. At this point in time a 'flat' model has been chosen rather than an tree.
"""
poam: Optional[o_poam.PlanOfActionAndMilestones] = None
sar: Optional[o_ar.AssessmentResults] = None
sap: Optional[o_ap.AssessmentPlan] = None
ssp: Optional[o_ssp.SystemSecurityPlan] = None
profiles: Optional[Dict[str, o_profile.Profile]] = None
catalogs: Optional[Dict[str, o_catalog.Catalog]] = None
components: Optional[Dict[str, o_component.ComponentDefinition]] = None
class Config:
"""Pydantic config overrides."""
allow_population_by_field_name = True
# Enforce strict schema
extra = Extra.forbid
# Validate on assignment of variables to ensure no escapes
validate_assignment = True
__class_vars__
special
¤
__custom_root_type__
special
¤
__doc__
special
¤
__exclude_fields__
special
¤
__fields__
special
¤
__include_fields__
special
¤
__post_root_validators__
special
¤
__pre_root_validators__
special
¤
__private_attributes__
special
¤
__schema_cache__
special
¤
__signature__
special
¤
__slots__: Tuple[str, ...]
special
¤
__validators__
special
¤
catalogs: Dict[str, trestle.oscal.catalog.Catalog]
pydantic-field
¤
components: Dict[str, trestle.oscal.component.ComponentDefinition]
pydantic-field
¤
poam: PlanOfActionAndMilestones
pydantic-field
¤
profiles: Dict[str, trestle.oscal.profile.Profile]
pydantic-field
¤
sap: AssessmentPlan
pydantic-field
¤
sar: AssessmentResults
pydantic-field
¤
ssp: SystemSecurityPlan
pydantic-field
¤
Classes¤
Config
¤
Pydantic config overrides.
Source code in trestle/core/models/interfaces.py
class Config:
"""Pydantic config overrides."""
allow_population_by_field_name = True
# Enforce strict schema
extra = Extra.forbid
# Validate on assignment of variables to ensure no escapes
validate_assignment = True
handler: python