Created
February 11, 2016 14:21
-
-
Save tcuthbert/bb9845f0ec49d80db367 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from trigger.cmds import StructuredOutput | |
from twisted.python import log | |
class ShowSNMP(StructuredOutput): | |
"""Execute 'show clock' on a list of Cisco devices.""" | |
vendors = ['cisco'] | |
commands = ['show snmp community'] | |
if __name__ == '__main__': | |
log.startLogging(sys.stdout, setStdout=False) | |
device_list = ['r1.demo.local'] | |
show_snmp_community = ShowSNMP(devices=device_list) | |
show_snmp_community.run() # Commando exposes this to start the event loop | |
print '\nResults:' | |
print show_snmp_community.results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment