Have configured directives.yaml with the custom command to match provided filter:
mikrotik_bgp_aspath:
name: BGP AS Path
rules:
condition: '^[0-9,^$\]+$'
commands:
'/ip route print detail where bgp-as-path~"{target}" !routing-mark'
'/ipv6 route print detail where bgp-as-path~"{target}" !routing-mark'
field:
description: AS Path Regular Expression, eg 111 or ^222,111\$
validation: '^[0-9,^$\]+$'
The following command works as expected when I test manually:
/ip route print detail where bgp-as-path~"^222,111\$" !routing-mark
PS: Yes, with the trailing backslash before the end of line ($) character. The regex appears to correctly validate, in that I receive no errors when entering ^222,111\$
Expected Behavior
Should return route details
Observed Behavior
Tries momentarily and then reports an error (Something went wrong.).
With HYPERGLASS_DEBUG and HYPERGLASS_DEV_MODE set to 'true' nothing is logged.
Same result when I try only entering the numbers of a random route's ASN.
Input: 13335
This should then be run as:
/ip route print detail where bgp-as-path~"13335" !routing-mark
PS: This command works when I test it manually.
Deployment Type
Manual
Version
v2.0.3
Steps to Reproduce
Have configured directives.yaml with the custom command to match provided filter:
mikrotik_bgp_aspath: name: BGP AS Path rules:
The following command works as expected when I test manually: /ip route print detail where bgp-as-path~"^222,111\$" !routing-mark
PS: Yes, with the trailing backslash before the end of line ($) character. The regex appears to correctly validate, in that I receive no errors when entering ^222,111\$
Expected Behavior
Should return route details
Observed Behavior
Tries momentarily and then reports an error (Something went wrong.).
Configuration
Devices
Logs