Cleanup eos (#17548)
This commit is contained in:
parent
e9ffe2062f
commit
5331dd482c
1 changed files with 3 additions and 4 deletions
|
@ -35,7 +35,6 @@ from ansible.module_utils.network import add_argument, register_transport, to_li
|
|||
from ansible.module_utils.netcli import Command
|
||||
from ansible.module_utils.shell import CliBase
|
||||
from ansible.module_utils.urls import fetch_url, url_argument_spec
|
||||
from ansible.module_utils.netcli import Command
|
||||
|
||||
EAPI_FORMATS = ['json', 'text']
|
||||
|
||||
|
@ -112,6 +111,7 @@ class EosConfigMixin(object):
|
|||
commands = ['configure session %s' % session, 'abort']
|
||||
self.execute(commands)
|
||||
|
||||
|
||||
class Eapi(EosConfigMixin):
|
||||
|
||||
def __init__(self):
|
||||
|
@ -178,8 +178,8 @@ class Eapi(EosConfigMixin):
|
|||
if self.enable is not None:
|
||||
commands.insert(0, self.enable)
|
||||
|
||||
data = self._get_body(commands, output)
|
||||
data = json.dumps(data)
|
||||
body = self._get_body(commands, output)
|
||||
data = json.dumps(body)
|
||||
|
||||
headers = {'Content-Type': 'application/json-rpc'}
|
||||
|
||||
|
@ -208,7 +208,6 @@ class Eapi(EosConfigMixin):
|
|||
|
||||
return response['result']
|
||||
|
||||
|
||||
def run_commands(self, commands, **kwargs):
|
||||
output = None
|
||||
cmds = list()
|
||||
|
|
Loading…
Reference in a new issue