Skip to content

Commit

Permalink
3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
laimaretto committed Sep 27, 2022
1 parent 15191b8 commit 03ef2b4
Show file tree
Hide file tree
Showing 147 changed files with 497 additions and 496 deletions.
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This idea was born because of the need for a simple tool in order to automate the execution of simple log analysis obtained from Nokia SROS routers. The tool reads the content of a log in `txt` or `json` format, parses only pre defined variables and does the comparison, thus verifying if there are changes in such variables . The logs are generated by the use of [taskAutom](https://github.com/laimaretto/taskAutom).

## Setup ##
# Setup ##

#### System Libraries
These libraries have been tested under Ubuntu 20.04 and Python3.8.
Expand All @@ -19,17 +19,34 @@ python3 -m nuitka logAnalizer.py
```
Compiling has been tested succesfully under Ubuntu. Don't know if this is directly supported under Windows. If it fails, let me know. Nevertheless, as mentioned, you can run `logAnalyzer_win` directly from the CLI using Python

## Usage
# Usage

The program needs two mandatory inputs:
- a folder which contains the parsing templates, either in `textFSM` or `ttp` format;
- a folder, which contains the logs obtained a router, via [`taskAutom`](https://github.com/laimaretto/taskAutom). Though not mandatory, `taskAutom` is suggested as a way of obtaining the logs, because these can be stored in a json file.
- a folder, which contains the logs obtained a router, via [`taskAutom`](https://github.com/laimaretto/taskAutom). Though not mandatory, `taskAutom` is suggested as a way of obtaining the logs, because these can be stored in a `json` file.

### Templates

The templates are stored by default under the `Templates/` folder. The script reads the CSV and uses the indicated templates to perform the function of parsing.
The templates are stored by default under the `Templates/` folder. logAnalyzer reads either the CSV or the template folder to perform the function of parsing.

##### CSV
Inside each template file, one can include control variables. Also, some mandatory comments are needed.

#### - Mandatory
```#Command: /show router bgp summary```

The above is neede in each template file to let logAnalyzer know which command we are trying to parse. We could use some variables as well, suche as `#Command: /show router \S+ interface`.

#### - Optional
```
#filterAction:exclude or include-only
#filterColumns:Var1,Var2,Var3
#majorDown:String1,String2
```
These are control keywords. The control keyword `#filterAction` allows only the actions `exclude` or `include-only`. This will modify the resulting columns of the report. The resulting columns sholud be declared under the control keyword `#filterColumns`.

The keyword `#majorDown` allows us to declared a number of template-specific keywords that logAnalyzer will look for when processing the outputs. So, for example, if our output should be considerd as `down` when the string `connect` is seen, then `connect` should be placed in `#majorDown`.

### CSV

It is possible to use a CSV file, that includes the specific templates to be used in the analysys.

Expand All @@ -40,7 +57,7 @@ show_service_sdp.template
```
If omitted, all the templates insisde the templates folder, will be used.

## Results
# Results

If `logAnalyzer` is invoked only with option `-pre`, reads the specific content in the log folder for a given command and then saves the results in an Excel report. We need to specify format of the logs, either `-json yes|no` and also the parsing engine, either `-te textFSM|ttp`. Also, the folder where the templates are located, with `-tf Folder`.

Expand Down Expand Up @@ -99,7 +116,7 @@ optional arguments:
If set, use this folder of templates for POST logs. Default=Templates/
-te {ttp,textFSM}, --templateEngine {ttp,textFSM}
Engine for parsing. Default=textFSM.
-ri {name,ip,both}, --routerId {name,ip,both}
Router Id to be used within the tables in the Excel report. Default=name.
-v, --version Version


```
5 changes: 2 additions & 3 deletions Templates/nokia_sros_Name.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#Description: This template is an example to find out the router name
#Variables: Router_Name
#Autor: Manuel Saldivar [email protected]
Value Fillup NAME (\S+)

Start
^\w:${NAME}(#|>) echo SCRIPT_NONO_START
^.\w:${NAME}(#|>) echo SCRIPT_NONO_START
^\w:\S+(#|>) echo SCRIPT_NONO_START
^.\w:\S+(#|>) echo SCRIPT_NONO_START
5 changes: 2 additions & 3 deletions Templates/nokia_sros_Ping.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
#Description: This template is used to see the result of ping
#Variables: Router_Name IP_TO_HOST DATA_BYTES PACKETS_TRANSMITTED PACKETS_RECEIVED PERC_PACKET_LOSS
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Required IP_TO_HOST ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value Required DATA_BYTES (\w{1,3})
Value PACKETS_TRANSMITTED (\w+)
Value PACKETS_RECEIVED (\w+)
Value PERC_PACKET_LOSS (\w+.)

Start
^\w:${NAME}(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
^.\w:${NAME}(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
^\w:\S+(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
^.\w:\S+(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}
^PING\s${IP_TO_HOST}\s${DATA_BYTES} -> Continue
^${PACKETS_TRANSMITTED}\spackets\stransmitted.\s${PACKETS_RECEIVED}\spackets\sreceived.\s${PERC_PACKET_LOSS} -> Record
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#Description: This template is used to find out the telnet option on router's configuration
#Variables: Router_Name Telnet-Server
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value telnet_activo (telnet-server)

Start
^\w:${NAME}(#|>) /admin display config
^.\w:${NAME}(#|>) /admin display config
^\w:\S+(#|>) /admin display config
^.\w:\S+(#|>) /admin display config
^\s+${telnet_activo}
5 changes: 2 additions & 3 deletions Templates/nokia_sros_config-policy_Etapa2_Seam.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to find out seamless policy configuration, this template was created for a specific configuration
#Variables: Router_Name Prefix-list Prefix Community_Inter Community_Area
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value prefix_list (\S+)
Value prefix ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value communityINTER (\S+.\S+)
Expand All @@ -21,8 +20,8 @@ Value next-hop-self (next-hop-self)
Value default-action (\S+)

Start
^\w:${NAME}(#|>) /configure router policy-options
^.\w:${NAME}(#|>) /configure router policy-options
^\w:\S+(#|>) /configure router policy-options
^.\w:\S+(#|>) /configure router policy-options
^\s+begin
^\s+prefix-list\s${prefix_list}
^\s+prefix\s${prefix}/32\sexact
Expand Down
7 changes: 3 additions & 4 deletions Templates/nokia_sros_etapa1seamless.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to find out version of TiMOS and BGP configuration, this template was created for a specific BGP configuration
#Variables: Router_Name Version group family type import export bfd_7250 peer_as add_paths add_paths_conf add_paths_conf1 aigp neighbor description advertise_label family_label next_hop bfd_enable
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Filldown Version (TiMOS\S+)
Value group (\S+)
Value family (ipv4)
Expand All @@ -23,8 +22,8 @@ Value next_hop (next-hop-self)
Value bfd_enable (bfd-enable)

Start
^\w:${NAME}(#|>) /show version
^.\w:${NAME}(#|>) /show version
^\w:\S+(#|>) /show version
^.\w:\S+(#|>) /show version
^${Version}
^\s+group\s${group}
^\s+family\s${family}
Expand All @@ -43,5 +42,5 @@ Start
^\s+family\s${family_label} -> Continue
^\s+${next_hop} -> Continue
^\s+${bfd_enable} -> Continue
^\w:${NAME}#>config>router>bgp# exit -> Record
^\w:\S+#>config>router>bgp# exit -> Record

5 changes: 2 additions & 3 deletions Templates/nokia_sros_oam_svc-ping.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to see the result of ping over sdp tunnel
#Variables: Router_Name Service_ID_INIT Type_Local Type_Remote Admin_State_Local Admin_State_Remoto Oper_State_Local Admin_State_Remoto Service_MTU_Local Service_MTU_Remoto IP_Interface_State Actual_IP_Addr_Local Actual_IP_Addr_Remoto SDP_Path_Used_Local SDP_ID_Local SDP_ID_Remoto SDP_Admin_State_Local SDP_Admin_State_Remoto SDP_Oper_State_Local SDP_Oper_State_Remoto Binding_VC_ID_Local Binding_VC_ID_Remoto Request_Result
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Key,Required Service_ID_INIT ([0-9]{1,15})
Value Type_Local (\S+)
Value Type_Remote (\S+)
Expand All @@ -28,8 +27,8 @@ Value Binding_VC_ID_Remoto (\S+)
Value Request_Result (.+)

Start
^\w:${NAME}(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp
^.\w:${NAME}(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp
^\w:\S+(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp
^.\w:\S+(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp
^Service-ID:\s${Service_ID_INIT}
^\s+Type:\s+${Type_Local}\s+${Type_Remote}
^\s+Admin\sState:\s+${Admin_State_Local}\s+${Admin_State_Remoto} -> Continue
Expand Down
5 changes: 2 additions & 3 deletions Templates/nokia_sros_show_port_.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to see the information about physical port
#Variables: NAME, port, Description, OperSpeed, ConfigSpeed, AdminState, OperDuplex, OperState, ConfigDuplex, PhysicalLink, MTU, SingleFiberMode, ConfiguredMode, EncapType, AutoNegotiate, MDI_MDX, EgressRate, IngressRate, TransceiverType, ModelNumber, TXLaserWavelength, ConnectorCode, SerialNumber, PartNumber, OpticalCompliance, LinkLengthsupport, SFPSyncECapable, TxOutPwr_dBm_VALUE, TxOutPwr_dBm_HighAlarm, TxOutPwr_dBm_HighWarn, TxOutPwr_dBm_LowWarn, TxOutPwr_dBm_LowAlarm, RxInPwr_dBm_VALUE, RxInPwr_dBm_HighAlarm, RxInPwr_dBm_HighWarn, RxInPwr_dBm_LowWarn, RxInPwr_dBm_LowAlarm
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Required port (\S+)
Value Description (.+)
Value OperSpeed (.+)
Expand Down Expand Up @@ -41,8 +40,8 @@ Value RxInPwr_dBm_LowWarn (\S+)
Value RxInPwr_dBm_LowAlarm (\S+)

Start
^\w:${NAME}(#|>) /show port \S+
^.\w:${NAME}(#|>) /show port \S+
^\w:\S+(#|>) /show port \S+
^.\w:\S+(#|>) /show port \S+
^Description\s+:\s${Description}
^Interface\s+:\s${port}\s+Oper\sSpeed\s+:\s${OperSpeed}
^Link.level\s+:\s\S+\s+Config\sSpeed\s+:\s${ConfigSpeed}
Expand Down
18 changes: 18 additions & 0 deletions Templates/nokia_sros_show_port_v2.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#Command: /show port
Value Filldown Slot (\S+)
Value Required Port_ID (\S+)
Value Adm_State ([uU][pP]|[Dd][oO][wW][nN])
Value Link (\S+)
Value Port_State ([uU][pP]|[Dd][oO][wW][nN])
Value Cfg_MTU (\S+)
Value Oper_MTU (\S+)
Value LAG_Bndl (\S+|\-)
Value Port_Mode (\S+)
Value Port_Encp (\S+)
Value Port_Type (\S+)
Value C_QS_S_XP (.+)

Start
^.?\w:\S+(#|>) /?show port
^Ports on Slot ${Slot} -> Continue.Record
^${Port_ID}\s+${Adm_State}\s+${Link}\s+${Port_State}\s+${Cfg_MTU}\s+${Oper_MTU}\s+${LAG_Bndl}\s+${Port_Mode}\s+${Port_Encp}\s+${Port_Type}\s+${C_QS_S_XP} -> Continue.Record
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
#Description: This template is used to see the number of base routes
#Variables: Router_Name NO_OF_ROUTES
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Required command (router\sroute-table)
Value Required NO_OF_ROUTES ([0-9]{0,10})

Start
^\w:${NAME}(#|>) /show router route-table | match No.
^.\w:${NAME}(#|>) /show router route-table | match No.
^\w:\S+(#|>) /show router route-table | match No.
^.\w:\S+(#|>) /show router route-table | match No.
^/show\s${command} | match No.
^No.\sof\sRoutes:\s${NO_OF_ROUTES} -> Record

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
#Description: This template is used to see bgp routes ipv4 to CSR nexthop
#Variables: Router_Name IP_CSR Nexthop Res_Nexhop
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Filldown IP_CSR ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value Required Nexthop ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value Res_Nexhop ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})

Start
^\w:${NAME}(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop
^.\w:${NAME}(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop
^\w:\S+(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop
^.\w:\S+(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop
^Nexthop\s+:\s${Nexthop} -> Continue
^Res.\sNexthop\s+:\s${Res_Nexhop} -> Continue.Record
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Command: /show router bgp routes \S+
#Variables Router_Name family BGP_Router_ID AS Local_AS Flag Network LocalPref MED Next_Hop Path_id Label As_Path
#Autor Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Filldown family (\S+)
Value Filldown BGP_Router_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value Filldown AS (\S+)
Expand All @@ -16,8 +15,8 @@ Value Label (\S+)
Value As_Path (\S+\s\S+|\S+)

Start
^\w:${NAME}(#|>)\s/show router bgp routes\s\S+ -> Continue
^.\w:${NAME}(#|>)\s/show router bgp routes\s\S+ -> Continue
^\w:\S+(#|>)\s/show router bgp routes\s\S+ -> Continue
^.\w:\S+(#|>)\s/show router bgp routes\s\S+ -> Continue
^\sBGP\sRouter\sID:${BGP_Router_ID}\s+AS:${AS}\s+Local\sAS:${Local_AS} -> Continue.Record
^${Flag}\s+${Network}\s+${LocalPref}\s+${MED}
^\s+${Next_Hop}\s+${Path_id}\s+${Label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Variables Router_Name family IP_Prefix_Mask family AS Local_AS Attributes Network Nexthop Route_Dist VPN_Label Path_Id From Res_Nexthop Local_Pref Interface_Name Aggregator_AS Aggregator Atomic_Aggr MED AIGP_Metric Connector Community Cluster Originator_Id Peer_Router_Id Fwd_Class Priority Flags Route_Source AS_Path Route_Tag Neighbor_AS Orig_Validation Source_Class Dest_Class Add_Paths_Send VPRN_Imported
#Autor Manuel Saldivar [email protected]
#Notes: If you try to execute on the same proof family label-ipv4 and vpn-ipv4 maybe will have some errors with the value VPRN_Imported, because label-ipv4 don't have this value, I recommend execute the proof separated, or execute first vpn-ipv4 and then label-ipv4 for best results.
Value Filldown NAME (\S+)
Value Filldown IP_Prefix_Mask ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2})
Value Filldown family (\S+)
Value Filldown BGP_Router_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Expand Down Expand Up @@ -43,8 +42,8 @@ Value Fillup,Key VPRN_Imported (\S+)


Start
^\w:${NAME}(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue
^.\w:${NAME}(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue
^\w:\S+(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue
^.\w:\S+(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue
^\s+BGP\sRouter\sID:${BGP_Router_ID}\s+AS:${AS}\s+Local\sAS:${Local_AS}
^${Attributes}
^Network\s+:\s${Network}
Expand Down
8 changes: 4 additions & 4 deletions Templates/nokia_sros_show_router_bgp_summary.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Command: /show router bgp summary
#Description: This template is used to see BGP summary
#Variables: Router_Name BGP_ROUTER_ID BGP_AS BGP_LOCAL_AS BGP_ADMIN_STATE BGP_OPER_STATE BGP_TOTAL_PEERS_GROUPS BGP_TOTAL_PEERS BGP_NEIGHBOR NEIGHBOR_NAME BGP_STATE BGP_STATUS_NEIGHBOR
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
#filterAction:exclude
#filterColumns:
Value BGP_ROUTER_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3})
Value BGP_AS ([0-9]{1,1500})
Value BGP_LOCAL_AS ([0-9]{1,1500})
Expand All @@ -16,8 +16,8 @@ Value Required BGP_STATE (\S+)
Value BGP_STATUS_NEIGHBOR (\S+)

Start
^\w:${NAME}(#|>) /show router bgp summary
^.\w:${NAME}(#|>) /show router bgp summary
^\w:\S+(#|>) /show router bgp summary
^.\w:\S+(#|>) /show router bgp summary
^\sBGP\sRouter\sID:${BGP_ROUTER_ID}\s+AS:${BGP_AS}\s+Local\sAS:${BGP_LOCAL_AS}
^BGP\sAdmin\sState\s+:\s${BGP_ADMIN_STATE}\s+BGP\sOper\sState\s+:\s${BGP_OPER_STATE}
^Total\sPeer\sGroups\s+:\s${BGP_TOTAL_PEERS_GROUPS}\s+Total\sPeers\s+:\s${BGP_TOTAL_PEERS}
Expand Down
7 changes: 4 additions & 3 deletions Templates/nokia_sros_show_router_interface.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#Description: This template is used to see the interfaces over plane Base
#Variables: Router_Name INTERFACE_NAME PLANE INTERFACE_ADM INTERFACE_OPR_IPV4 INTERFACE_OPR_IPV6 INTERFACE_MODE INTERFACE_PORT INTERFACE_IP
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
#filterAction: exclude
#filterColumns:
Value Required INTERFACE_NAME (\S+)
Value Filldown PLANE (Base)
Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN])
Expand All @@ -13,8 +14,8 @@ Value Required INTERFACE_PORT (\d{1,2}\/\d{1,2}\/\d{1,2}|\S+)
Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2})

Start
^\w:${NAME}(#|>) /show router interface
^.\w:${NAME}(#|>) /show router interface
^\w:\S+(#|>) /show router interface
^.\w:\S+(#|>) /show router interface
^Interface\sTable\s.Router.\s${PLANE}.
^${INTERFACE_NAME}\s+${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue
^\s+${INTERFACE_IP} -> Record
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
#Description: This template is used to see the number of routes and active ldp bindings
#Variables: Router_Name NO_PREFIX_ACTIVE_BINDINGS NO_OF_ROUTES
#Autor: Manuel Saldivar [email protected]
Value Fillup NAME (\S+)
Value NO_PREFIX_ACTIVE_BINDINGS ([0-9]{0,12})
Value NO_OF_ROUTES ([0-9]{0,12})

Start
^\w:${NAME}(#|>) /show router route-table | match No
^.\w:${NAME}(#|>) /show router route-table | match No
^\w:\S+(#|>) /show router route-table | match No
^.\w:\S+(#|>) /show router route-table | match No
^No.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS}
^No.\sof\sRoutes:\s${NO_OF_ROUTES} <- Record
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
#Description: This template is used to see number of prefix active ldp bindings
#Variables: Router_Name NO_PREFIX_ACTIVE_BINDINGS
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Required NO_PREFIX_ACTIVE_BINDINGS ([0-9]{0,12})

Start
^\w:${NAME}(#|>) /show router ldp bindings active | match No -> Record
^.\w:${NAME}(#|>) /show router ldp bindings active | match No -> Continue.Record
^\w:\S+(#|>) /show router ldp bindings active | match No -> Record
^.\w:\S+(#|>) /show router ldp bindings active | match No -> Continue.Record
^\sNo.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS}
^No.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS}
^\sNo.\sof\sIPv4\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to see detail of ldp interface
#Variables: Router_Name Interface Admin_State Oper_State IPv4_Admin_State IPv4_Oper_State Transport_Addr Active_Adjacencies Local_LSR_Type Local_LSR
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Key,Required Interface (\S+)
Value Admin_State ([uU][pP]|[Dd][oO][wW][nN])
Value Oper_State ([uU][pP]|[Dd][oO][wW][nN])
Expand All @@ -14,8 +13,8 @@ Value Local_LSR_Type (\S+)
Value Local_LSR (\S+)

Start
^\w:${NAME}(#|>) /show router ldp interface detail
^.\w:${NAME}(#|>) /show router ldp interface detail
^\w:\S+(#|>) /show router ldp interface detail
^.\w:\S+(#|>) /show router ldp interface detail
^Interface\s${Interface}
^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State}
^IPv4\sAdmin\sState\s+:\s${IPv4_Admin_State}\s+IPv4\sOper\sState\s+:\s${IPv4_Oper_State}
Expand Down
5 changes: 2 additions & 3 deletions Templates/nokia_sros_show_router_ldp_session.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#Description: This template is used to see ldp session
#Variables: Router_Name PEER_LDP_ID ADJ_TYPE STATE MSG_SENT MSG_RECV UP_TIME
#Autor: Manuel Saldivar [email protected]
Value Filldown NAME (\S+)
Value Required PEER_LDP_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}.[0-9]{1,2})
Value Required ADJ_TYPE (\S+)
Value Required STATE (\S+)
Expand All @@ -11,7 +10,7 @@ Value Required MSG_RECV (\S+)
Value Required UP_TIME ([0-9]{1,10}\S+\s[0-9]{2}.[0-9]{2}.[0-9]{2})

Start
^\w:${NAME}(#|>) /show router ldp session
^.\w:${NAME}(#|>) /show router ldp session
^\w:\S+(#|>) /show router ldp session
^.\w:\S+(#|>) /show router ldp session
^${PEER_LDP_ID}\s+${ADJ_TYPE}\s+${STATE}\s+${MSG_SENT}\s+${MSG_RECV}\s+${UP_TIME} -> Continue.Record

Loading

0 comments on commit 03ef2b4

Please sign in to comment.