aruba / arubaos-switch-api-python Goto Github PK
View Code? Open in Web Editor NEWSample REST API scripts for ArubaOS switch
License: Apache License 2.0
Sample REST API scripts for ArubaOS switch
License: Apache License 2.0
Password in sampledata/data.yaml has to be defined as string , the original example will cause switch returns Bad Request 400 error.
user: admin
password: admin ---> Looks like admin has to be replaced as "admin" so a correct Post request can be generated by Request Module and interpreted by switch
The 'port_update' in /src/ports.py/
function in its core is not working. When doing an exact same manual API call with Postman by simply doing a call to:
https://<host IP>:443/rest/v4/ports/9
with a correct cookie I get a time-out on the switch, no response whatsoever and the interface stays in its state it had before.
When I fill in a raw body with:
{"id":"9"}
I get a full JSON object response of the interface. (E.g. ID, is_port_up, is_dsnoop_port_trusted, etc...)
Nothing changes.
When I fill in a raw body with:
{"id":"9","is_port_up":"true"}
I get a full JSON object response of the interface. (E.g. ID, is_port_up, is_dsnoop_port_trusted, etc...)
Nothing changes.
When filling in a raw body with:
{"id":"9","is_port_enabled":"true"}
I get the response:
{ "message": "Wrong type for port enable" }
Whatever I tried the port doesn't change its admin status from up > down or down > up. Documentation of Aruba about the ArubaOS-S API is also too limited to get anywhere.
In any case the way it is shown in /src/ports.py
will not work.
Or, I am doing something wrong myself. If so, would love a raw Python requests example for simply this function in itself. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.