Developer

 View Only
Expand all | Collapse all

ArubaOS REST API - Port duplex?

This thread has been viewed 3 times
  • 1.  ArubaOS REST API - Port duplex?

    Posted Sep 12, 2019 04:05 PM

    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.



  • 2.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 02:29 AM

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



  • 3.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 05:12 AM

    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



  • 4.  RE: ArubaOS REST API - Port duplex?
    Best Answer

    Posted Sep 13, 2019 05:23 AM

    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)



  • 5.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 06:53 AM

    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!



  • 6.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 07:37 AM

    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.



  • 7.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 07:54 AM

    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!



  • 8.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 08:04 AM

    I've asked which API refers to this JSON.

    Back to you as soon as I have an answer.



  • 9.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 08:20 AM

    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"
            }, 


  • 10.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 13, 2019 09:12 AM

    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.



  • 11.  RE: ArubaOS REST API - Port duplex?

    Posted Sep 16, 2019 02:25 AM

    @nz_nut wrote:

    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.


    Yes, look a API omission :(