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

[Feature Request] Add/Import CDP Cabling Data from pnics #350

Open
Littlericket opened this issue Sep 28, 2023 · 2 comments
Open

[Feature Request] Add/Import CDP Cabling Data from pnics #350

Littlericket opened this issue Sep 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Littlericket
Copy link

Littlericket commented Sep 28, 2023

Enabling CDP on the pnic displays some references which can be used to cable vhosts to switches, also can be used to add neighbour devices directly to netbox.

You can get the PhysicalNicCdpInfo info with QueryNetworkHint when quering the hostSystem -> configManager-> networkSystem and using the method queryNetworkHint (vmnicXX as parameter or empty) on the returned networkSystem. This will return a PhysicalNicHintInfo with a PhysicalNicCdpInfo below connectedSwitchPort.

Took me a while to find out. Hidden like the most secret information on earth.

The returned PhysicalNicCdpInfo can be used to import network devices and cables to the vhost automatically, if cdp is enabled.

I would suggest that this feature needs to be opt-in, if the infrastructure below the vcenter has cdp enabled through all devices.

image

@Littlericket Littlericket changed the title [Feature Request] Add/Import CDP/LLDP Data from pnics [Feature Request] Add/Import CDP Data from pnics Sep 28, 2023
@Littlericket Littlericket changed the title [Feature Request] Add/Import CDP Data from pnics [Feature Request] Add/Import CDP Cabling Data from pnics Sep 28, 2023
@Littlericket
Copy link
Author

Littlericket commented Sep 29, 2023

@bb-Ricardo not familiar with python sadly, but as far as I tested you can get the data in connection.py add_host when you loop the pnics

obj.configManager.networkSystem.QueryNetworkHint(pnic_name)

image

devId/systemName is the device name of the connected switch - which should be existing already or can be created by the script. linking the pnic with a cable to the portId of the given systemName would be awesome.

@bb-Ricardo
Copy link
Owner

Hi, Thank you for the idea. This would be a great addition to the existing FR #318

@bb-Ricardo bb-Ricardo added the enhancement New feature or request label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants