Bases: BaseEndpoint
Endpoint for managing VLAN configuration via the AOS CLI API.
create(vlan_id, description=None, mtu=1500)
Create a new VLAN with optional description and MTU.
Parameters: |
-
vlan_id
(int )
–
-
description
(Optional[str] , default:
None
)
–
VLAN name/description. Defaults to “VLAN_{vlan_id}”.
-
mtu
(int , default:
1500
)
–
MTU size for the VLAN. Defaults to 1500.
|
Returns: |
-
ApiResult ( ApiResult
) –
API response, including the updated VLAN list if successful.
|
delete(vlan_id)
Delete a VLAN by its ID.
Returns: |
-
ApiResult ( ApiResult
) –
API response, including the updated VLAN list if successful.
|
edit(vlan_id, description=None, mtu=1500)
Edit an existing VLAN’s description and MTU.
Parameters: |
-
vlan_id
(int )
–
-
description
(Optional[str] , default:
None
)
–
New VLAN name/description. Defaults to “VLAN_{vlan_id}”.
-
mtu
(int , default:
1500
)
–
Updated MTU size. Defaults to 1500.
|
Returns: |
-
ApiResult ( ApiResult
) –
API response, including the updated VLAN list if successful.
|
list()
Retrieve the list of VLANs.
Returns: |
-
ApiResult –
Parsed VLAN data from the switch.
|