From 5331dd482c240cd057b1a0e87a24b4ca63b73cc7 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Tue, 13 Sep 2016 14:29:06 -0400 Subject: [PATCH] Cleanup eos (#17548) --- lib/ansible/module_utils/eos.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ansible/module_utils/eos.py b/lib/ansible/module_utils/eos.py index 0fba65c1e7..81d06720a4 100644 --- a/lib/ansible/module_utils/eos.py +++ b/lib/ansible/module_utils/eos.py @@ -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()