Developer

 View Only
  • 1.  Use API to set port profile on switch interface

    Posted 2 days ago

    I'm trying to find some API configuration to new central where I can change the port profile on a single port on a single switch.

    Mostly this is for exceptions from the global rule.

    But I'm not able to find any API that can do any changes all the way down to an specific switch?

    Are there anyone that have done this or have any tips on how I can manage this through API



    -------------------------------------------


  • 2.  RE: Use API to set port profile on switch interface

    Posted 22 hours ago

    Hello!

    Have you tried the interface profile API? You would want to create it as a local profile on the device to override any shared profile configurations. With that API you can designate a switch port profile to associate to the port you want to change. In this case you would want to create a switch port profile for your exception needs. If you haven't worked with local profiles before we have a guide on our Developer Hub to reference. Let me know if this works for you. If not feel free to drop some extra information about what you've tried and I can try to help troubleshoot!

    Cheers,

    Collin

    -------------------------------------------



  • 3.  RE: Use API to set port profile on switch interface

    Posted 11 hours ago

    My issue is that I want to use API to set this on one switch, not the whole site. Every 1/1/1 port under this site cannot be used with this profile.

    If I check the API guides for interface profile, it only shows me the profiles that I have in library.

    The PATCH/POST under Interface Profile, I'm able to change the Profile, but not able to apply an predefined Interface Profile to an specific port on one switch.

    -------------------------------------------



  • 4.  RE: Use API to set port profile on switch interface

    Posted 11 hours ago

    Hi,

    The API to use here is: https://developer.arubanetworks.com/new-central-config/reference/updateethernetinterfacesinterfacebyid

    The Port Profiles are (in most cases) defined in the Library. To assign a port profile you need to change the interface at Device Level. For this you need some information to update this via the API:

    Hereby an example to push the port profile at device level.

    URI:
    {api-gw}/network-config/v1alpha1/ethernet-interfaces/:name?object-type=LOCAL&scope-id=123456789&device-function=ACCESS_SWITCH
    
    body:
    {
      "name": "1/1/9",
      "sw-profile": "switches-collorlessport-CNAC"
    }


    ------------------------------
    Willem Bargeman
    Systems Engineer Aruba
    ACEX #125
    ------------------------------



  • 5.  RE: Use API to set port profile on switch interface

    Posted 4 hours ago
    Edited by Collin.Koss 4 hours ago

    I tried this out and it worked for me, but only for a device level port profile. The API would error out when naming a library level port profile. @AA92 Give this a shot and let us know. Thanks Willem.

    -------------------------------------------



  • 6.  RE: Use API to set port profile on switch interface

    Posted 4 hours ago
    For me this is working also for library profiles. But make sure the library port profile is assigned to Global or lower level.

    ---------------------------------
    Willem Bargeman
    Systems Engineer Aruba
    ACEX #125
    ---------------------------------





  • 7.  RE: Use API to set port profile on switch interface

    Posted 12 hours ago

    Do you have an error ?

    Do you using a framework ? (like pycentral ?)



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

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

    PowerArubaCL: Powershell Module to use Aruba Central

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

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------