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

modified: cisco_ios_show_cdp_neighbors_detail.template #80

Merged
merged 7 commits into from
Jan 21, 2017
Merged

modified: cisco_ios_show_cdp_neighbors_detail.template #80

merged 7 commits into from
Jan 21, 2017

Conversation

tsimson
Copy link
Contributor

@tsimson tsimson commented Jan 17, 2017

ISSUE TYPE
  • Additional Testing
COMPONENT
SUMMARY

I found that the "show cdp neighbors detail" template would fail to gather the required information if the neighbor device did not have an IP address. I run into this when developing locally with GNS3. The additional line fixes this.
@itdependsnetworks
Copy link
Contributor

@tsimson can you provide sample data and expected output? This will help us understand corner cases we are missing.

@tsimson
Copy link
Contributor Author

tsimson commented Jan 17, 2017

@itdependsnetworks ...I certainly can,

This seems to exit the template if there is no IP address configured on the neighbor:
ParseIP
^.*IP address: ${MANAGEMENT_IP} -> Start

Here is some sample output from before the change:
Before:
ok: [vIOS-1] => {
"output": {
"changed": false,
"response": [
{
"destination_host": "vIOS-L2-1",
"local_host": "",
"local_port": "",
"management_ip": "",
"platform": "",
"remote_port": "",
"software_version": ""
}
],
"response_list": []
}
}

The additional line fixes this by detecting the "^Platform" line and simply continuing the template:
ParseIP
^.*IP address: ${MANAGEMENT_IP} -> Start
^Platform: -> Start

Here is the same output after the change:
After:
ok: [vIOS-1] => {
"output": {
"changed": false,
"response": [
{
"destination_host": "vIOS-L2-1",
"local_host": "",
"local_port": "GigabitEthernet0/2",
"management_ip": "",
"platform": "",
"remote_port": "GigabitEthernet0/2",
"software_version": "Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Version 15.2(CML_NIGHTLY_20150414)FLO_DSGS7, EARLY DEPLOYMENT DEVELOPMENT BUILD, synced to DSGS_PI5_POSTCOLLAPSE_TEAM_TRACK_CLONE"
}
],
"response_list": []
}
}

Hope this provides clarification,
Tim

@itdependsnetworks
Copy link
Contributor

Can you take a look at tests/cisco_ios/show_cdp_neighbor_detail/ and create an additional raw and parsed file with your test data?

@tsimson
Copy link
Contributor Author

tsimson commented Jan 21, 2017

@itdependsnetworks I combined the new command raw output with the existing test for that command. Does that fly?

@itdependsnetworks
Copy link
Contributor

@tsimson that should work, much appreciated. Let's just check in with @GGabriele to see if he has any inputs.

@GGabriele
Copy link
Contributor

Everything looks good now, thanks @tsimson !

@GGabriele GGabriele merged commit e210e05 into networktocode:master Jan 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants