Network module cleanup (#17334)

* Clean up EOS, IOS, IOS-XR, Junos, NX-OS, and OpenSwitch

* Cleanup net* files

* Re-add NetworkModule import to network module_utils files

This will trick modules into importing code from module_utils code, thus
including it in the final Ansiballz zipfile.

* Give asa a look over, too
This commit is contained in:
Nathaniel Case 2016-09-06 13:49:48 -04:00 committed by GitHub
commit 972dc3fc97
9 changed files with 140 additions and 163 deletions

View file

@ -28,10 +28,10 @@
import re
from ansible.module_utils.network import NetworkModule, NetworkError
from ansible.module_utils.network import Command
from ansible.module_utils.shell import CliBase
from ansible.module_utils.netcli import Command
from ansible.module_utils.network import NetworkError, NetworkModule
from ansible.module_utils.network import register_transport, to_list
from ansible.module_utils.shell import CliBase
class Cli(CliBase):
@ -55,17 +55,9 @@ class Cli(CliBase):
def connect(self, params, **kwargs):
super(Cli, self).connect(params, kickstart=False, **kwargs)
self.shell.send(['terminal length 0',
'terminal exec prompt no-timestamp'])
self.shell.send(['terminal length 0', 'terminal exec prompt no-timestamp'])
### implementation of netcli.Cli ###
def run_commands(self, commands):
cmds = to_list(commands)
responses = self.execute(cmds)
return responses
### implementation of netcfg.Config ###
### Config methods ###
def configure(self, commands, **kwargs):
cmds = ['configure terminal']