Skip to content

Extra attributes should be forbidden in nested Input models #809

@carl-baillargeon

Description

@carl-baillargeon

Nested input models like class BgpAfi(BaseModel) don't inherit from AntaTest.Input meaning they don't forbid extra attributes. This could lead to unexpected behaviors for a user who wants to override a default value but accidently provides the wrong key.

BGP tests for example. If a user provides vrfs instead of vrf, ANTA will silently ignore vrfs and use the default value of vrf. An error should be raised to the user since vrfs is not supported.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions