-
Notifications
You must be signed in to change notification settings - Fork 786
feat(hp_procurve): add show lldp info local-device template #2284
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
Open
molhamalnasr
wants to merge
4
commits into
networktocode:master
Choose a base branch
from
molhamalnasr:feat/hp_procurve-show-lldp-info-local-device
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
ntc_templates/templates/hp_procurve_show_lldp_info_local-device.textfsm
This file contains hidden or 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,42 @@ | ||
| Value Filldown CHASSIS_TYPE (\S+) | ||
| Value Filldown CHASSIS_ID (\S+) | ||
| Value Filldown SYSTEM_NAME (\S+) | ||
| Value Filldown DESCRIPTION (.+?) | ||
| Value Filldown CAPABILITIES_SUPPORTED (.+?) | ||
| Value Filldown CAPABILITIES (.+?) | ||
| Value Filldown MGMT_TYPE (\S+) | ||
| Value Filldown MGMT_ADDRESS (\S+) | ||
| Value Required LOCAL_INTERFACE (\S+) | ||
| Value PORT_TYPE (\S+) | ||
| Value PORT_ID (\S+) | ||
| Value PORT_DESCRIPTION (\S+) | ||
|
|
||
| Start | ||
| ^\s*LLDP\s+Local\s+Device\s+Information\s*$$ -> INFO | ||
| ^\s*$$ | ||
| ^. -> Error | ||
|
|
||
| INFO | ||
| ^\s*Chassis Type\s+:\s+${CHASSIS_TYPE}\s*$$ | ||
| ^\s*Chassis Id\s+:\s+${CHASSIS_ID}\s*$$ | ||
| ^\s*System Name\s+:\s+${SYSTEM_NAME}\s*$$ | ||
| ^\s*System Description\s+:\s+${DESCRIPTION}\s*$$ | ||
| ^\s*System Capabilities Supported:\s+${CAPABILITIES_SUPPORTED}\s*$$ | ||
| ^\s*System Capabilities Enabled:\s+${CAPABILITIES}\s*$$ | ||
| ^\s*Management Address\s*:\s*$$ | ||
| ^\s+Type:\s+${MGMT_TYPE}\s*$$ | ||
| ^\s+Address:\s+${MGMT_ADDRESS}\s*$$ | ||
| ^\s*LLDP\s+Port\s+Information\s*$$ -> PORTS | ||
| ^\s*$$ | ||
| ^. -> Error | ||
|
|
||
| PORTS | ||
| ^\s*Port\s+PortType\s+PortId\s+PortDesc\s*$$ | ||
| ^\s*-+\s+-+\s+-+\s+-+\s*$$ -> PORT_TABLE | ||
| ^\s*$$ | ||
| ^. -> Error | ||
|
|
||
| PORT_TABLE | ||
| ^\s+${LOCAL_INTERFACE}\s+${PORT_TYPE}\s+${PORT_ID}\s+${PORT_DESCRIPTION}\s*$$ -> Record | ||
| ^\s*$$ | ||
| ^. -> Error | ||
This file contains hidden or 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
23 changes: 23 additions & 0 deletions
23
tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.raw
This file contains hidden or 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,23 @@ | ||
|
|
||
| LLDP Local Device Information | ||
|
|
||
| Chassis Type : mac-address | ||
| Chassis Id : a1b2c3-d4e5f6 | ||
| System Name : switch-vsf-01 | ||
| System Description : Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16.... | ||
| System Capabilities Supported: bridge, router | ||
| System Capabilities Enabled: bridge | ||
|
|
||
| Management Address : | ||
| Type: ipv4 | ||
| Address: 192.168.1.1 | ||
|
|
||
| LLDP Port Information | ||
|
|
||
| Port PortType PortId PortDesc | ||
| -------- -------- -------- -------- | ||
| 1/1 local 1 1/1 | ||
| 1/2 local 2 1/2 | ||
| 1/3 local 3 1/3 | ||
| 2/1 local 54 2/1 | ||
| 2/2 local 55 2/2 |
62 changes: 62 additions & 0 deletions
62
tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device.yml
This file contains hidden or 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,62 @@ | ||
| --- | ||
| parsed_sample: | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "a1b2c3-d4e5f6" | ||
| system_name: "switch-vsf-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.1.1" | ||
| local_interface: "1/1" | ||
| port_type: "local" | ||
| port_id: "1" | ||
| port_description: "1/1" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "a1b2c3-d4e5f6" | ||
| system_name: "switch-vsf-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.1.1" | ||
| local_interface: "1/2" | ||
| port_type: "local" | ||
| port_id: "2" | ||
| port_description: "1/2" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "a1b2c3-d4e5f6" | ||
| system_name: "switch-vsf-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.1.1" | ||
| local_interface: "1/3" | ||
| port_type: "local" | ||
| port_id: "3" | ||
| port_description: "1/3" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "a1b2c3-d4e5f6" | ||
| system_name: "switch-vsf-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.1.1" | ||
| local_interface: "2/1" | ||
| port_type: "local" | ||
| port_id: "54" | ||
| port_description: "2/1" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "a1b2c3-d4e5f6" | ||
| system_name: "switch-vsf-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.1.1" | ||
| local_interface: "2/2" | ||
| port_type: "local" | ||
| port_id: "55" | ||
| port_description: "2/2" |
23 changes: 23 additions & 0 deletions
23
tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.raw
This file contains hidden or 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,23 @@ | ||
|
|
||
| LLDP Local Device Information | ||
|
|
||
| Chassis Type : mac-address | ||
| Chassis Id : f6e5d4-c3b2a1 | ||
| System Name : switch-standalone-01 | ||
| System Description : Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16.... | ||
| System Capabilities Supported: bridge, router | ||
| System Capabilities Enabled: bridge | ||
|
|
||
| Management Address : | ||
| Type: ipv4 | ||
| Address: 192.168.2.1 | ||
|
|
||
| LLDP Port Information | ||
|
|
||
| Port PortType PortId PortDesc | ||
| -------- -------- -------- -------- | ||
| 1 local 1 1 | ||
| 2 local 2 2 | ||
| 3 local 3 3 | ||
| 4 local 4 4 | ||
| 5 local 5 5 |
62 changes: 62 additions & 0 deletions
62
tests/hp_procurve/show_lldp_info_local-device/hp_procurve_show_lldp_info_local-device2.yml
This file contains hidden or 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,62 @@ | ||
| --- | ||
| parsed_sample: | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "f6e5d4-c3b2a1" | ||
| system_name: "switch-standalone-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.2.1" | ||
| local_interface: "1" | ||
| port_type: "local" | ||
| port_id: "1" | ||
| port_description: "1" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "f6e5d4-c3b2a1" | ||
| system_name: "switch-standalone-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.2.1" | ||
| local_interface: "2" | ||
| port_type: "local" | ||
| port_id: "2" | ||
| port_description: "2" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "f6e5d4-c3b2a1" | ||
| system_name: "switch-standalone-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.2.1" | ||
| local_interface: "3" | ||
| port_type: "local" | ||
| port_id: "3" | ||
| port_description: "3" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "f6e5d4-c3b2a1" | ||
| system_name: "switch-standalone-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.2.1" | ||
| local_interface: "4" | ||
| port_type: "local" | ||
| port_id: "4" | ||
| port_description: "4" | ||
| - chassis_type: "mac-address" | ||
| chassis_id: "f6e5d4-c3b2a1" | ||
| system_name: "switch-standalone-01" | ||
| description: "Aruba JL254A 2930F-48G-4SFP+ Switch, revision WC.16...." | ||
| capabilities_supported: "bridge, router" | ||
| capabilities: "bridge" | ||
| mgmt_type: "ipv4" | ||
| mgmt_address: "192.168.2.1" | ||
| local_interface: "5" | ||
| port_type: "local" | ||
| port_id: "5" | ||
| port_description: "5" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.