Skip to content

Commit

Permalink
Add Fortinet get hardware nic template (#1482)
Browse files Browse the repository at this point in the history
Co-authored-by: pskliarenko <“[email protected]”>
  • Loading branch information
PavloSkliarenko and pskliarenko authored Jul 22, 2024
1 parent e227c97 commit 2f09a14
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ntc_templates/templates/fortinet_get_hardware_nic.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Value NIC (\S+)

Start
^The\s+following\s+NICs\s+are\s+available:\s*$$
^\s*${NIC}\s*$$ -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ fortinet_get_router_info_ospf_status.textfsm, .*, fortinet, g[[et]] r[[outer]] i
fortinet_get_system_ha_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] ha s[[tatus]]
fortinet_get_system_interface.textfsm, .*, fortinet, g[[et]] sy[[stem]] in[[terface]]
fortinet_get_system_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] stat[[us]]
fortinet_get_hardware_nic.textfsm, .*, fortinet, g[[et]] hard[[ware]] n[[ic]]
fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp
fortinet_execute_time.textfsm, .*, fortinet, exec[[ute]] ti[[me]]

Expand Down
9 changes: 9 additions & 0 deletions tests/fortinet/get_hardware_nic/fortinet_get_hardware_nic.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The following NICs are available:
a
lan
lan1
lan2
lan3
npu0_vlink0
npu0_vlink1
wan
10 changes: 10 additions & 0 deletions tests/fortinet/get_hardware_nic/fortinet_get_hardware_nic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- nic: "a"
- nic: "lan"
- nic: "lan1"
- nic: "lan2"
- nic: "lan3"
- nic: "npu0_vlink0"
- nic: "npu0_vlink1"
- nic: "wan"

0 comments on commit 2f09a14

Please sign in to comment.