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

Updated the template to get first 20 chars on LLDP neighbor for case … #376

Merged
merged 2 commits into from Feb 25, 2019

Conversation

Projects
None yet
2 participants
@jvanderaa
Copy link
Contributor

jvanderaa commented Feb 24, 2019

…of longer switch names.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_ios_show_lldp_neighbors.template

SUMMARY

After help from @FragmentedPacket I have finally added in the update to get the proper name.

Fixes #375 (missed the commit message, let me know if that is needed as well yet on top of in here).

Before

PLAY [Switch config] *********************************************************************************************************************************************************************************************

TASK [CLI >> Get LLDP neighbors] *********************************************************************************************************************************************************************************
ok: [rtr01]

TASK [SYS >> Parse LLDP Information] *****************************************************************************************************************************************************************************
ok: [rtr01]

TASK [DEBUG >> LLDP Neighbors] ***********************************************************************************************************************************************************************************
ok: [rtr01] => {
    "msg": []
}

PLAY RECAP *******************************************************************************************************************************************************************************************************
rtr01                      : ok=3    changed=0    unreachable=0    failed=0

After

PLAY [Switch config] *********************************************************************************************************************************************************************************************

TASK [CLI >> Get LLDP neighbors] *********************************************************************************************************************************************************************************
ok: [rtr01]

TASK [SYS >> Parse LLDP Information] *****************************************************************************************************************************************************************************
ok: [rtr01]

TASK [DEBUG >> LLDP Neighbors] ***********************************************************************************************************************************************************************************
ok: [rtr01] => {
    "msg": [
        {
            "LOCAL_INTERFACE": "Gi0/2",
            "NEIGHBOR": "sw01.josh-v.com",
            "NEIGHBOR_INTERFACE": "Gi0/0"
        }
    ]
}

PLAY RECAP *******************************************************************************************************************************************************************************************************
rtr01                      : ok=3    changed=0    unreachable=0    failed=0
Josh VanDeraa
@jmcgill298
Copy link
Collaborator

jmcgill298 left a comment

Not sure how Travis is passing, but this definitely doesn't capture the data for the original raw file; \s* will allow, but not require a space, which should account for both scenarios.

Show resolved Hide resolved templates/cisco_ios_show_lldp_neighbors.template Outdated
Update templates/cisco_ios_show_lldp_neighbors.template
Co-Authored-By: jvanderaa <joshvanderaa@gmail.com>
@jvanderaa

This comment has been minimized.

Copy link
Contributor Author

jvanderaa commented Feb 25, 2019

I was noticing a few tests were having some challenges locally as well. Like before the changes to the template the test-template.yml playbook would still succeed even without having actual data. Looking closer at the test runs I should have seen the failure on the original test.

The update makes sense at this point. Appreciate it!

@jmcgill298 jmcgill298 merged commit 860a302 into networktocode:master Feb 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.