mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
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:
parent
9fe4308670
commit
972dc3fc97
9 changed files with 140 additions and 163 deletions
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue