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

@ -92,7 +92,7 @@ May be set to `null` to disable IPv6 for this VRF, on the parent device.
| Parameter | Type | Default | Description |
| :-------------------- | :-----: | :------ | :------------------------------------------------------------------------------------------------------------------------------ |
| <R/> `source_address` | String | | Device's source IPv6 address for directed queries (ping, traceroute). |
| `force_cidr` | Boolean | `false` | Convert host queries to the highest allowed prefix-length (defined in the <Link to="#access-list"><Code>le</Code></Link> field) |
| `force_cidr` | Boolean | `true` | Convert host queries to the highest allowed prefix-length (defined in the <Link to="#access-list"><Code>le</Code></Link> field) |
| `access_list` | | | <Link to="#access_list">IPv6 Access List Configuration</Link> |
#### `access_list`

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):