Developer

 View Only
last person joined: 6 days ago 

Expand all | Collapse all

Aruba Central MSP - Create Template Group for Tenant

This thread has been viewed 24 times
  • 1.  Aruba Central MSP - Create Template Group for Tenant

    Posted Jun 10, 2020 09:31 AM

    Hello,

    I am working on automation project for our Network-aaS. We are using Aruba Central (AC) in MSP mode. I am working with API calls to achieve particular tasks.

     

    I want to achieve the same flow using API calls as I would do manually. 

     

    1. Create Tenant

    2. Assign Device to Tenant (Auto subscription ON)

    3. Create Template Group under tenant

    4. Create template

    5. Upload variables

     

    I am struggling with task of creation of template group for particular tenant.

    API call to Create Group does not specify customer. Actually it creates MSP group, which do not support template style.

    I haven't found the way how to create group under specific tenant, or how to specify tenant in order to create group.

     

    Only workaround it seems to be create new tokens for particular tenant, but then you need keep track of refresh tokens etc.

     

    We have the same template for all tenants, everything depends on used variables.

     

    Q: Is there a way how to create template group under specific tenant from MSP point of view?

    What is the correct process/workflow how to create template group for specific tenant.

     

    Thank you for reply.

    BR Martin



  • 2.  RE: Aruba Central MSP - Create Template Group for Tenant

    EMPLOYEE
    Posted Jun 16, 2020 10:01 PM
      |   view attached

    Hi Martin,

     

    That is good use case for automation. There are API endpoints specific to MSP to deal with the templates of tenants. You can find them under

     

    1. Open API Gateway page:

    Account Home -> API Gateway -> APIs -> Click on API Gateway URL in "All Published APIs" Table.

    2. Choose "Configuration" from URL dropdown and select "MSP Templates" from side bar. Screenshot attached. You can find the details and documentation of the endpoint in this page.

     

    This API Endpoint will apply tenant's template in the respective template group.

     

    /configuration/v2/msp/templates/end_customers/{cid}/{device_type}/{version}/{model}/groups

     

     

    This API endpoint will apply to all groups within tenant. But with one API call you can apply template to multiple tenants.

     

    /configuration/v2/msp/templates/end_customers/{device_type}/{version}/{model}

     

     

    You can find the getting started guide for automation in Aruba's Developer Hub. Checkout the Central Product guide section.

    https://developer.arubanetworks.com/

     

    In addition, we have python scripts in our GitHub Repository that you can use for your automation workflow. Checkout the rest-api-python-scripts section.

    https://github.com/aruba/central-examples-only

     

    Thanks,

    Karthik



  • 3.  RE: Aruba Central MSP - Create Template Group for Tenant

    Posted Jul 08, 2020 05:14 AM

    Hello,

    I am sorry for late reply, but I was on sick leave.

     

    I have checked your input and I have to admit that I am still confused.

    I verified that API menu MSP Templates under Configuration. That was my first idea, where to search.

     

    Maybe I am still missing some pieces in the picture.

     

    Basically, there are two API calls which do apply/update (aka HTTP POST method) under MSP Templates.

    These API call are handling Template operation. The second one you can specify group, but I do not know how to create group under Tenant using API, so that I could reference it later in Template call.

     

    I am struggling to create configuration group (template group) under customer/tenant.

     

    API call to create group with MSP access token creates MSP Group. In case template_info under group attribute is set to "true" for particular device, then MSP group is created, it is not visible in the list of groups under Organization (only counter is increased). You can GET info about groups via API call, they are configured. But you cannot apply it, as it is Template group, which are not supported in MSP.

     

    Default group under tenant is UI group.

     

    {
    "group": "Central_Group",
    "group_attributes": {
    "group_password": "Aru2Ba@",
    "template_info": {
    "Wired": true,
    "Wireless": true
    }
    }
    }

     

    In my case, I need to create template group under tenant, not under MSP.

    Maybe I am wrong, but I haven't found any API call how to apple this MSP template group to tenant.

     

    I had discussion with  Aruba system engineer and he pointed me to the solution to handle it in tenant and handle keys via MSP account.

     

    Thank you for input.

    BR Martin Orlich



  • 4.  RE: Aruba Central MSP - Create Template Group for Tenant

    MVP GURU
    Posted Jul 18, 2020 04:19 AM

     

    I had discussion with  Aruba system engineer and he pointed me to the solution to handle it in tenant and handle keys via MSP account.

     

     


    for me, it is the solution, there is a MSP API for get client_id/secret_id for tenant (customer_id)

     



  • 5.  RE: Aruba Central MSP - Create Template Group for Tenant
    Best Answer

    Posted Jul 20, 2020 05:09 AM

    Hello,

    Thank you all for the reply.

     

    I have verified documentation and basically the easiest way is to create tokens in tenant and run API calls under tenant. With this approach I am able to create groups, templates and so on.

     

    I found the way how to do it in this document:

     

    https://help.central.arubanetworks.com/latest/documentation/online_help/content/pdfs/aruba_central_api_gateway_automation_guide.pdf

     

    My only concerns are from security point of view how to securely store tokens. But that is for other discussion.

     

    BR Martin Orlich



  • 6.  RE: Aruba Central MSP - Create Template Group for Tenant

    Posted Jun 29, 2021 01:45 PM
    Hi Martin, 

     could you please send me the pdf because I want to make the same work 

    Elouassif

    ------------------------------
    Elouassif Abdelaziz
    ------------------------------