Developer

last person joined: 2 days ago 

Expand all | Collapse all

ArubaCX: add interface vlan with API 10.04

This thread has been viewed 3 times
  • 1.  ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Feb 19, 2020 04:20 AM

    Hi,

     

    I try to use ArubaCX 10.04 API for add a new interface vlan, i can add the interface but i get after 500 error when i try to check the interface (and the interface is not display when make a show run)

     

    i using the following command : (based from API 10.04 Rest Guide : Page64)

     

     

    curl -k -X POST \
    -c /tmp/auth_cookie \
    -H 'Content-Type: multipart/form-data' \
    "https://10.76.157.98/rest/v10.04/login" \
    -F username=admin -F password=mypassword
    
    
    curl -k -X POST \
    -b /tmp/auth_cookie -d '{
    "name":"VLAN2",
    "id":2,
    "type":"static",
    "admin":"up"}' \
    "https://10.76.157.98/rest/v10.04/system/vlans"

     

     

     

    There is 2 mistake for this part (on the doc):

     

     

     

    curl -k  -X POST \
    -b /tmp/auth_cookie -d '{
    "vrf": "/rest/v10.04/system/vrfs/default",
    "type": "vlan",
    "vlan_tag":"/rest/v10.04/system/vlans/2",
    "name":"vlan2"}' \
    -D- "https://10.76.157.98/rest/v10.04/system/interfaces"

     

     

    wrong name (VLAN2 => vlan2) and missing type value

     

    and after when look show run, don't display the interface vlan2...

     

    and when try to get interface

     

     

    curl -k -X GET \
    -b /tmp/auth_cookie \
    "https://10.76.157.98/rest/v10.04/system/interfaces/vlan2"

     

     

    i get the a error 500 (Internal service Error)

     



  • 2.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Feb 19, 2020 07:25 PM

    Hi Al,

     

    First of all, thanks for pointing out the inconsistency of the names "VLAN2" and "vlan2" in the guide.

     

    In your testing, did you make sure to use the same name (either "VLAN2" or "vlan2") for both the interface and the VLAN?

     

    Also, what is the release version of the AOS-CX OS you experienced this on? Maybe it's a bug--I can try it myself to see if I also have this issue.

     

    Thanks,

    Derek



  • 3.  RE: ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Feb 20, 2020 04:21 AM

    Hi Derek,

     

    There is also "type" value missing...

     

    i remake a try with same name (vlan2) and i get always Internal Server Error

     

    I using ArubaCX-OVA (10.04) and also try with 8320 and last 10.04 firmware ! (10.04.0030)

     



  • 4.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Feb 21, 2020 07:27 PM

    Hey Alexis,

     

    You're right. I tried with the 10.04 OVA and got the same result as you. After talking with the rest of my team (Switching TME Automation team), my conclusion is that this is an issue caused by a bug in the REST API that involves L3 interfaces. The bug is already known and being worked on.

     

    Thanks,

    Derek



  • 5.  RE: ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Feb 22, 2020 05:14 AM

    Ok, thanks,

     

    FYI, i have also open a case to TAC

     

    also there is a API call for remove checkpoint ? not found on swagger ?



  • 6.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Feb 27, 2020 07:32 PM

    There is currently no API endpoint to make a call and remove a configuration checkpoint.



  • 7.  RE: ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Feb 28, 2020 02:24 AM

    Hi Kelvinj, thanks for feedback, it is planned ? because it is a missing feature for me... (it is possible to remove checkpoint via CLI...)



  • 8.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Mar 04, 2020 12:32 PM

    Alexis, 

    This API end point is for sure in the plan. I do not have a timeline for you at this point.

    that operation is possible via CLI.

    erase {checkpoint <CHECKPOINT-NAME> | startup-config | all}
    
    Syntax:
    erase {checkpoint <CHECKPOINT-NAME> | startup-config | all}
    
    Description:
    Deletes an existing checkpoint, startup configuration, or all checkpoints.


  • 9.  RE: ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Mar 05, 2020 03:12 AM

    Yes, i know for CLI but i need for API (i want to remove unneeded checkpoint...)



  • 10.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Mar 05, 2020 11:54 AM

    I understan now. Yes this API end poing is planed to come. On timeline information I think PLM would have more information. 



  • 11.  RE: ArubaCX: add interface vlan with API 10.04

    MVP GURU
    Posted Mar 06, 2020 04:39 AM

    Hi,

     

    Thanks, (it is always Scott the PLM ?)



  • 12.  RE: ArubaCX: add interface vlan with API 10.04

    EMPLOYEE
    Posted Mar 06, 2020 11:06 AM

    That is correct.