Created
October 10, 2013 20:09
-
-
Save jathanism/6924739 to your computer and use it in GitHub Desktop.
Commando subclass to run commands on Cisco and Juniper devices.
This file contains hidden or 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
| 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