Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aruba/arubaos-switch-api-python
Sample REST API scripts for ArubaOS switch
https://github.com/aruba/arubaos-switch-api-python
api arubaos-switch python
Last synced: 9 days ago
JSON representation
Sample REST API scripts for ArubaOS switch
- Host: GitHub
- URL: https://github.com/aruba/arubaos-switch-api-python
- Owner: aruba
- License: apache-2.0
- Created: 2018-03-07T17:08:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T19:35:23.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T15:05:55.203Z (over 1 year ago)
- Topics: api, arubaos-switch, python
- Language: Python
- Size: 44.9 KB
- Stars: 32
- Watchers: 22
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: License.md
Awesome Lists containing this project
README
# arubaos-switch-python
These scripts are written for ArubaOS Switch API version 4.0.
## Structure
* REST API call functions are found in the /src folder.
* Functions from the /src folder are combined to emulate network processes that are stored in the /workflows folder.
* Data to be imported into functions is stored in the /sampledata folder.## How to run this code
There are different workflows covered in this repo under /workflows directory. Before starting ensure the switch REST API is enabled:
```switch# rest-interface```In order to run these scripts, please complete the steps below:
1. install virtual env (refer https://docs.python.org/3/library/venv.html). Make sure python version 3 is installed in system.
```
$ python3 -m venv switchenv
```
2. Activate the virtual env
```
$ source switchenv/bin/activate
```
3. Install all packages required from requirements file
```
(switchenv)$ pip install -r /arubaos-switch-api-python/requirements.txt
```4. Open the project arubaos-switch-api-python from an editor (eg: Pycharm)
5. Set the project interpreter as the new virtual env created in step 1
6. Go to corresponding data yaml of each workflow and give the correct switch ip and credentials
7. Now you can run different workflows from arubaos-switch-api-python/workflows E.G. `base_provision.py`