HPE Synergy
1767372 Members
3989 Online
108961 Solutions
New Discussion юеВ

Get switch ports details for Uplinks

 
Gnome-IT
Frequent Visitor

Get switch ports details for Uplinks

I tried to retrieve the information on the Switch networks where the uplink of the virtual connection of our Synergy. Unfortunately, the information does not come up with the following script, someone could help me?
The idea also of having SAN information

# Retrieve information about all interconnects
$interconnects = Get-OVInterconnect

# Loop through each interconnect and retrieve port information
foreach ($interconnect in $interconnects) {
    # Retrieve ports for the current interconnect
    $ports = Send-OVRequest -Uri "$($interconnect.uri)/ports" -Session $ovSession
    # Output port information
    foreach ($port in $ports.members) {
        Write-Host "Interconnect Name: $($interconnect.name)"
        Write-Host "Port Name: $($port.portName)"
        Write-Host "Enabled: $($port.enabled)"
        Write-Host "Port Status: $($port.status)"
        Write-Host "Port Type: $($port.portType)"
        Write-Host "Connected To: $($port.connectedTo)"
        Write-Host "-----------------------------"
    }
}
9 REPLIES 9
TVVJ
HPE Pro

Re: Get switch ports details for Uplinks

Hello,

Please refer to the document "HPE OneView 8.9 API Reference for HPE Synergy" and see if it helps.

Regards,

I work for HPE
Views expressed herein are my personal opinion and are not the views of HPE

Accept or Kudo

Gnome-IT
Frequent Visitor

Re: Get switch ports details for Uplinks

Hello,

Thank you for sharing the API documentation, unfortunately not able to find the way to get switch details. 

thutchings
HPE Pro

Re: Get switch ports details for Uplinks

Hello,

I issued the GET call to "/rest/interconnects/<id>/ports" in a lab environment I have access to. There is a section in the json output in the "neighbor" section where I can see this is part of the details:

"remotePortDescription": "FortyGigE1/0/50 Interface",
"remotePortId": "FortyGigE1/0/50",
"remotePortIdType": "interfaceName",
"remoteSystemCapabilities": "Bridge, Router",
"remoteSystemDescription": "HPE Comware Platform Software, Software Version 7.1.070, Release 2612P08-US\r\nHPE FF 5940 48SFP+ 6QSFP+ Switch\r\nCopyright (c) 2010-2020 Hewlett Packard Enterprise Development LP",


It seems that if LLDP is enabled on the TOR, you should be able to get similar output.


Regards


I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
thutchings
HPE Pro

Re: Get switch ports details for Uplinks

FYI...I did not include any of the other details above that would be identifying (MAC, name, etc.) for the switch, but you should be able to see the same type of info in your environment.

 

Regards


I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Gnome-IT
Frequent Visitor

Re: Get switch ports details for Uplinks

you are right, just I was about to notify you that I got it.
do you know how to get details from SAN switches?

Also from the GUI interface, I'm able to see Q3:1 connected but details are not retrieved, it can be an LLDP issue?

thutchings
HPE Pro

Re: Get switch ports details for Uplinks

Hello,

The same GET call should work to get details from SAN switches connected to ports using FCoE and native FC. I was able to test this on the FCoE ports, but I do not have a system available with a VC FC module to test against, but the same command should work. This will likely not work on non managed interconnects (Brocade switch).


Regards


I am an HPE Employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Gnome-IT
Frequent Visitor

Re: Get switch ports details for Uplinks

@thutchings 

My problem is that I can't figure out how to match the logic functions 'b' of the converging cards with their respective 'Uplink'.

Rama2
HPE Pro

Re: Get switch ports details for Uplinks

# Retrieve information about all interconnects
$interconnects = Get-OVInterconnect

# Loop through each interconnect and retrieve port information
foreach ($interconnect in $interconnects) {
    # Retrieve ports for the current interconnect
    $ports = Send-OVRequest -Uri "$($interconnect.uri)/ports" -Session $ovSession
    
    # Output port information
    foreach ($port in $ports.members) {
        Write-Host "Interconnect Name: $($interconnect.name)"
        Write-Host "Port Name: $($port.portName)"
        Write-Host "Enabled: $($port.enabled)"
        Write-Host "Port Status: $($port.status)"
        Write-Host "Port Type: $($port.portType)"
        Write-Host "Connected To: $($port.connectedTo)"
        Write-Host "-"
    }
}

# Retrieve SAN information
$sans = Get-OVSanManager

# Loop through each SAN and retrieve related information
foreach ($san in $sans) {
    Write-Host "SAN Name: $($san.name)"
    Write-Host "SAN Status: $($san.status)"
    Write-Host "SAN Type: $($san.type)"
    Write-Host "-"
}


I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
support_s
System Recommended

Query: Get switch ports details for Uplinks

Hello,

 

Let us know if you were able to resolve the issue.

 

If you have no further query, and you are satisfied with the answer then kindly mark the topic as Solved so that it is helpful for all community members.

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".

 

Thank you for being a HPE valuable community member.


Accept or Kudo