-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fortinet_get_router_info_ospf_status template + test (#1472)
--------- Co-authored-by: pskliarenko <“pskliarenko@bsh.ru”> Co-authored-by: Josh VanDeraa <josh@josh-v.com>
- Loading branch information
1 parent
6823cb9
commit 5687273
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
ntc_templates/templates/fortinet_get_router_info_ospf_status.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Value PROCESS_NAME (.*) | ||
Value PROCESS_ID (\S+) | ||
Value PROCESS_STATUS (.+) | ||
Value ATTACHED_AREAS_NUMBER (\d+) | ||
Value List ATTACHED_AREA (.*) | ||
Value List ATTACHED_AREA_INTERFACES (\S+) | ||
Value List ATTACHED_AREA_FULLY_ADJACENT_NEIGHBORS (\d+) | ||
|
||
|
||
Start | ||
^\s*Routing\s+Process\s+\".*\".* -> Continue.Record | ||
^\s*Routing\s+Process\s+\"${PROCESS_NAME}\"\s+with\s+ID\s+${PROCESS_ID}\s*$$ | ||
^\s*Process\s+is\s+${PROCESS_STATUS}\s*$$ | ||
^\s*Process\s+bound.*$$ | ||
^\s*Conforms\s+to.*$$ | ||
^\s*Supports\s+only.*$$ | ||
^\s*Supports\s+opaque.*$$ | ||
^\s*Do\s+not\s+support\s+Restarting.*$$ | ||
^\s*SPF\s+schedule\s+delay\s+.*$$ | ||
^\s*Refresh\s+timer.*$$ | ||
^\s*Number\s+of\s+incomming\s+current\s+DD\s+exchange\s+neighbors\s+.*$$ | ||
^\s*Number\s+of\s+outgoing\s+current\s+DD\s+exchange\s+neighbors\s+.*$$ | ||
^\s*Number\s+of\s+external\s+LSA\s+\d+\.\s+Checksum\s+.*$$ | ||
^\s*Number\s+of\s+opaque\s+AS\s+LSA\s+\d+\.\s+Checksum\s+.*$$ | ||
^\s*Number\s+of\s+non\-default\s+external\s+LSA\s+.*$$ | ||
^\s*External\s+LSA\s+database\s+.*$$ | ||
^\s*Number\s+of\s+LSA\s+originated.*$$ | ||
^\s*Number\s+of\s+LSA\s+received.*$$ | ||
^\s*Number\s+of\s+areas\s+attached\s+to\s+this\s+router\:\s+${ATTACHED_AREAS_NUMBER}\s*$$ -> Areas | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Areas | ||
^\s*Routing\s+Process\s+\".*\".* -> Continue.Record | ||
^\s*Area\s+(?!has)${ATTACHED_AREA}\s*$$ | ||
^\s*Number\s+of\s+interfaces\s+in\s+this\s+area\s+is\s+${ATTACHED_AREA_INTERFACES}\s*$$ | ||
^\s*Number\s+of\s+fully\s+adjacent\s+neighbors\s+in\s+this\s+area\s+is\s+${ATTACHED_AREA_FULLY_ADJACENT_NEIGHBORS}\s*$$ | ||
^\s*Area\s+has\s+.*$$ | ||
^\s*SPF\s+algorithm\s+last\s+executed\s+.*$$ | ||
^\s*SPF\s+algorithm\s+executed\s+.*$$ | ||
^\s*Number\s+of\s+LSA\s+.*$$ -> Areas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/fortinet/get_router_info_ospf_status/fortinet_get_router_info_ospf_status.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Routing Process "ospf 0" with ID 10.123.105.1 | ||
Process is not up | ||
Process bound to VRF default | ||
Conforms to RFC2328, and RFC1583Compatibility flag is disabled | ||
Supports only single TOS(TOS0) routes | ||
Supports opaque LSA | ||
Do not support Restarting | ||
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs | ||
Refresh timer 10 secs | ||
Number of incomming current DD exchange neighbors 0/5 | ||
Number of outgoing current DD exchange neighbors 0/5 | ||
Number of external LSA 485. Checksum 0xF53F64 | ||
Number of opaque AS LSA 0. Checksum 0x000000 | ||
Number of non-default external LSA 483 | ||
External LSA database is unlimited. | ||
Number of LSA originated 1 | ||
Number of LSA received 1026789 | ||
Number of areas attached to this router: 1 | ||
Area 0.0.0.0 (BACKBONE) | ||
Number of interfaces in this area is 9(11) | ||
Number of fully adjacent neighbors in this area is 2 | ||
Area has no authentication | ||
SPF algorithm last executed 00:00:22.990 ago | ||
SPF algorithm executed 35480 times | ||
Number of LSA 68. Checksum 0x207089 | ||
|
12 changes: 12 additions & 0 deletions
12
tests/fortinet/get_router_info_ospf_status/fortinet_get_router_info_ospf_status.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
parsed_sample: | ||
- process_name: "ospf 0" | ||
process_id: "10.123.105.1" | ||
process_status: "not up" | ||
attached_areas_number: "1" | ||
attached_area: | ||
- "0.0.0.0 (BACKBONE)" | ||
attached_area_interfaces: | ||
- "9(11)" | ||
attached_area_fully_adjacent_neighbors: | ||
- "2" |