guides:user:scenarios:cfg_parse_cisco
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| guides:user:scenarios:cfg_parse_cisco [2020/07/29 07:40] – bdorlandt | guides:user:scenarios:cfg_parse_cisco [2024/07/03 12:31] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Config parsing ===== | ||
| + | > <color orange> | ||
| + | |||
| + | /* | ||
| + | Create a new Command job with a desired name. | ||
| + | |||
| + | ==== Command job ==== | ||
| + | < | ||
| + | ! | ||
| + | </ | ||
| + | |||
| + | ==== Job scenario ==== | ||
| + | < | ||
| + | Description Parse config for < | ||
| + | vendor_type := Cisco_IOS | ||
| + | context := interfaces | ||
| + | task := interface_cfg_parse | ||
| + | </ | ||
| + | |||
| + | ==== Parsing template Interfaces_Cisco_IOS ==== | ||
| + | < | ||
| + | [interface] | ||
| + | interface < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ==== Parsing template Interface_details_Cisco_IOS ==== | ||
| + | |||
| + | < | ||
| + | [interface <>] | ||
| + | | ||
| + | ip address < | ||
| + | ip ospf message-digest-key < | ||
| + | ip ospf < | ||
| + | </ | ||
| + | |||
| + | ==== Scenario ==== | ||
| + | < | ||
| + | Description Interface config parsing on < | ||
| + | |||
| + | # Test whether node is live and reachable | ||
| + | reachable -n < | ||
| + | if < | ||
| + | log -m "< | ||
| + | stop | ||
| + | endif | ||
| + | log -m "< | ||
| + | < | ||
| + | log -m " | ||
| + | |||
| + | foreach < | ||
| + | log -m < | ||
| + | < | ||
| + | < | ||
| + | if < | ||
| + | log -m " | ||
| + | endif | ||
| + | endeach | ||
| + | </ | ||
| + | |||
| + | **NOTE**: during the scenario the full configuration is only retrieved once. No matter the amount of parse_run commands you use in the scenario. This way the device will not be overloaded. | ||
| + | */ | ||