You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the cause is that the index property is defined as optional when it should be required. From `interfaces.py:
classSubinterfaceListEntry(BaseModel):
...
index: Annotated[
Optional[int], Field(alias='srl_nokia-interfaces:index', ge=0, le=9999)
] =None""" The index of the subinterface, or logical interface number """
...
The text was updated successfully, but these errors were encountered:
Thanks @dgethings
this is indeed a known issue; currently pydantify does not set list keys as required fields, and this is something we track as feature for later releases.
Right now, it is up to a users' discretion to set list keys, as omitting them will render the payload incomplete.
The following model attempts to create an untagged IPv4 interface. The
index
property is commented out to demonstrate the problem:When applying the config (using the JSONRPC API used in the
example
dir) using the following context manager:The following output is produced - with logging set to debug level:
If I uncomment the
index=0
line and run the script again I get the following output:I believe the cause is that the
index
property is defined as optional when it should be required. From `interfaces.py:The text was updated successfully, but these errors were encountered: