Wired Intelligent Edge (Campus Switching and Routing)

Upcoming community maintenance Oct. 27th through Oct. 29th
For more info click here
Reply
Highlighted
MVP Guru Elite

Re: Are concurrent REST API sessions possible on HP-2920

You need to download REST API JSON and Schema

 

https://h10145.www1.hpe.com/downloads/SoftwareReleases.aspx?ProductNumber=J9836A&lang=&cc=&prodSeriesId=

And after go on folder device-rest-api -> services and common or wired following what you need for PoE it is on wired and open HTML file

 



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

View solution in original post

Highlighted
Occasional Contributor I

Re: Are concurrent REST API sessions possible on HP-2920

Thx for your help. Attatched is the code that worked (note I use 3 threads for API access, as more than that causes the switch to reject sessions, which I assumed must be a switch limitation). I did not include a requirements.txt for a virtual environment, so you will need to pip install requests and yaml to your virtual environment.

 

Since I cannot upload files with .py extension...

Please rename the attached aruba_common.txt  and aruba_commands.txt to .py files

Please rename the attached aruba.txt file to aruba.yaml

 

 

How to use...

 

import aruba_commands

# YAML config file provides the data for looking-up the named switch credentials and port numbers on which named devices are found
using aruba_commands.switch_session(switch_name='bbsb') as session:

# PoE bounce the switch ports on which the 'fca' and 'vns' devices are found session.poe_bounce(['fca', 'vns']

 

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