Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template for Eltex's command 'show interfaces description' #1812

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Value INTERFACE ((?!Port|Ch|-)\S+)
Value INTERFACE_MODE (Trunk|Access(?:\s*\(\d+\))?|Customer(?:\s*\(\d+\))?)
Value ADMIN_STATE (Up|Down)
Value LINK_STATE (Up|Down|Not Present)
Value DESCRIPTION (.*?)
Value List DESCRIPTION (.*?)

Start
^\s*Admin\s+Link\s*$$
Expand Down Expand Up @@ -56,8 +56,10 @@ Ch5

Vlan
^(?:\s*-+)+\s*$$
^\s*${INTERFACE}\s+${ADMIN_STATE}\s+${LINK_STATE}(?:\s+${DESCRIPTION})?\s*$$ -> Record
^(?:\s*(?!Port|Ch|-)\S+\s+(?:Up|Down).*|\s*)$$ -> Continue.Record
^\s*$$ -> Start
^\s*${INTERFACE}\s+${ADMIN_STATE}\s+${LINK_STATE}(?:\s+${DESCRIPTION})?\s*$$
^\s*${DESCRIPTION}\s*$$
^. -> Error

Loopback
Expand Down
Original file line number Diff line number Diff line change
@@ -1,232 +1,278 @@
---
parsed_sample:
- admin_state: "Up"
description: "mirror_te1/0/1"
link_state: "Down"
description:
- "mirror_te1/0/1"
interface: "gi1/0/1"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/2"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/3"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/4"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/5"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/6"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/7"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/8"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/9"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/10"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/11"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/12"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/13"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/14"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/15"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/16"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/17"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/18"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/19"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/20"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/21"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/22"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Down"
- admin_state: "Up"
description:
- "None"
interface: "gi1/0/23"
interface_mode: ""
- admin_state: "Up"
description: "MGMT"
link_state: "Down"
- admin_state: "Up"
description:
- "MGMT"
interface: "gi1/0/24"
interface_mode: ""
link_state: "Down"
- admin_state: "Up"
description: "Eltex3324-1 - Te1/0/4"
link_state: "Up"
description:
- "Eltex3324-1 - Te1/0/4"
interface: "te1/0/1"
interface_mode: ""
- admin_state: "Up"
description: "FIORD-10G"
link_state: "Up"
- admin_state: "Up"
description:
- "FIORD-10G"
interface: "te1/0/2"
interface_mode: ""
- admin_state: "Up"
description: "MX5-2 - xe-0/0/2"
link_state: "Up"
- admin_state: "Up"
description:
- "MX5-2 - xe-0/0/2"
interface: "te1/0/3"
interface_mode: ""
- admin_state: "Up"
description: "Eltex3124-1 - Te1/0/3"
link_state: "Up"
- admin_state: "Up"
description:
- "Eltex3124-1 - Te1/0/3"
interface: "te1/0/4"
interface_mode: ""
link_state: "Up"
- admin_state: "Up"
description: ""
link_state: "Not Present"
description:
- "None"
interface: "Po1"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po2"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po3"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po4"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po5"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po6"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po7"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po8"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po9"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po10"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po11"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Not Present"
- admin_state: "Up"
description:
- "None"
interface: "Po12"
interface_mode: ""
link_state: "Not Present"
- admin_state: "Up"
description: "-"
link_state: "Up"
description:
- "-"
interface: "1"
interface_mode: ""
- admin_state: "Up"
description: "Telia"
link_state: "Up"
- admin_state: "Up"
description:
- "Telia"
interface: "2"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Up"
- admin_state: "Up"
description:
- "None"
interface: "loopback1"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Up"
- admin_state: "Up"
description:
- "None"
interface: "loopback2"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Up"
- admin_state: "Up"
description:
- "None"
interface: "loopback3"
interface_mode: ""
- admin_state: "Up"
description: ""
link_state: "Up"
- admin_state: "Up"
description:
- "None"
interface: "loopback4"
interface_mode: ""
link_state: "Up"
Loading
Loading