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 LLDP to use json #48318

Merged
merged 1 commit into from
Nov 12, 2018
Merged

Fix LLDP to use json #48318

merged 1 commit into from
Nov 12, 2018

Conversation

idahood
Copy link
Contributor

@idahood idahood commented Nov 7, 2018

SUMMARY

Fixes #47982 (in conjunction with PR #48087 )

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nxos_facts

ANSIBLE VERSION
ansible 2.6.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/Users/sdodd/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/sdodd/Library/Python/2.7/lib/python/site-packages/ansible
  executable location = /Users/sdodd/Library/Python/2.7/bin/ansible
  python version = 2.7.10 (default, Oct  6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
ADDITIONAL INFORMATION

Old output (LLDP is not merged)

sw6a.pod807.dayjob.net# show lldp neighbors
Capability codes:
  (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
  (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID            Local Intf      Hold-time  Capability  Port ID
sw6c.pod807          mgmt0           120        BR          Ethernet1/9
fab1-ncg10-cdg3      Eth1/1          120        BR          Ethernet1/6
fab2-ncg10-cdg3      Eth1/7          120        BR          Ethernet1/6
sw6b.pod807.dayjob.net
                     Eth1/10         120        BR          Ethernet1/10
sw6b.pod807.dayjob.net
                     Eth1/11         120        BR          Ethernet1/11
00a0.98d5.f2cf       Eth1/12/1       120                    00a0.98d5.f2cf
00a0.98d5.f2d0       Eth1/12/2       120                    00a0.98d5.f2d0
00a0.98d3.d6c4       Eth1/12/3       120                    00a0.98d3.d6c4
00a0.98d3.d6c5       Eth1/12/4       120                    00a0.98d3.d6c5
fab3-ncg10-cdg3      Eth1/13         120        BR          Ethernet1/6
sw6c.pod807          Eth1/17         120        BR          Ethernet1/51
fab4-ncg10-cdg3      Eth1/19         120        BR          Ethernet1/6
Total entries displayed: 12
sw6a.pod807.dayjob.net# show cdp neighbors
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater,
                  V - VoIP-Phone, D - Remotely-Managed-Device,
                  s - Supports-STP-Dispute

Device-ID          Local Intrfce  Hldtme Capability  Platform      Port ID
sw6c.pod807
                    mgmt0          128    R S s     N3K-C3048TP-1 Eth1/9
sw1a.pod807.dayjob.net
                    Eth1/2         171    R S s     N9K-C93180YC- Eth1/51
sw2a.pod807.dayjob.net
                    Eth1/8         171    R S s     N9K-C93180YC- Eth1/51
sw6b.pod807.dayjob.net
                    Eth1/10        171    R S s     N9K-C9236C    Eth1/10
sw6b.pod807.dayjob.net
                    Eth1/11        171    R S s     N9K-C9236C    Eth1/11
sw6c.pod807
                    Eth1/17        171    R S s     N3K-C3048TP-1 Eth1/51
sw5a.pod807.dayjob.net
                    Eth1/26        171    R S s     N9K-C93180YC- Eth1/51
prov7a.pod8001.dayjob.net
                    Eth1/32        171    R S I s   N9K-C93180YC- Eth1/44

Total entries displayed: 8

ansible_net_neighbors:
{
  "Ethernet1/26": [
    {
      "sysname": "sw5a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/2": [
    {
      "sysname": "sw1a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/11": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/11"
    }
  ],
  "Ethernet1/17": [
    {
      "sysname": "sw6c.pod807",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/32": [
    {
      "sysname": "prov7a.pod8001.dayjob.net",
      "port": "Ethernet1/44"
    }
  ],
  "Ethernet1/8": [
    {
      "sysname": "sw2a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "mgmt0": [
    {
      "sysname": "sw6c.pod807",
      "port": "Ethernet1/9"
    }
  ],
  "Ethernet1/10": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/10"
    }
  ]

New output (now merging both data sources):

ansible_net_neighbors:
{
  "Eth1/11": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/11"
    }
  ],
  "Ethernet1/26": [
    {
      "sysname": "sw5a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/2": [
    {
      "sysname": "sw1a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/11": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/11"
    }
  ],
  "Ethernet1/17": [
    {
      "sysname": "sw6c.pod807",
      "port": "Ethernet1/51"
    }
  ],
  "Ethernet1/32": [
    {
      "sysname": "prov7a.pod8001.dayjob.net",
      "port": "Ethernet1/44"
    }
  ],
  "Eth1/10": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/10"
    }
  ],
  "Ethernet1/8": [
    {
      "sysname": "sw2a.pod807.dayjob.net",
      "port": "Ethernet1/51"
    }
  ],
  "Eth1/12/1": [
    {
      "sysname": "00a0.98d5.f2cf",
      "port": "00a0.98d5.f2cf"
    }
  ],
  "Eth1/17": [
    {
      "sysname": "sw6c.pod807",
      "port": "Ethernet1/51"
    }
  ],
  "mgmt0": [
    {
      "sysname": "sw6c.pod807",
      "port": "Ethernet1/9"
    }
  ],
  "Ethernet1/10": [
    {
      "sysname": "sw6b.pod807.dayjob.net",
      "port": "Ethernet1/10"
    }
  ],
  "Eth1/19": [
    {
      "sysname": "fab4-ncg10-cdg3",
      "port": "Ethernet1/6"
    }
  ],
  "Eth1/12/2": [
    {
      "sysname": "00a0.98d5.f2d0",
      "port": "00a0.98d5.f2d0"
    }
  ],
  "Eth1/13": [
    {
      "sysname": "fab3-ncg10-cdg3",
      "port": "Ethernet1/6"
    }
  ],
  "Eth1/1": [
    {
      "sysname": "fab1-ncg10-cdg3",
      "port": "Ethernet1/6"
    }
  ],
  "Eth1/12/4": [
    {
      "sysname": "00a0.98d3.d6c5",
      "port": "00a0.98d3.d6c5"
    }
  ],
  "Eth1/7": [
    {
      "sysname": "fab2-ncg10-cdg3",
      "port": "Ethernet1/6"
    }
  ],
  "Eth1/12/3": [
    {
      "sysname": "00a0.98d3.d6c4",
      "port": "00a0.98d3.d6c4"
    }
  ]
}

@ansibot
Copy link
Contributor

ansibot commented Nov 7, 2018

Hi @idahood, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 7, 2018

@ansibot
Copy link
Contributor

ansibot commented Nov 7, 2018

@idahood, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category nxos Cisco NXOS community support:network This issue/PR relates to code supported by the Ansible Network Team. labels Nov 7, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 7, 2018
@idahood idahood closed this Nov 7, 2018
@idahood idahood reopened this Nov 7, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 7, 2018
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Nov 8, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 8, 2018

@idahood this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 8, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Nov 8, 2018
@trishnaguha trishnaguha self-assigned this Nov 9, 2018
@trishnaguha trishnaguha merged commit e51964e into ansible:devel Nov 12, 2018
@trishnaguha trishnaguha added this to Need CP to into 2.7 in zzz NOT USED: Networking Bugs Nov 12, 2018
@trishnaguha
Copy link
Member

@idahood Thanks for the PR.

Ghilli3 pushed a commit to Ghilli3/ansible that referenced this pull request Nov 12, 2018
@trishnaguha trishnaguha moved this from Need CP to into 2.7 to Need CP into 2.6 in zzz NOT USED: Networking Bugs Nov 29, 2018
trishnaguha pushed a commit to trishnaguha/ansible that referenced this pull request Nov 29, 2018
@trishnaguha trishnaguha moved this from Need CP into 2.6 to Done in zzz NOT USED: Networking Bugs Nov 29, 2018
trishnaguha pushed a commit to trishnaguha/ansible that referenced this pull request Nov 29, 2018
trishnaguha pushed a commit to trishnaguha/ansible that referenced this pull request Nov 29, 2018
mjmayer pushed a commit to mjmayer/ansible that referenced this pull request Nov 30, 2018
abadger pushed a commit that referenced this pull request Dec 4, 2018
(cherry picked from commit e51964e)
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
mattclay pushed a commit that referenced this pull request Dec 10, 2018
(cherry picked from commit e51964e)
mattclay pushed a commit that referenced this pull request Dec 10, 2018
(cherry picked from commit e51964e)
@dagwieers dagwieers added the cisco Cisco technologies label Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. networking Network category nxos Cisco NXOS community support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

nxos_facts: cdp neighbor information overwrites lldp neighbor information
6 participants