Module Import alias Import alias Import alias Import alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str Str AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Return SubscriptLoad NameLoad Slice Num UnaryOpUSub BinOpAdd Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num If BoolOpAnd NameLoad CompareEq Call NameLoad Call AttributeLoad NameLoad attr Str Num body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Return NameLoad decorator_list decorator_list
N/A N/A os N/A signal N/A subprocess N/A time beaver.base_log BaseLog create_ssh_tunnel N/A N/A beaver_config logger N/A None N/A N/A Returns a BeaverSshTunnel object if the current config requires us to N/A N/A N/A N/A beaver_config use_ssh_tunnel N/A N/A None N/A N/A N/A logger info Proxying transport using through local ssh tunnel N/A N/A BeaverSshTunnel beaver_config logger logger N/A BeaverSubprocess N/A BaseLog N/A N/A General purpose subprocess wrapper __init__ N/A N/A self beaver_config logger N/A None N/A N/A Child classes should build a subprocess via the following method:

           self._subprocess = subprocess.Popen(cmd, stdout=subprocess.PIPE, preexec_fn=os.setsid)

        This will allow us to attach a session id to the spawned child, allowing
        us to send a SIGTERM to the process on close
         N/A N/A N/A N/A super BeaverSubprocess self __init__ logger logger N/A N/A self _log_template [BeaverSubprocess] - {0} N/A N/A self _beaver_config beaver_config N/A N/A self _command sleep 1 N/A N/A self _subprocess None N/A N/A self _logger logger N/A run N/A N/A self N/A N/A N/A N/A N/A self _log_debug N/A N/A Running command: {0} format N/A self _command N/A N/A self _subprocess N/A N/A subprocess Popen N/A /bin/sh -c N/A self _command preexec_fn N/A os setsid N/A N/A N/A self poll N/A poll N/A N/A self N/A N/A N/A Poll attached subprocess until it is available N/A N/A N/A self _subprocess None N/A N/A N/A N/A N/A self _subprocess poll N/A N/A N/A time sleep N/A N/A N/A self _beaver_config get subprocess_poll_sleep N/A close N/A N/A self N/A N/A N/A Close child subprocess N/A N/A N/A self _subprocess None N/A N/A N/A N/A os killpg N/A N/A self _subprocess pid N/A signal SIGTERM N/A N/A self _subprocess None N/A N/A BeaverSshTunnel N/A BeaverSubprocess N/A N/A SSH Tunnel Subprocess Wrapper __init__ N/A N/A self beaver_config logger N/A None N/A N/A N/A N/A N/A super BeaverSshTunnel self __init__ beaver_config logger logger N/A N/A self _log_template [BeaverSshTunnel] - {0} N/A key_file N/A N/A beaver_config get ssh_key_file N/A tunnel N/A N/A beaver_config get ssh_tunnel N/A tunnel_port N/A N/A beaver_config get ssh_tunnel_port N/A remote_host N/A N/A beaver_config get ssh_remote_host N/A remote_port N/A N/A beaver_config get ssh_remote_port N/A ssh_opts N/A N/A N/A N/A self get_port tunnel N/A N/A N/A N/A ssh_opts append N/A N/A -p {0} format N/A N/A self get_port tunnel N/A tunnel N/A N/A self get_host tunnel N/A N/A N/A ssh_opts append -n N/A N/A N/A ssh_opts append -N N/A N/A N/A ssh_opts append -o BatchMode=yes N/A ssh_opts N/A ssh_opts N/A N/A beaver_config get ssh_options N/A command while true; do ssh {0} -i "{4}" "{5}" -L "{1}:{2}:{3}"; sleep 10; done N/A N/A self _command N/A N/A command format N/A N/A join ssh_opts tunnel_port remote_host remote_port key_file tunnel N/A N/A N/A self run N/A get_host N/A N/A self tunnel N/A None N/A N/A port N/A N/A self get_port tunnel N/A N/A port N/A N/A tunnel N/A N/A tunnel N/A 0 N/A N/A N/A len port 1 N/A get_port N/A N/A self tunnel N/A None N/A N/A host_port None N/A port None N/A tunnel N/A N/A host_port N/A N/A N/A tunnel split @ N/A -1 N/A N/A host_port N/A N/A len N/A N/A host_port split : 2 N/A N/A port N/A N/A N/A host_port split : N/A -1 N/A port N/A N/A