Skip to content

Instantly share code, notes, and snippets.

@jathanism
Created October 10, 2013 20:09
Show Gist options
  • Select an option

  • Save jathanism/6924739 to your computer and use it in GitHub Desktop.

Select an option

Save jathanism/6924739 to your computer and use it in GitHub Desktop.
Commando subclass to run commands on Cisco and Juniper devices.
from trigger.cmds import Commando
class Runner(Commando):
vendors = ['cisco', 'juniper']
def to_cisco(self, dev, commands=None, extra=None):
commands = ['show clock']
return commands
def to_juniper(self, dev, commands=None, extra=None):
commands = ['show system uptime']
return commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment