noc.core.script.cli.telnet

Module Contents

noc.core.script.cli.telnet._logger
noc.core.script.cli.telnet.IAC = 255
noc.core.script.cli.telnet.DONT = 254
noc.core.script.cli.telnet.DO = 253
noc.core.script.cli.telnet.WONT = 252
noc.core.script.cli.telnet.WILL = 251
noc.core.script.cli.telnet.SB = 250
noc.core.script.cli.telnet.SE = 240
noc.core.script.cli.telnet.NAWS = 31
noc.core.script.cli.telnet.AO = 245
noc.core.script.cli.telnet.AYT = 246
noc.core.script.cli.telnet.B_IAC
noc.core.script.cli.telnet.B_SB
noc.core.script.cli.telnet.B_SE
noc.core.script.cli.telnet.B_IAC2
noc.core.script.cli.telnet.B_IAC_SB
noc.core.script.cli.telnet.B_IAC_SE
noc.core.script.cli.telnet.B_NAWS =
noc.core.script.cli.telnet.B_OPT_TTYPE_IS = 
noc.core.script.cli.telnet.B_OPT_WS =
noc.core.script.cli.telnet.B_TERMINAL_TYPE = XTERM
noc.core.script.cli.telnet.IAC_CMD
noc.core.script.cli.telnet.IGNORED_CMD
noc.core.script.cli.telnet.TELNET_OPTIONS
noc.core.script.cli.telnet.ACCEPTED_TELNET_OPTIONS
noc.core.script.cli.telnet.OPTS
noc.core.script.cli.telnet.bytes_seq(*args)
class noc.core.script.cli.telnet.TelnetParser(logger=None, writer=None, naws='x00x80x00x80')

Bases: object

Telnet protocol state and commands processing

feed(self, chunk)

Feed chunk of data to parser

Parameters:chunk – String
Returns:Parsed data
send_iac(self, cmd, opt)

Send IAC response

send_iac_sb(self, opt, data=None)
process_iac(self, cmd, opt)

Process IAC command.

process_iac_sb(self, sb)
static iac_repr(cmd, opt)

Human-readable IAC sequence :param cmd: :param opt: :return:

static escape(data)
set_writer(self, writer)

Replace current writer.

Parameters:writer – Callable accepting bytes
Returns:
class noc.core.script.cli.telnet.TelnetIOStream(sock, cli, *args, **kwargs)

Bases: tornado.iostream.IOStream

startup(self)
read_from_fd(self)
write(self, data, callback=None)
class noc.core.script.cli.telnet.TelnetCLI

Bases: noc.core.script.cli.base.CLI

name = telnet
default_port = 23
iostream_class