09-11-2018 11:27 AM
You need to download REST API JSON and Schema
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
Re: Are concurrent REST API sessions possible on HP-2920
09-28-2018 10:17 AM
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...
# 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']