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

[NDM] [Cisco ACI] Support submitting topology metadata #18675

Merged
merged 12 commits into from
Dec 6, 2024
Merged

Conversation

zoedt
Copy link
Contributor

@zoedt zoedt commented Sep 26, 2024

What does this PR do?

https://datadoghq.atlassian.net/browse/NDMII-2989

Adds support for sending TopologyLinkMetadata to our EvP ndm track to support having ACI devices appear on the topology map.

See this document for additional context.

Changes summary

  • Add API calls for LLDP/CDP neighbors (support only for LLDP for now)
  • Create TopologyLinkMetadata from responses, utilizing device_mapping that references the pod name to the device ID (within Datadog) i.e. (pod-1-node-101 --> default:10.0.01)
    • Local resolution, if the remote device is a Cisco ACI device monitored by us, we can link it so that it does not need to be queried downstream within network-device-writer via DDSQL queries
  • Unit tests added

QA Steps

Reference docs here for ddev QA
Output should incl. Network Devices Monitoring metadata with links filled with expected fields and the data appearing on the Topology Map in staging :-)

"links": [
        {
          "id": "zoe-ddev-3:10.0.160.64:cisco-aci-eth1/49.cisco-aci-eth5/1",
          "integration": "cisco-aci",
          "local": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.64"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.64:cisco-aci-eth1/49",
              "id": "eth1/49",
              "id_type": "interface_name"
            }
          },
          "remote": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.65",
              "description": "topology/pod-1/node-103",
              "id": "aa:aa:54:06:65:77",
              "id_type": "mac",
              "ip_address": "10.0.160.65",
              "name": "Spine-103"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/1",
              "description": "topology/pod-1/paths-103/pathep-[eth5/1]",
              "id": "aa:aa:54:06:65:77",
              "id_type": "mac_address"
            }
          },
          "source_type": "lldp"
        },
        {
          "id": "zoe-ddev-3:10.0.160.64:cisco-aci-eth1/41.cisco-aci-None",
          "integration": "cisco-aci",
          "local": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.64"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.64:cisco-aci-eth1/41",
              "id": "eth1/41",
              "id_type": "interface_name"
            }
          },
          "remote": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.0.1",
              "description": "topology/pod-1/node-1",
              "id": "f2:98:2c:b2:ac:1f",
              "id_type": "mac",
              "ip_address": "10.0.0.1",
              "name": "apic1"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.0.1:cisco-aci-None",
              "description": "apic1-eth2",
              "id": "f2:98:2c:b2:ac:1f",
              "id_type": "mac_address"
            }
          },
          "source_type": "lldp"
        },
        {
          "id": "zoe-ddev-3:10.0.160.66:cisco-aci-eth1/49.cisco-aci-eth5/2",
          "integration": "cisco-aci",
          "local": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.66"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.66:cisco-aci-eth1/49",
              "id": "eth1/49",
              "id_type": "interface_name"
            }
          },
          "remote": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.65",
              "description": "topology/pod-1/node-103",
              "id": "1e:fd:01:7a:40:e9",
              "id_type": "mac",
              "ip_address": "10.0.160.65",
              "name": "Spine-103"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/2",
              "description": "topology/pod-1/paths-103/pathep-[eth5/2]",
              "id": "1e:fd:01:7a:40:e9",
              "id_type": "mac_address"
            }
          },
          "source_type": "lldp"
        },
        {
          "id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/1.cisco-aci-eth1/49",
          "integration": "cisco-aci",
          "local": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.65"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/1",
              "id": "eth5/1",
              "id_type": "interface_name"
            }
          },
          "remote": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.64",
              "description": "topology/pod-1/node-101",
              "id": "4a:d9:64:1e:47:a6",
              "id_type": "mac",
              "ip_address": "10.0.160.64",
              "name": "Leaf101"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.64:cisco-aci-eth1/49",
              "description": "topology/pod-1/paths-101/pathep-[eth1/49]",
              "id": "4a:d9:64:1e:47:a6",
              "id_type": "mac_address"
            }
          },
          "source_type": "lldp"
        },
        {
          "id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/2.cisco-aci-eth1/49",
          "integration": "cisco-aci",
          "local": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.65"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.65:cisco-aci-eth5/2",
              "id": "eth5/2",
              "id_type": "interface_name"
            }
          },
          "remote": {
            "device": {
              "dd_id": "zoe-ddev-3:10.0.160.66",
              "description": "topology/pod-1/node-102",
              "id": "f6:e6:7b:b0:63:aa",
              "id_type": "mac",
              "ip_address": "10.0.160.66",
              "name": "leaf102"
            },
            "interface": {
              "dd_id": "zoe-ddev-3:10.0.160.66:cisco-aci-eth1/49",
              "description": "topology/pod-1/paths-102/pathep-[eth1/49]",
              "id": "f6:e6:7b:b0:63:aa",
              "id_type": "mac_address"
            }
          },
          "source_type": "lldp"
        }
      ],

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@zoedt zoedt changed the title [NDM] [Cisco ACI] Support topology metadata [NDM] [Cisco ACI] Support submitting topology metadata Sep 26, 2024
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 88.40580% with 16 lines in your changes missing coverage. Please review.

Project coverage is 89.53%. Comparing base (2eafe65) to head (59cfd97).
Report is 16 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
cisco_aci 89.52% <88.40%> (-0.07%) ⬇️
hive ?
hivemq ?
ignite ?
jboss_wildfly ?
kafka ?
kubevirt_handler ?
nvidia_nim ?
presto ?
slurm ?
solr ?

Flags with carried forward coverage won't be shown. Click here to find out more.

jmw51798
jmw51798 previously approved these changes Nov 4, 2024
vicweiss
vicweiss previously approved these changes Nov 5, 2024
@zoedt zoedt dismissed stale reviews from vicweiss and jmw51798 via 9523c73 December 3, 2024 21:57
@zoedt zoedt requested a review from a team as a code owner December 3, 2024 21:57
@zoedt
Copy link
Contributor Author

zoedt commented Dec 5, 2024

image image

@zoedt zoedt added this pull request to the merge queue Dec 6, 2024
Merged via the queue into master with commit 693145c Dec 6, 2024
37 checks passed
@zoedt zoedt deleted the zoe/aci-topology branch December 6, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants