from trigger.cmds import Commando
from trigger.netdevices import NetDevices
import simplejson as json
class RunCommands(Commando):
"""Execute 'show clock' on a list of Cisco devices."""
# vendors = ['cisco']
commands = ['write']
if __name__ == '__main__':
nd = NetDevices()
device_list = nd.search('xxx')
print device_list
setupcommands = RunCommands(timeout=2,devices=device_list)
setupcommands.run() # Commando exposes this to start the event loop
print setupcommands.store_error(nd,TimeoutError)
print '\nResults:'
print json.dumps(setupcommands.results, indent=4)