Developer Community

Reply
Highlighted
Occasional Contributor II

ArubaOS REST API - Port duplex?

Hey all - I'm trying to present full port state back to a user and can't seem to find negotiated duplex.  I've got admin and operational status from Port, and speed from Port-Statistics, but duplex seems to be missing.

 

Switch is a 5400zl2 (J9850A) running #KB.16.07.0004.  I've read the doco out to 16.09 and still can't find anything.

 

Thanks,

Ben.

MVP Expert

Re: ArubaOS REST API - Port duplex?

I will check ! (but for me it is on port statistics...)




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5

Re: ArubaOS REST API - Port duplex?

Hi nz_nut,

 

You should use the "port_speed_mbps" key in the ports-statistics API.

 

                          | Intrusion                           MDI  Flow Bcast
  Port         Type       | Alert     Enabled Status Mode       Mode Ctrl Limit
  ------------ ---------- + --------- ------- ------ ---------- ---- ---- -----
  1/1          100/1000T  | No        Yes     Up     100FDx     MDIX off  0

With the ports-statistics API :

{'bytes_rx': 671517139,
'bytes_tx': 1390854127,
'drop_tx': 22,
'error_rx': 0,
'error_tx': 0,
'id': '1/1',
'name': '',
'packets_rx': 7633263,
'packets_tx': 13935820,
'port_speed_mbps': 100,
'throughput_rx_bps': 0,
'throughput_tx_bps': 544,
'uri': '/port-statistics/1/1'}

 

Hoping that helps,

 

Regards

MVP Expert

Re: ArubaOS REST API - Port duplex?

it is speed and not port config (Duplex or Half)

 

I look impossible for get port config status (it is possible to configure via port (config_mode field)




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor II

Re: ArubaOS REST API - Port duplex?

Yes - I found the same - speed is there, duplex is missing.  We have the majority of our ports auto/auto, so it's important to see the negotiated speed & duplex.  Frustrating!  Will look to use the CLI command and parse the text response.  

 

Thanks for the responses!

Re: ArubaOS REST API - Port duplex?

Sorry, misread your point. Thought your were looking to the current negotiated speed.

If you look into the schema/wired directory, there's a SpeedDuplex JSON.

 

So an API should refer to it.

 

I'll take a look.

 

Or otherwise, as you said, you could use AnyCLI to gather your info.

Occasional Contributor II

Re: ArubaOS REST API - Port duplex?

Yes, I too found the SpeedDuplex JSON file and thought it was promising - but I couldn't find anywhere this was referenced in the actual API.  Happy to be proven wrong though!

Re: ArubaOS REST API - Port duplex?

I've asked which API refers to this JSON.

Back to you as soon as I have an answer.

MVP Expert

Re: ArubaOS REST API - Port duplex?

Hi,

 

After a quick search it is used on DeviceProfileConfig.(json)

        "speed_duplex":
        {
            "description": "Speed and duplex for the device port", 
            "$ref":"../../schema/wired/SpeedDuplex.json", 
            "default_value": "SD_AUTO"
        }, 



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor II

Re: ArubaOS REST API - Port duplex?

Thanks guys - looks like you're right.  Unfortunately this is a configuration method, not a status/show method.  This seems like a glaring API omission to me?  Being that speed and duplex go hand in hand.

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: