Skip to content

Commit

Permalink
Cleaning up flake8 post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Sep 13, 2016
1 parent 2c590de commit 49348f3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
16 changes: 9 additions & 7 deletions netmiko/alcatel/alcatel_sros_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Alcatel-Lucent SROS support."""
from __future__ import print_function
from __future__ import unicode_literals
import re
from netmiko.cisco_base_connection import CiscoSSHConnection

Expand All @@ -23,15 +25,15 @@ def enable(self, *args, **kwargs):

def config_mode(self, config_command='configure', pattern='#'):
""" Enter into configuration mode on SROS device."""
return super(SSHConnection, self).config_mode(config_command=config_command,
pattern=pattern)
return super(AlcatelSrosSSH, self).config_mode(config_command=config_command,
pattern=pattern)

def exit_config_mode(self, exit_config='exit all', pattern='#'):
""" Exit from configuration mode."""
return super(SSHConnection, self).exit_config_mode(exit_config=exit_config,
pattern=pattern)
return super(AlcatelSrosSSH, self).exit_config_mode(exit_config=exit_config,
pattern=pattern)

def check_config_mode(self, check_string='config', pattern='#'):
""" Checks if the device is in configuration mode or not. """
return super(SSHConnection, self).check_config_mode(check_string=check_string,
pattern=pattern)
return super(AlcatelSrosSSH, self).check_config_mode(check_string=check_string,
pattern=pattern)
10 changes: 0 additions & 10 deletions netmiko/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ def read_channel(self):
elif self.protocol == 'telnet':
return self.remote_conn.read_very_eager().decode('utf-8', 'ignore')

### # Options for SSH host_keys
### self.use_keys = use_keys
### self.key_file = key_file
### self.system_host_keys = system_host_keys
### self.alt_host_keys = alt_host_keys
### self.alt_key_file = alt_key_file

### self.establish_connection()
### self.session_preparation()

def _read_channel_expect(self, pattern='', re_flags=0):
"""
Function that reads channel until pattern is detected.
Expand Down
8 changes: 1 addition & 7 deletions netmiko/cisco/cisco_nxos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
from __future__ import print_function
from __future__ import unicode_literals
import re
import time
from netmiko.cisco_base_connection import CiscoSSHConnection


class CiscoNxosSSH(CiscoSSHConnection):

def session_preparation(self):
"""Prepare the session after the connection has been established."""
self.set_base_prompt()
self.disable_paging()
self.set_terminal_width(command='terminal width 511')

def session_preparation(self):
"""
Prepare the session after the connection has been established.
Expand Down
6 changes: 4 additions & 2 deletions netmiko/vyos/vyos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from netmiko.ssh_connection import BaseSSHConnection
from __future__ import print_function
from __future__ import unicode_literals
from netmiko.cisco_base_connection import CiscoSSHConnection


class VyOSSSH(BaseSSHConnection):
class VyOSSSH(CiscoSSHConnection):
"""Implement methods for interacting with VyOS network devices."""

def session_preparation(self):
Expand Down

0 comments on commit 49348f3

Please sign in to comment.