-
Notifications
You must be signed in to change notification settings - Fork 742
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
Issue 415 cdp #480
Merged
Merged
Issue 415 cdp #480
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
92108c1
Add in sh ip int brief command for NX_OS
mullaneywt 3972ccf
Adding "show ip interface brief" for NX-OS, IPV4
mullaneywt 251b029
Adding in test raw data
mullaneywt fd8d3df
Adding in parsed test data
mullaneywt ff1447f
Removed extra whitespace
mullaneywt 5d3a770
Reordered index file
mullaneywt 6fb7ea3
Add back in some white space errantly removed
mullaneywt 5432602
Swapping order of fields in template
mullaneywt 3d92489
Updated parsed file based on template changes
mullaneywt 45e67ad
Merge pull request #1 from networktocode/master
mullaneywt 371bbbf
Changes template to fix space issue #415
mullaneywt b5103ec
Upload additional test case files issue #415
mullaneywt e25674b
Fixed the start header
mullaneywt 0f56588
Whitespace on my shoulder makes me happy...
mullaneywt 0a9e0fe
Correct expected parsed data for multiline output
jmcgill298 c5ad405
Don't require multiline output to have a leading space
jmcgill298 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
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
Value Required NEIGHBOR (\S+) | ||
Value LOCAL_INTERFACE (\S+\s\S+) | ||
Value CAPABILITY ((?:\w(?:\s(?!\s))?){0,}) | ||
Value PLATFORM (\S{2,}\s\S{2,}|\S+) | ||
Value NEIGHBOR_INTERFACE (\S+\s\S+) | ||
Value LOCAL_INTERFACE (\S+(?:\s\S+)?) | ||
Value CAPABILITY ((?:\w\s*?)*?) | ||
Value PLATFORM (\S{2,}\s\S+|\S{2,}) | ||
Value NEIGHBOR_INTERFACE ([a-zA-Z]\S+(?:\s\S+)?) | ||
|
||
Start | ||
^Device.*ID -> CDP | ||
|
||
CDP | ||
^${NEIGHBOR}$$ | ||
^\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s+${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record | ||
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s+${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record | ||
|
||
^\s*${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s*${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record | ||
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s*${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record |
112 changes: 112 additions & 0 deletions
112
tests/cisco_ios/show_cdp_neighbors/cisco_ios_show_cdp_neighbors_3.parsed
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,112 @@ | ||
--- | ||
parsed_sample: | ||
- capability: H P | ||
local_interface: Gig 1/0/16 | ||
neighbor: SEP000000000000 | ||
neighbor_interface: port 1 | ||
platform: IP Phone | ||
- capability: T B I | ||
local_interface: Gig 1/0/45 | ||
neighbor: AP000000000 | ||
neighbor_interface: Gig 0 | ||
platform: AIR-CAP35 | ||
- capability: T B I | ||
local_interface: Gig 1/0/46 | ||
neighbor: AP000000001 | ||
neighbor_interface: Gig 0 | ||
platform: AIR-CAP35 | ||
- capability: T | ||
local_interface: Gig 1/0/1 | ||
neighbor: WAAS0000000 | ||
neighbor_interface: InlinePort 1/1/lan | ||
platform: OE474 | ||
- capability: H | ||
local_interface: Gig 1/0/40 | ||
neighbor: WAAS0000000 | ||
neighbor_interface: Gig 1/0 | ||
platform: OE474 | ||
- capability: R B S | ||
local_interface: Gig 1/0/1 | ||
neighbor: router.domain.local | ||
neighbor_interface: Gig 0/0 | ||
platform: CISCO2911 | ||
- capability: H P M | ||
local_interface: Gig 1/0/33 | ||
neighbor: SEP000000000001 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/29 | ||
neighbor: SEP000000000002 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/30 | ||
neighbor: SEP000000000003 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/14 | ||
neighbor: SEP000000000004 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/8 | ||
neighbor: SEP000000000005 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/13 | ||
neighbor: SEP000000000006 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P | ||
local_interface: Gig 1/0/15 | ||
neighbor: SEP000000000007 | ||
neighbor_interface: eth0 | ||
platform: CTS-CODEC | ||
- capability: H P M | ||
local_interface: Gig 1/0/37 | ||
neighbor: SEP000000000008 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/34 | ||
neighbor: SEP000000000009 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P | ||
local_interface: Gig 1/0/21 | ||
neighbor: SEP00000000000A | ||
neighbor_interface: eth0 | ||
platform: CTS-CODEC | ||
- capability: H P M | ||
local_interface: Gig 1/0/35 | ||
neighbor: SEP00000000000B | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/24 | ||
neighbor: SEP00000000000C | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/9 | ||
neighbor: SEP00000000000D | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/17 | ||
neighbor: SEP00000000000E | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/20 | ||
neighbor: SEP00000000000F | ||
neighbor_interface: Port 1 | ||
platform: IP Phone | ||
- capability: H P M | ||
local_interface: Gig 1/0/36 | ||
neighbor: SEP000000000010 | ||
neighbor_interface: Port 1 | ||
platform: IP Phone |
28 changes: 28 additions & 0 deletions
28
tests/cisco_ios/show_cdp_neighbors/cisco_ios_show_cdp_neighbors_3.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,28 @@ | ||
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge | ||
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, | ||
D - Remote, C - CVTA, M - Two-port Mac Relay | ||
|
||
Device ID Local Intrfce Holdtme Capability Platform Port ID | ||
SEP000000000000 Gig 1/0/16 155 H P IP Phone port 1 | ||
AP000000000 Gig 1/0/45 158 T B I AIR-CAP35 Gig 0 | ||
AP000000001 Gig 1/0/46 173 T B I AIR-CAP35 Gig 0 | ||
WAAS0000000 Gig 1/0/1 138 T OE474 InlinePort 1/1/lan | ||
WAAS0000000 Gig 1/0/40 138 H OE474 Gig 1/0 | ||
router.domain.local | ||
Gig 1/0/1 134 R B S CISCO2911 Gig 0/0 | ||
SEP000000000001 Gig 1/0/33 152 H P M IP Phone Port 1 | ||
SEP000000000002 Gig 1/0/29 173 H P M IP Phone Port 1 | ||
SEP000000000003 Gig 1/0/30 160 H P M IP Phone Port 1 | ||
SEP000000000004 Gig 1/0/14 169 H P M IP Phone Port 1 | ||
SEP000000000005 Gig 1/0/8 140 H P M IP Phone Port 1 | ||
SEP000000000006 Gig 1/0/13 135 H P M IP Phone Port 1 | ||
SEP000000000007 Gig 1/0/15 164 H P CTS-CODEC eth0 | ||
SEP000000000008 Gig 1/0/37 173 H P M IP Phone Port 1 | ||
SEP000000000009 Gig 1/0/34 176 H P M IP Phone Port 1 | ||
SEP00000000000A Gig 1/0/21 179 H P CTS-CODEC eth0 | ||
SEP00000000000B Gig 1/0/35 177 H P M IP Phone Port 1 | ||
SEP00000000000C Gig 1/0/24 164 H P M IP Phone Port 1 | ||
SEP00000000000D Gig 1/0/9 176 H P M IP Phone Port 1 | ||
SEP00000000000E Gig 1/0/17 131 H P M IP Phone Port 1 | ||
SEP00000000000F Gig 1/0/20 136 H P M IP Phone Port 1 | ||
SEP000000000010 Gig 1/0/36 162 H P M IP Phone Port 1 |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these should be on the same line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at something else and noticed this may be the way the output is provided back. We would need to account for this within the template to make sure the data is what we need.
I will find the example and post it back, but I think it may have been a similar template to this, but different OS.