From aec5da95e18fead4cd95b5698e31bea520b70d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20RIBOT?= Date: Thu, 16 Mar 2023 12:19:23 +0100 Subject: [PATCH] MikroTik RouterOs add management of entry without flags in ip-firewall-address-list template --- ...k_routeros_ip_firewall_address-list_print_terse.textfsm | 2 +- ...k_routeros_ip_firewall_address-list_print_terseIPv4.raw | 1 + ...k_routeros_ip_firewall_address-list_print_terseIPv4.yml | 7 +++++++ ...k_routeros_ip_firewall_address-list_print_terseIPv6.raw | 1 + ...k_routeros_ip_firewall_address-list_print_terseIPv6.yml | 7 +++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/mikrotik_routeros_ip_firewall_address-list_print_terse.textfsm b/ntc_templates/templates/mikrotik_routeros_ip_firewall_address-list_print_terse.textfsm index 720fff3423..fa591c81d9 100644 --- a/ntc_templates/templates/mikrotik_routeros_ip_firewall_address-list_print_terse.textfsm +++ b/ntc_templates/templates/mikrotik_routeros_ip_firewall_address-list_print_terse.textfsm @@ -7,5 +7,5 @@ Value TIMEOUT (\S+) Value DYNAMIC (yes|no) Start - ^\s*${INDEX}\s${FLAGS}\slist=${LIST}\saddress=${ADDRESS}(\screation-time=${CREATION_TIME})?(\stimeout=${TIMEOUT})?(\sdynamic=${DYNAMIC})?.*$$ -> Record + ^\s*${INDEX}\s*${FLAGS}\s*list=${LIST}\saddress=${ADDRESS}(\screation-time=${CREATION_TIME})?(\stimeout=${TIMEOUT})?(\sdynamic=${DYNAMIC})?.*$$ -> Record ^. -> Error diff --git a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.raw b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.raw index 7c16c5324a..f7ae7e87e2 100644 --- a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.raw +++ b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.raw @@ -13,3 +13,4 @@ 12 list=azeazeaze address=192.168.1.3 creation-time=jun/14/2022 06:44:51 13 X list=azeazeaze address=192.168.3.0/24 creation-time=jun/14/2022 07:53:30 14 D list=azeazeaze address=192.168.3.0/24 creation-time=jun/14/2022 07:53:49 timeout=4m52s +15 list=snmp-monitoring-address-list address=85.14.167.234 creation-time=mar/01/2023 13:59:33 diff --git a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.yml b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.yml index b081181caa..1f1fd8797d 100644 --- a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.yml +++ b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv4.yml @@ -105,3 +105,10 @@ parsed_sample: creation_time: "jun/14/2022 07:53:49" timeout: "4m52s" dynamic: "" + - index: "15" + flags: " " + list: "snmp-monitoring-address-list" + address: "85.14.167.234" + creation_time: "mar/01/2023 13:59:33" + timeout: "" + dynamic: "" diff --git a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.raw b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.raw index 1770597d3d..2de0040c86 100644 --- a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.raw +++ b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.raw @@ -5,3 +5,4 @@ 4 D list=azeazeaze address=d4de:e2c0::/26 timeout=7m49s dynamic=yes 5 list=azeazeaze address=e7ba:6ba4:5eb9:4014:37f:d1ab:6d74:ad62/128 dynamic=no 6 X list=azeazeaze address=e7ba:6ba4:5eb9:4014:37f:d1ab:6d74:0/128 dynamic=no + 7 list=ertyhgfgf address=e7bb:6ba4:5eb9:4014:37f:d1ab:6d74:0/128 dynamic=no diff --git a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.yml b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.yml index 8f4a7f151e..da2faa4997 100644 --- a/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.yml +++ b/tests/mikrotik_routeros/ip_firewall_address-list_print_terse/mikrotik_routeros_ip_firewall_address-list_print_terseIPv6.yml @@ -49,3 +49,10 @@ parsed_sample: creation_time: "" timeout: "" dynamic: "no" + - index: "7" + flags: " " + list: "ertyhgfgf" + address: "e7bb:6ba4:5eb9:4014:37f:d1ab:6d74:0/128" + creation_time: "" + timeout: "" + dynamic: "no"