Enhance BaseDevice methods with detailed parsing documentation
- Updated the `vlans`, `interfaces`, and `system` methods in the `BaseDevice` class to include comprehensive docstrings outlining expected raw data structures and error handling. - Modified the `Interfaces` model in `contract.py` to allow optional fields for `ip_address` and `mask`, improving flexibility in interface definitions.
This commit is contained in:
@@ -3,8 +3,9 @@ from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class Interfaces(BaseModel):
|
||||
ip_address: IPv4Address
|
||||
mask: int
|
||||
name: str
|
||||
ip_address: IPv4Address | None = None
|
||||
mask: int | None = None
|
||||
description: str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user