From 64367c17e1aa2d5fb79826ce360016b04bf31437 Mon Sep 17 00:00:00 2001 From: sjhloco Date: Thu, 25 Sep 2025 20:05:14 +0000 Subject: [PATCH] Added cisco_ios_show_sdwan_omp_peers --- .../cisco_ios_show_sdwan_omp_peers.textfsm | 23 ++++++++++++++++ ntc_templates/templates/index | 1 + .../cisco_ios_show_sdwan_omp_peers.raw | 9 +++++++ .../cisco_ios_show_sdwan_omp_peers.yml | 26 +++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 ntc_templates/templates/cisco_ios_show_sdwan_omp_peers.textfsm create mode 100644 tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.raw create mode 100644 tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.yml diff --git a/ntc_templates/templates/cisco_ios_show_sdwan_omp_peers.textfsm b/ntc_templates/templates/cisco_ios_show_sdwan_omp_peers.textfsm new file mode 100644 index 0000000000..b41e8e758c --- /dev/null +++ b/ntc_templates/templates/cisco_ios_show_sdwan_omp_peers.textfsm @@ -0,0 +1,23 @@ +Value TENANT (\d+) +Value PEER (\S+) +Value TYPE (\S+) +Value DOMAIN_ID (\d+) +Value OVERLAY_ID (\d+) +Value SITE_ID (\d+) +Value REGION_ID (\S+|None) +Value STATE (\S+) +Value UPTIME (\S+) +Value ROUTES_RECEIVED (\d+) +Value ROUTES_INSTALLED (\d+) +Value ROUTES_SENT (\d+) + +Start + ^R\s+->\s+routes\s+received + ^I\s+->\s+routes\s+installed + ^S\s+->\s+routes\s+sent + ^TENANT\s+DOMAIN\s+OVERLAY\s+SITE\s+REGION + ^ID\s+PEER\s+TYPE\s+ID\s+ID\s+ID\s+ID\s+STATE\s+UPTIME\s+R/I/S + ^\s*--+$$ + ^\s*${TENANT}\s+${PEER}\s+${TYPE}\s+${DOMAIN_ID}\s+${OVERLAY_ID}\s+${SITE_ID}\s+${REGION_ID}\s+${STATE}\s+${UPTIME}\s+${ROUTES_RECEIVED}/${ROUTES_INSTALLED}/${ROUTES_SENT} -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index f39b8a8252..89d21bac29 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -308,6 +308,7 @@ cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-list cisco_ios_show_ip_dhcp_binding.textfsm, .*, cisco_ios, sh[[ow]] ip dh[[cp]] b[[inding]] cisco_ios_show_mpls_interfaces.textfsm, .*, cisco_ios, sh[[ow]] mpls interfa[[ces]] cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]] +cisco_ios_show_sdwan_omp_peers.textfsm, .*, cisco_ios, sh[[ow]] sdw[[an]] om[[p]] pe[[ers]] cisco_ios_show_access-session.textfsm, .*, cisco_ios, show access-s[[ession]] cisco_ios_show_alert_counters.textfsm, .*, cisco_ios, sh[[ow]] alert [[counters]] cisco_ios_show_interface_link.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] li[[nk]] diff --git a/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.raw b/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.raw new file mode 100644 index 0000000000..9470c97238 --- /dev/null +++ b/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.raw @@ -0,0 +1,9 @@ +R -> routes received +I -> routes installed +S -> routes sent + +TENANT DOMAIN OVERLAY SITE REGION +ID PEER TYPE ID ID ID ID STATE UPTIME R/I/S +----------------------------------------------------------------------------------------------------------------- +0 10.94.2.240 vsmart 1 1 142 None up 16:23:52:59 520/383/30 +0 10.94.3.240 vsmart 1 1 242 None up 16:23:52:59 520/0/30 \ No newline at end of file diff --git a/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.yml b/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.yml new file mode 100644 index 0000000000..c234a97ce5 --- /dev/null +++ b/tests/cisco_ios/show_sdwan_omp_peers/cisco_ios_show_sdwan_omp_peers.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - domain_id: "1" + overlay_id: "1" + peer: "10.94.2.240" + region_id: "None" + routes_installed: "383" + routes_received: "520" + routes_sent: "30" + site_id: "142" + state: "up" + tenant: "0" + type: "vsmart" + uptime: "16:23:52:59" + - domain_id: "1" + overlay_id: "1" + peer: "10.94.3.240" + region_id: "None" + routes_installed: "0" + routes_received: "520" + routes_sent: "30" + site_id: "242" + state: "up" + tenant: "0" + type: "vsmart" + uptime: "16:23:52:59"