Developer Community

Reply
New Contributor

Re: ArubaOS: Set port name/description to blank (via API/REST)

The key in this resourse will be updated in the AOS-S 16.09 release. 

The name key will allow for a "null" or "zero length" name.

"name":
        {
            "description": "The name of the Port. An \"\" denotes removal of 
           already configured name if exists.",
           "type": "string", 
            "maxLength": 64, 
            "minLength": 0, 
            "sql.unique": true
        },

with a cURL commnad like:curl --noproxy <switch IP> --cookie "<sessionId cookie>" -i -k -X PUT https://<switch IP>/rest/v7/ports/<port ID> -d '{"id": "7", "name": "testPort"}'a response like this will be returned from the API: 

{
"uri":"/ports/7","id":"7",
"name":"testPort",
"is_port_enabled":true,
"is_port_up":false,
"config_mode":"PCM_AUTO",
"trunk_mode":"PTT_NONE",
"lacp_status":"LAS_DISABLED",
"trunk_group":"",
"is_flow_control_enabled":false,
"is_dsnoop_port_trusted":false
}

or if left empty, curl --noproxy <switch IP> --cookie "<sessionId cookie>" -i -k -X PUT https://<switch IP>/rest/v7/ports/<port ID> -d '{"id": "7", "name": ""}'the respose from the API is:

{
"uri":"/ports/7",
"id":"7",
"name":"",
"is_port_enabled":true,
"is_port_up":false,
"config_mode":"PCM_AUTO",
"trunk_mode":"PTT_NONE",
"lacp_status":"LAS_DISABLED",
"trunk_group":"",
"is_flow_control_enabled":false,
"is_dsnoop_port_trusted":false
}
MVP Expert

Re: ArubaOS: Set port name/description to blank (via API/REST)

Yes, i have see this but not yet tested... (and there is also some other field where it is complicated to set default value...)




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




ACMP 6.4 / ACMX #107 / ACCP 6.5
Aruba Employee

Re: ArubaOS: Set port name/description to blank (via API/REST)

The updates to the 16.09 API v7 are detailed in the REST guide, these act as the API release notes. See chapter 4:

 

https://support.hpe.com/hpsc/doc/public/display?docId=a00076277en_us

MVP Expert

Re: ArubaOS: Set port name/description to blank (via API/REST)


@joeneville wrote:

The updates to the 16.09 API v7 are detailed in the REST guide, these act as the API release notes. See chapter 4:

 

https://support.hpe.com/hpsc/doc/public/display?docId=a00076277en_us


Yes Changelog is nice !




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




ACMP 6.4 / ACMX #107 / ACCP 6.5
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: