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 | 40
Part no.9036931-00 Rev AA February 2021
# Subscribe to vlan events
ev = throwapi.Subscription("vlan")
ev.sub(event_cb)
main()
Note: When you need double quotes for a CLI command in a Python string, you can use a single quote to
delimit the string. Another solution is to use double quote and escape the inner ones with a backslash
“\”. Failing to this will result in an error.
Your program reacts as expected on a switch.
sw1.12 # create process test python-module test start auto
creating test...
* sw1.13 #
* sw1.13 # create vlan 42
* sw1.14 #
* sw1.14 # sh vlan description
-----------------------------------------------------------------------------
Name VID Description
-----------------------------------------------------------------------------
Default 1
interco 4094
Mgmt 4095 Management VLAN
VLAN_0042 42 This is a description for VLAN VLAN_0042
-----------------------------------------------------------------------------
> Indicates description string truncated past 57 characters
Total number of VLAN(s) : 4
* sw1.15 #
* sw1.15 # delete vlan 42
* sw1.16 #
* sw1.16 # sh log
06/08/2020 12:03:34.58 <Info:System.userComment> Ohoh! VLAN VLAN_0042 has
been deleted
06/08/2020 12:03:14.89 <Noti:log.ClrLogMsg> User admin: Cleared the log
messages in memory-buffer.
A total of 2 log messages are displayed.
3.2 External APIs
More advanced automation solutions manage switches from external resources, running from an
application on a server or VM. EXOS offers several APIs.










