1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fix default juniper commands; fix custom command import; fix incorrect default force_cidr setting

This commit is contained in:
checktheroads
2020-03-22 22:08:29 -07:00
parent 5e91836978
commit 5fc9adf1d4
3 changed files with 12 additions and 12 deletions

View File

@@ -69,7 +69,7 @@ class Commands(HyperglassModel):
"""
obj = Commands()
for (nos, cmds) in input_params.items():
setattr(Commands, nos, Command(**cmds))
setattr(obj, nos, Command(**cmds))
return obj
class CiscoIOS(Command):
@@ -182,26 +182,26 @@ class Commands(HyperglassModel):
"""Validation model for non-default ipv4 commands."""
bgp_route: StrictStr = "show route protocol bgp table inet6.0 {target} detail"
bgp_aspath: StrictStr = 'show route protocol bgp aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp community {target}"
bgp_aspath: StrictStr = 'show route protocol bgp table inet6.0 aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp table inet6.0 community {target}"
ping: StrictStr = "ping inet6 {target} count 5 source {source}"
traceroute: StrictStr = "traceroute inet6 {target} wait 1 source {source}"
class VPNIPv4(Command.VPNIPv4):
"""Validation model for non-default ipv6 commands."""
bgp_route: StrictStr = "show route protocol bgp table {vrf} {target} detail"
bgp_aspath: StrictStr = 'show route protocol bgp table {vrf} aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp table {vrf} community {target}"
bgp_route: StrictStr = "show route protocol bgp table {vrf}.inet.0 {target} detail"
bgp_aspath: StrictStr = 'show route protocol bgp table {vrf}.inet.0 aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp table {vrf}.inet.0 community {target}"
ping: StrictStr = "ping inet routing-instance {vrf} {target} count 5 source {source}"
traceroute: StrictStr = "traceroute inet routing-instance {vrf} {target} wait 1 source {source}"
class VPNIPv6(Command.VPNIPv6):
"""Validation model for non-default ipv6 commands."""
bgp_route: StrictStr = "show route protocol bgp table {vrf} {target} detail"
bgp_aspath: StrictStr = 'show route protocol bgp table {vrf} aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp table {vrf} community {target}"
bgp_route: StrictStr = "show route protocol bgp table {vrf}.inet6.0 {target} detail"
bgp_aspath: StrictStr = 'show route protocol bgp table {vrf}.inet6.0 aspath-regex "{target}"'
bgp_community: StrictStr = "show route protocol bgp table {vrf}.inet6.0 community {target}"
ping: StrictStr = "ping inet6 routing-instance {vrf} {target} count 5 source {source}"
traceroute: StrictStr = "traceroute inet6 routing-instance {vrf} {target} wait 1 source {source}"

View File

@@ -179,7 +179,7 @@ class DeviceVrf4(HyperglassModelExtra):
source_address: IPv4Address
access_list: List[AccessList4] = [AccessList4()]
force_cidr: StrictBool = False
force_cidr: StrictBool = True
class DeviceVrf6(HyperglassModelExtra):
@@ -187,7 +187,7 @@ class DeviceVrf6(HyperglassModelExtra):
source_address: IPv6Address
access_list: List[AccessList6] = [AccessList6()]
force_cidr: StrictBool = False
force_cidr: StrictBool = True
class Vrf(HyperglassModel):