anta
anta copied to clipboard
Extra attributes should be forbidden in nested Input models
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.