Extreme Networks EXOS Python Script: “NameError: name ‘exsh’ is not defined”

Extreme Networks

I was attempting to run a Python script on a Extreme Networks EXOS switch, but it didn’t work.

* switch1.46 # run script snmpassist.py
Traceback (most recent call last):
  File "/usr/local/cfg/snmpassist.py", line 11, in <module>
    config = exsh.clicmd('show config snmp', capture=True)
NameError: name 'exsh' is not defined

The fix was simple, add the following line to the Python script to import the “exsh” module.

Leave a Reply

Your email address will not be published. Required fields are marked *