summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/cliconf
diff options
context:
space:
mode:
authorNilashish Chakraborty <nilashishchakraborty8@gmail.com>2019-02-18 19:35:40 +0530
committerGitHub <noreply@github.com>2019-02-18 19:35:40 +0530
commitbc403dbcda1edb8ebeee275fa3344ab88bc54ab1 (patch)
tree5064e5552bc51c9f33a8bef8d1cb63c431ea3576 /lib/ansible/plugins/cliconf
parent2b9341f13924274cd8434fbd2164858d4fd54e1d (diff)
downloadansible-bc403dbcda1edb8ebeee275fa3344ab88bc54ab1.tar.gz
Added new module - frr_facts (#51804)
* Add new module frr_facts Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix return value Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Handle empty row for mpls ldp neighbors Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix CI Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Remove timestamp from cliconf pluging * Updated examples Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix sanity tests Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
Diffstat (limited to 'lib/ansible/plugins/cliconf')
-rw-r--r--lib/ansible/plugins/cliconf/frr.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/ansible/plugins/cliconf/frr.py b/lib/ansible/plugins/cliconf/frr.py
index be80b04aec..37ba5ba4e0 100644
--- a/lib/ansible/plugins/cliconf/frr.py
+++ b/lib/ansible/plugins/cliconf/frr.py
@@ -187,12 +187,11 @@ class Cliconf(CliconfBase):
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, check_all=check_all)
- def run_commands(self, commands=None, check_rc=True, return_timestamps=False):
+ def run_commands(self, commands=None, check_rc=True):
if commands is None:
raise ValueError("'commands' value is required")
responses = list()
- timestamps = list()
for cmd in to_list(commands):
if not isinstance(cmd, Mapping):
cmd = {'command': cmd}
@@ -203,16 +202,11 @@ class Cliconf(CliconfBase):
try:
out = self.send_command(**cmd)
- timestamp = get_timestamp()
except AnsibleConnectionFailure as e:
if check_rc:
raise
out = getattr(e, 'err', to_text(e))
responses.append(out)
- timestamps.append(timestamp)
- if return_timestamps:
- return responses, timestamps
- else:
- return responses
+ return responses