New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commando sometimes lists "None" as command in results #168

jathanism opened this Issue Mar 24, 2014 · 1 comment


None yet
1 participant

jathanism commented Mar 24, 2014

This also means, if multiple commands are passed, the results of a single command are returned and there is no indication on which command result is returned.

>>> from trigger.cmds import Commando
>>> class RandomCmds(Commando):
...     vendors=['cisco', 'juniper']
...     def to_cisco(self, device, commands=None, extra=None):
...             cmd = 'show version'
...             return [cmd]
...     def to_juniper(self, device, commands=None, extra=None):
...             return ['show version', 'show system uptime']
>>> device_list = ['', '']
>>> randomcmds = RandomCmds(devices=device_list, force_cli=True)
>>> randomcmds.results
{'': {None: '<output here>',
 '': {None: '<other output>'}

@jathanism jathanism added the bug label Mar 24, 2014


This comment has been minimized.


jathanism commented Feb 4, 2015

It looks like we may have confirmed that this happens in some cases where you define a to_{vendor} but not a from_{vendor}?

See this:

Which apparently can encounter the bug 100% of the time.

jathanism added a commit to jathanism/trigger that referenced this issue Apr 10, 2015

Fix trigger#168 for when Commando sometimes lists "None" as command i…
…n results.

+ Pep8 cleanup, too. This isn't done yet, tho!

@jathanism jathanism closed this in ed1b6b3 Apr 11, 2015

jathanism added a commit that referenced this issue Apr 11, 2015

Merge pull request #209 from jathanism/issue-168
Fix #168 for when Commando sometimes lists "None" as command in results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment