From ccd99e9b15fca870135f3cd133cb56c2bf92cda2 Mon Sep 17 00:00:00 2001 From: pskliarenko <“pskliarenko@bsh.ru”> Date: Sun, 10 Sep 2023 23:31:02 +0400 Subject: [PATCH] Template + test --- ntc_templates/templates/index | 1 + .../mikrotik_routeros_system_identity_print.textfsm | 6 ++++++ .../mikrotik_routeros_system_identity_print.raw | 1 + .../mikrotik_routeros_system_identity_print.yml | 3 +++ 4 files changed, 11 insertions(+) create mode 100644 ntc_templates/templates/mikrotik_routeros_system_identity_print.textfsm create mode 100644 tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.raw create mode 100644 tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.yml diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 3a5b516184..4a824f1f70 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -574,6 +574,7 @@ mikrotik_routeros_snmp_community_print_without-paging.textfsm, .*, mikrotik_rout mikrotik_routeros_ipv6_neighbor_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ipv6 neighbor print without-paging mikrotik_routeros_ip_arp_print_without-paging.textfsm, .*, mikrotik_routeros, [[/]]ip arp print without-paging mikrotik_routeros_system_routerboard_print.textfsm, .*, mikrotik_routeros, [[/]]system routerboard print +mikrotik_routeros_system_identity_print.textfsm, .*, mikrotik_routeros, [[/]]sy[[stem]] i[[dentity]] p[[rint]] mikrotik_routeros_ip_route_print_terse.textfsm, .*, mikrotik_routeros, [[/]]ip(v6)? route print terse paloalto_panos_show_running_security-policy.textfsm, .*, paloalto_panos, sh[[ow]] runn[[ing]] security[[-policy]] diff --git a/ntc_templates/templates/mikrotik_routeros_system_identity_print.textfsm b/ntc_templates/templates/mikrotik_routeros_system_identity_print.textfsm new file mode 100644 index 0000000000..d07ad470e1 --- /dev/null +++ b/ntc_templates/templates/mikrotik_routeros_system_identity_print.textfsm @@ -0,0 +1,6 @@ +Value NAME (\S+) + +Start + ^\s*name:\s+${NAME}\s*$$ -> Record + ^\s*$$ + ^. -> Error diff --git a/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.raw b/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.raw new file mode 100644 index 0000000000..f931dae59c --- /dev/null +++ b/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.raw @@ -0,0 +1 @@ + name: Mikrotik-Device_Name diff --git a/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.yml b/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.yml new file mode 100644 index 0000000000..4138af312b --- /dev/null +++ b/tests/mikrotik_routeros/system_identity_print/mikrotik_routeros_system_identity_print.yml @@ -0,0 +1,3 @@ +--- +parsed_sample: + - name: "Mikrotik-Device_Name"