anta icon indicating copy to clipboard operation
anta copied to clipboard

Extra attributes should be forbidden in nested Input models

Open carl-baillargeon opened this issue 5 months ago • 0 comments

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.

carl-baillargeon avatar Aug 30 '24 13:08 carl-baillargeon