mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Removed checks from Nxapi class. D\'oh\!
This commit is contained in:
parent
07f3b27351
commit
261666a01b
1 changed files with 3 additions and 12 deletions
|
@ -201,20 +201,14 @@ class Nxapi(NxapiConfigMixin):
|
|||
|
||||
for cmd in commands:
|
||||
if output and output != cmd.output:
|
||||
try:
|
||||
responses.extend(self.execute(cmds, output=output))
|
||||
except ValueError:
|
||||
responses.extend(self.execute(cmds))
|
||||
responses.extend(self.execute(cmds, output=output))
|
||||
cmds = list()
|
||||
|
||||
output = cmd.output
|
||||
cmds.append(str(cmd))
|
||||
|
||||
if cmds:
|
||||
try:
|
||||
responses.extend(self.execute(cmds, output=output))
|
||||
except ValueError:
|
||||
responses.extend(self.execute(cmds))
|
||||
responses.extend(self.execute(cmds, output=output))
|
||||
|
||||
return responses
|
||||
|
||||
|
@ -223,10 +217,7 @@ class Nxapi(NxapiConfigMixin):
|
|||
|
||||
def configure(self, commands):
|
||||
commands = to_list(commands)
|
||||
try:
|
||||
return self.execute(commands, output='config')
|
||||
except ValueError:
|
||||
return self.execute(commands)
|
||||
return self.execute(commands, output='config')
|
||||
|
||||
def _jsonify(self, data):
|
||||
for encoding in ("utf-8", "latin-1"):
|
||||
|
|
Loading…
Reference in a new issue