Developer

 View Only
last person joined: yesterday 

Expand all | Collapse all

REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

This thread has been viewed 56 times
  • 1.  REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    Posted Nov 15, 2022 11:01 AM

    is there an api to get/set vlan tagged ,untagged, isolated ports configs for CX switch similar to AOS switch https://apigw-uswest4.central.arubanetworks.com/swagger/central/#!/AOS-S/api_hppc_switch_get_device_vlans 
    GET/PUT   / configuration / v1 / aos_switch / vlans / devices / { device_serial } 

     I can't seem to find one for CX switch in swagger docs.


    I have asked this in slack in hpe-greenlake channel but that channel seems to be  pretty silient .



  • 2.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    EMPLOYEE
    Posted Nov 16, 2022 05:48 AM
    Do you mean within Central or to the CX switch directly? If you're talking about the CX API then I wonder if the resources on the developer portal will help:

    https://developer.arubanetworks.com/aruba-aoscx/docs/get
    https://developer.arubanetworks.com/aruba-aoscx/docs/tips-and-tricks-with-aos-cx-rest


  • 3.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    Posted Nov 16, 2022 06:30 AM
    @probere
    Yes within Central as that is what I am referring to.​


  • 4.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    EMPLOYEE
    Posted Nov 16, 2022 06:54 PM
    It looks like /monitoring/v1/cx_switches/{serial}/vlan might get you there. I've adapted the url to match your region so let me know if it doesn't take you to the swagger interface. There is an equivalent version of this for the CX switch stacks also.

    the response sample shows tagged and untagged VLANs:
    {
      "count": 5,
      "total": 5,
      "vlans": [
        {
          "name": "DEFAULT_VLAN",
          "id": 1,
          "ipaddress": [],
          "tagged_ports": [
            "1/1/10"
          ],
          "untagged_ports": [
            "1/1/45"
          ],
          "access_ports": [
            "1/1/15"
          ],
          "status": "Up",
          "is_igmp_enabled": true,
          "is_jumbo_enabled": true,
          "is_voice_enabled": true,
          "promiscuous_ports": [],
          "isl_ports": [],
          "type": "Regular",
          "oper_state_reason": "OK",
          "is_management_vlan": true
        }
      ]
    }​



  • 5.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    Posted Nov 16, 2022 09:20 PM

    thanks @ProbeRequest Yep get request is  there in monitoring but also looking for put/post request :) 

    https://hpedev.slack.com/archives/C02EG5XFK8Q/p1668530934466319?thread_ts=1668491134.391109&cid=C02EG5XFK8Q




  • 6.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    EMPLOYEE
    Posted Nov 17, 2022 09:17 PM
    Here you go: https://developer.arubanetworks.com/aruba-central/reference/apicx_configupdate_interfaces

    This update interfaces API for CX switches will allow changing VLAN configuration.

    You can create/delete VLANs using {{base_url}}/configuration/v1/switch/cx/vlans and you can update which interfaces with trunk/access using {{base_url}}/configuration/v1/switch/cx/interfaces.


  • 7.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    Posted Nov 29, 2022 09:54 PM

    @ProbeRequest Thanks, yep looks like using the cx config update api is the only way to go though need to develop logic around finding tagged and untagged ports for a given interface

    Initially I thought we could use https://developer.arubanetworks.com/aruba-central/reference/apiexternal_controllerget_switches  api to to get tagged and untagged ports for a given vlan, I have found that this  api does not reflect the latest updates immediately  --I have seen it  taking more than 20 mins for latest updates to get reflected in this api. So not sure if this api is that reliable?

    ​​​


  • 8.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    EMPLOYEE
    Posted Nov 16, 2022 11:13 AM
    Hi,

    Although we currently don't have any equivalent APIs for CX Switches, they are planned in future releases. 
    There are several GET APIs in the Monitoring -> Switch section which can help you get some of the data that you are looking for
    1. Switch Monitoring APIs - https://developer.arubanetworks.com/aruba-central/reference/apiexternal_controllerget_switches 
    2. Create/Update/Delete VLANs for CX Switches- https://developer.arubanetworks.com/aruba-central/reference/apicx_configcrud_vlans



  • 9.  RE: REST API: is there an api to get vlan tagged ,untagged, isolated ports configs for CX switch?

    Posted Nov 17, 2022 10:53 AM

    Hi,

    Do you have any timeline of the release that will support put/update vlans with tagged/untagged/isolated ports for cx switches?