noc.core.script.rtsp.base

Module Contents

noc.core.script.rtsp.base.DEFAULT_PROTOCOL = RTSP/1.0
noc.core.script.rtsp.base.DEFAULT_USER_AGENT
noc.core.script.rtsp.base.MULTIPLE_HEADER
class noc.core.script.rtsp.base.RTSPBase(script, tos=None)

Bases: object

name = rtsp
iostream_class
default_port = 554
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)
get_uri(self, port=None)
send(self, method=None, body=None)
submit(self)
get_rtsp_response(self)
static parse_rtsp_header(data)
execute(self, path, method, **kwargs)

Perform request and return result :param path: :param method: :param kwargs: :return:

read_until_end(self)
shutdown_session(self)
class noc.core.script.rtsp.base.DigestAuth(user=None, password=None)

Bases: object

Append HTTP Digest authorisation headers

name = digestauth
get_digest(self, uri, realm, method)
Parameters:
  • uri
  • realm
  • method – GET/POST
Returns:

build_digest_header(self, url, method, digest_response)
Parameters:
  • url – query URL
  • method – GET/POST method
  • digest_response (dict) – dict response header
Returns: