Extreme API with Python
Table Of Contents
- 1 Preface
- 2 Introduction
- 3 EXOS APIs
- 4 VOSS API
- 5 XMC API
- 6 ExtremeCloud IQ API
- 7 Extreme Campus Controller API
Extreme API with Python
Page | 58
Part no.9036931-00 Rev AA February 2021
# you list the existing vlans after to check again
print("-"*42)
list_vlans(rest)
main()
The result:
C:\Extreme API with Python> rest_voss.py -i 192.168.56.141
Enter remote system username: rwa
Remote system password:
Found VLAN Test with VID 40
Found VLAN Default with VID 1
------------------------------------------
Found VLAN Test with VID 40
Found VLAN H2G2 with VID 42
Found VLAN Default with VID 1
------------------------------------------
Found VLAN Test with VID 40
Found VLAN Default with VID 1
4.4 EXOS & VOSS Restconf Python Classes
On the Extreme Networks github, both Restconf Python classes share the same name (restconf.py) but
have a different name in XMC 8.5. If you plan to use both Python classes together, you can rename one
and import it with the “as” keyword to differentiate it, as shown here:
from restconf import Restconf as EXOSRestconf
from restconf_voss import Restconf as VOSSRestconf
Or place them in different sub-directories with __init__.py (empty) file, as shown here:
~/extreme $ tree
VOSS/
├── README.md
├── __init__.py
└── restconf.py
EXOS/
├── README.md
├── __init__.py
└── restconf.py
It would then resemble this:
from EXOS.restconf import Restconf as exos_restconf
from VOSS.restconf import Restconf as voss_restconf










