diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index e353dec0e1..5cf3412a05 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -695,6 +695,7 @@ linux_ip_vrf_show.textfsm, .*, linux, ip v[[rf]] [[show]] linux_arp_-a.textfsm, .*, linux, arp -a mikrotik_routeros_routing_ospf_neighbor_print_terse_without-paging.textfsm, .*, mikrotik_routeros, [[/]]r[[outing]] o[[spf]] nei[[ghbor]] p[[rint]] t[[erse]] wi[[thout-paging]] +mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip dh[[cp-server]] l[[ease]] pr[[int]] t[[erse]] wi[[thout-paging]] mikrotik_routeros_routing_bgp_peer_print_status_without-paging.textfsm, .*, mikrotik_routeros, [[/]]r[[outing]] bg[[p]] p[[eer]] p[[rint]] s[[tatus]] wi[[thout-paging]] mikrotik_routeros_interface_ethernet_poe_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]in[[terface]] et[[hernet]] po[[e]] pr[[int]] wi[[thout-paging]] mikrotik_routeros_ip_firewall_filter_print_all_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? firewall filter print( all)? without-paging diff --git a/ntc_templates/templates/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.textfsm b/ntc_templates/templates/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.textfsm new file mode 100644 index 0000000000..9a50ca4a0f --- /dev/null +++ b/ntc_templates/templates/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.textfsm @@ -0,0 +1,24 @@ +Value INDEX (\d+) +Value FLAG ([XRDB]+) +Value COMMENT (.*) +Value ADDRESS (\S+) +Value MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) +Value CLIENT_ID (\S+) +Value ADDRESS_LISTS (\S+) +Value SERVER (\S+) +Value ALWAYS_BROADCAST (yes|no) +Value DHCP_OPTION (\S+) +Value STATUS (\S+) +Value EXPIRES_AFTER (\S+) +Value LAST_SEEN (\S+) +Value ACTIVE_ADDRESS (\S+) +Value ACTIVE_MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) +Value ACTIVE_CLIENT_ID (\S+) +Value ACTIVE_SERVER (\S+) +Value HOST_NAME (\S+) +Value SRC_MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) + +Start + ^\s*${INDEX}(?:\s+${FLAG})?(?:\s+comment=${COMMENT})?\s+address=${ADDRESS}(?:\s+mac-address=${MAC_ADDRESS})?(?:\s+client-id=(?:\"?(\b${CLIENT_ID}\b)?\"?))?(?:\s+address-lists=(?:\"?(\b${ADDRESS_LISTS}\b)?\"?))?(?:\s+server=${SERVER})?(?:\s+dhcp-option=(?:\"?(\b${DHCP_OPTION}\b)?\"?))?(?:\s+status=${STATUS})?(?:\s+expires-after=${EXPIRES_AFTER})?(?:\s+last-seen=${LAST_SEEN})?(?:\s+active-address=${ACTIVE_ADDRESS})?(?:\s+active-mac-address=${ACTIVE_MAC_ADDRESS})?(?:\s+active-client-id=(?:\"?(\b${ACTIVE_CLIENT_ID}\b)?\"?))?(?:\s+active-server=${ACTIVE_SERVER})?(?:\s+host-name=(?:\"?(\b${HOST_NAME}\b)?\"?))?(?:\s+src-mac-address=${SRC_MAC_ADDRESS})?\s*$$ -> Record + ^\s*$$ + ^. -> Error diff --git a/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.raw b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.raw new file mode 100644 index 0000000000..c06da360bf --- /dev/null +++ b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.raw @@ -0,0 +1,2 @@ + 0 D address=192.168.69.254 address-lists="" server=*1 dhcp-option="" status=conflict expires-after=6m59s last-seen=35w12h24m42s active-address=192.168.69.254 active-server=*1 src-mac-address=12:34:56:78:90:AB + 1 address=172.16.16.120 mac-address=30:07:4D:F5:07:49 client-id="1:30:7:4d:f5:7:49" address-lists="" server=defconf dhcp-option="" status=bound expires-after=8m55s last-seen=1m5s active-address=172.16.16.120 active-mac-address=30:07:4D:F5:07:49 active-client-id="1:30:7:4d:f5:7:49" active-server=defconf host-name="Galaxy-S8" diff --git a/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.yml b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.yml new file mode 100644 index 0000000000..fd80a5d3b6 --- /dev/null +++ b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.yml @@ -0,0 +1,40 @@ +--- +parsed_sample: + - active_address: "192.168.69.254" + active_client_id: "" + active_mac_address: "" + active_server: "*1" + address: "192.168.69.254" + address_lists: "" + always_broadcast: "" + client_id: "" + comment: "" + dhcp_option: "" + expires_after: "6m59s" + flag: "D" + host_name: "" + index: "0" + last_seen: "35w12h24m42s" + mac_address: "" + server: "*1" + src_mac_address: "12:34:56:78:90:AB" + status: "conflict" + - active_address: "172.16.16.120" + active_client_id: "1:30:7:4d:f5:7:49" + active_mac_address: "30:07:4D:F5:07:49" + active_server: "defconf" + address: "172.16.16.120" + address_lists: "" + always_broadcast: "" + client_id: "1:30:7:4d:f5:7:49" + comment: "" + dhcp_option: "" + expires_after: "8m55s" + flag: "" + host_name: "Galaxy-S8" + index: "1" + last_seen: "1m5s" + mac_address: "30:07:4D:F5:07:49" + server: "defconf" + src_mac_address: "" + status: "bound" diff --git a/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.raw b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.raw new file mode 100644 index 0000000000..043dbd9973 --- /dev/null +++ b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.raw @@ -0,0 +1,3 @@ + 0 comment=UniFi1 address=10.124.3.199 mac-address=74:83:C2:36:5A:6E client-id=1:74:83:c2:36:5a:6e address-lists="" server=dhcp1 dhcp-option=unifi status=bound expires-after=6m51s last-seen=3m9s active-address=10.164.1.199 active-mac-address=74:83:C2:36:5A:6E active-client-id=1:74:83:c2:36:5a:6e active-server=dhcp1 host-name=Unifi3B + 1 comment=PC address=10.124.3.252 mac-address=00:50:56:88:80:EE client-id=1:0:50:56:88:80:ee address-lists="" server=dhcp1 dhcp-option="" status=bound expires-after=6m18s last-seen=3m42s active-address=10.164.1.252 active-mac-address=00:50:56:88:80:EE active-client-id=1:0:50:56:88:80:ee active-server=dhcp1 host-name=RSNC-CLIENT1-VM + 2 comment=SPA address=10.124.3.222 mac-address=C4:0A:CB:BC:65:C8 address-lists="" server=dhcp1 dhcp-option="" status=bound expires-after=5m56s last-seen=4m4s active-address=10.164.1.222 active-mac-address=C4:0A:CB:BC:65:C8 active-client-id=1:c4:a:cb:bc:65:c8 active-server=dhcp1 host-name=SPA122 diff --git a/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.yml b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.yml new file mode 100644 index 0000000000..6f1255ad70 --- /dev/null +++ b/tests/mikrotik_routeros/ip_dhcp-server_lease_print_terse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.yml @@ -0,0 +1,59 @@ +--- +parsed_sample: + - index: "0" + flag: "" + comment: "UniFi1" + address: "10.124.3.199" + mac_address: "74:83:C2:36:5A:6E" + client_id: "1:74:83:c2:36:5a:6e" + address_lists: "" + server: "dhcp1" + always_broadcast: "" + dhcp_option: "unifi" + status: "bound" + expires_after: "6m51s" + last_seen: "3m9s" + active_address: "10.164.1.199" + active_mac_address: "74:83:C2:36:5A:6E" + active_client_id: "1:74:83:c2:36:5a:6e" + active_server: "dhcp1" + host_name: "Unifi3B" + src_mac_address: "" + - index: "1" + flag: "" + comment: "PC" + address: "10.124.3.252" + mac_address: "00:50:56:88:80:EE" + client_id: "1:0:50:56:88:80:ee" + address_lists: "" + server: "dhcp1" + always_broadcast: "" + dhcp_option: "" + status: "bound" + expires_after: "6m18s" + last_seen: "3m42s" + active_address: "10.164.1.252" + active_mac_address: "00:50:56:88:80:EE" + active_client_id: "1:0:50:56:88:80:ee" + active_server: "dhcp1" + host_name: "RSNC-CLIENT1-VM" + src_mac_address: "" + - index: "2" + flag: "" + comment: "SPA" + address: "10.124.3.222" + mac_address: "C4:0A:CB:BC:65:C8" + client_id: "" + address_lists: "" + server: "dhcp1" + always_broadcast: "" + dhcp_option: "" + status: "bound" + expires_after: "5m56s" + last_seen: "4m4s" + active_address: "10.164.1.222" + active_mac_address: "C4:0A:CB:BC:65:C8" + active_client_id: "1:c4:a:cb:bc:65:c8" + active_server: "dhcp1" + host_name: "SPA122" + src_mac_address: ""