2020-05-02 23:05:17 -07:00
|
|
|
"""Models common to entire commands module."""
|
|
|
|
|
|
|
|
# Third Party
|
|
|
|
from pydantic import StrictStr
|
|
|
|
|
2020-10-05 12:07:34 -07:00
|
|
|
from ..main import HyperglassModel, HyperglassModelExtra
|
2020-05-02 23:05:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
class CommandSet(HyperglassModel):
|
|
|
|
"""Command set, defined per-AFI."""
|
|
|
|
|
|
|
|
bgp_route: StrictStr
|
|
|
|
bgp_aspath: StrictStr
|
|
|
|
bgp_community: StrictStr
|
|
|
|
ping: StrictStr
|
|
|
|
traceroute: StrictStr
|
|
|
|
|
|
|
|
|
2020-05-29 17:47:53 -07:00
|
|
|
class CommandGroup(HyperglassModelExtra):
|
2020-05-02 23:05:17 -07:00
|
|
|
"""Validation model for all commands."""
|
|
|
|
|
|
|
|
ipv4_default: CommandSet
|
|
|
|
ipv6_default: CommandSet
|
|
|
|
ipv4_vpn: CommandSet
|
|
|
|
ipv6_vpn: CommandSet
|