Skip to content

Instantly share code, notes, and snippets.

@tcuthbert
Created May 25, 2016 01:19
Show Gist options
  • Save tcuthbert/8ec1255d91c48cd0966eec3dcec6122f to your computer and use it in GitHub Desktop.
Save tcuthbert/8ec1255d91c48cd0966eec3dcec6122f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import sys
from twisted.python import log
from time import sleep
log.startLogging(sys.stdout, setStdout=False)
from trigger.netdevices import NetDevices, NetDevice
nd = NetDevices()
devs = [
nd.find('arista-sw1'),
nd.find('r1.demo.local'),
]
for dev in devs:
dev.open()
sleep(5)
r1 = dev.run_commands(['show clock'])
r2 = dev.run_commands(['show ip int brief'])
r3 = dev.run_commands(['show version'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment