Developer Community

Reply
Highlighted
MVP Guru Elite

ArubaCX: add interface vlan with API 10.04

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)

 



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

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

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

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Occasional Contributor I

Re: ArubaCX: add interface vlan with API 10.04

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

Highlighted
MVP Guru Elite

Re: ArubaCX: add interface vlan with API 10.04

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)

 



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

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

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

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Occasional Contributor I

Re: ArubaCX: add interface vlan with API 10.04

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

Highlighted
MVP Guru Elite

Re: ArubaCX: add interface vlan with API 10.04

Ok, thanks,

 

FYI, i have also open a case to TAC

 

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



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

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

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

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Aruba Employee

Re: ArubaCX: add interface vlan with API 10.04

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

Highlighted
MVP Guru Elite

Re: ArubaCX: add interface vlan with API 10.04

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



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

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

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

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Aruba Employee

Re: ArubaCX: add interface vlan with API 10.04

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.
Highlighted
MVP Guru Elite

Re: ArubaCX: add interface vlan with API 10.04

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



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

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

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

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Aruba Employee

Re: ArubaCX: add interface vlan with API 10.04

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

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: