1"""
2A driver for the Adtran DSLAMs.
3
4The DSLAMs only report "OpenSSH" in their SSH remote protocol id and have
5no SSH banner so no possibility for check_*_for_os().
6
7"""
8from __future__ import absolute_import
9from .driver import Driver
10
11
12class AdtranDriver(Driver):
13
14    def __init__(self):
15        Driver.__init__(self, 'adtran')
16
17    def init_terminal(self, conn):
18        conn.execute('terminal length 0')
19        conn.execute('terminal column 0')
20
21    def auto_authorize(self, conn, account, flush, bailout):
22        self.init_terminal(conn)
23        conn.send('enable\r\n')
24        conn.app_authorize(account, flush, bailout)
25