summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Sprygada <privateip@users.noreply.github.com>2016-08-25 22:51:02 -0400
committerGitHub <noreply@github.com>2016-08-25 22:51:02 -0400
commitfb9b98a5435cc3506e2dfaf75c1d8998582f99df (patch)
tree9ce61070341862b99b6b58be1fbf80aa3d820243
parent09f3c3d07411500739efac6e30157c035fff2c8c (diff)
parent9f1ac47f70ba7b5d6172688386cd828639bb03e0 (diff)
downloadansible-fb9b98a5435cc3506e2dfaf75c1d8998582f99df.tar.gz
Merge pull request #17254 from privateip/netcli
adds new property command_string to Command object
-rw-r--r--lib/ansible/module_utils/netcli.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/module_utils/netcli.py b/lib/ansible/module_utils/netcli.py
index 90d8bafeef..1f47cb239d 100644
--- a/lib/ansible/module_utils/netcli.py
+++ b/lib/ansible/module_utils/netcli.py
@@ -102,6 +102,7 @@ class Command(object):
self.command = command
self.output = output
+ self.command_string = command
self.prompt = prompt
self.response = response
@@ -110,7 +111,7 @@ class Command(object):
self.delay = delay
def __str__(self):
- return self.command
+ return self.command_string
class CommandRunner(object):
@@ -145,7 +146,7 @@ class CommandRunner(object):
return cmdobj.response
except KeyError:
for cmd in self.commands:
- if str(cmd) == command and cmd.output == output:
+ if cmd.command == command and cmd.output == output:
self._cache[(command, output)] = cmd
return cmd.response
raise ValueError("command '%s' not found" % command)