- Updated `pytest` to version 9.0.3 and `responses` to version 0.26.1 in `pyproject.toml`. - Removed the main execution block from the Huawei model for cleaner code structure.
12 lines
335 B
Python
12 lines
335 B
Python
from oxi.interfaces import register_parser
|
|
from oxi.interfaces.base import BaseDevice
|
|
|
|
|
|
@register_parser(["vrp", "huawei"])
|
|
class Huawei(BaseDevice):
|
|
template = "huawei.ttp"
|
|
|
|
def vlans(self) -> list[dict]:
|
|
vlan_ids = self.raw.get("vlans", {}).get("vlan_ids", [])
|
|
return [{"vlan_id": vlan} for vlan in vlan_ids]
|