noc.core.script.mml.base

Module Contents

class noc.core.script.mml.base.MMLBase(script, tos=None)

Bases: object

name = mml
iostream_class
default_port
BUFFER_SIZE
MATCH_TAIL = 256
CONNECT_RETRIES
CONNECT_TIMEOUT
HAS_TCP_KEEPALIVE
HAS_TCP_KEEPIDLE
HAS_TCP_KEEPINTVL
HAS_TCP_KEEPCNT
HAS_TCP_NODELAY
KEEP_IDLE = 10
KEEP_INTVL = 10
KEEP_CNT = 3
close(self)
close_iostream(self)
deferred_close(self, session_timeout)
_set_close_timeout(self, session_timeout)

Wrapper to deal with IOLoop.add_timeout thread safety problem :param session_timeout: :return:

create_iostream(self)
set_timeout(self, timeout)
set_script(self, script)
send(self, cmd)
submit(self)
get_mml_response(self)
execute(self, cmd, **kwargs)

Perform command and return result :param cmd: :param kwargs: :return:

read_until_end(self)
shutdown_session(self)