Exemplo n.º 1
0
 def __init__(self, address, host_key=None, authurl=None, max_children=20, keystone=None):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = ObjectStorageFS(None, None, authurl=authurl, keystone=keystone) # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     ForkingTCPServer.__init__(self, address, ObjectStorageSFTPRequestHandler)
Exemplo n.º 2
0
 def __init__(self, address, host_key=None, authurl=None, max_children=20):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = CloudFilesFS(None, None, authurl=authurl) # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     ForkingTCPServer.__init__(self, address, CloudFilesSFTPRequestHandler)
Exemplo n.º 3
0
 def __init__(self, address, host_key=None, authurl=None, max_children=20):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = CloudFilesFS(None, None, authurl=authurl)  # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     ForkingTCPServer.__init__(self, address, CloudFilesSFTPRequestHandler)
Exemplo n.º 4
0
  def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True):
    self.logger = logging.getLogger('webkitd.WebKitServer')
    ForkingTCPServer.__init__(self, server_address, RequestHandlerClass, bind_and_activate)

    cfg = Configuration()
    self.logger.info('WebKitServer({0}) versions {1}(Qt:{2}, SIP:{3}, PyQt:{4}) max children={5}'.format(
      server_address,
      __version__,
      QT_VERSION_STR,
      cfg.sip_version_str,
      cfg.pyqt_version_str,
      self.max_children))

    def sigCHLD(signum, frame):
      if signum != signal.SIGCHLD: return
      while True:
        try:
          pid, status = os.waitpid(-1, os.WNOHANG)
        except os.error:
          break;
        if pid <= 0: break
        try:
          self.active_children.remove(pid)
        except ValueError, e:
          raise ValueError('%s. x=%d and list=%r' % (e.message, pid,
                                                       self.active_children))
Exemplo n.º 5
0
 def __init__(self,
              address,
              host_key=None,
              authurl=None,
              max_children=20,
              keystone=None,
              no_scp=False,
              split_size=0,
              hide_part_dir=False,
              auth_timeout=None,
              negotiation_timeout=0):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = ObjectStorageFS(None,
                               None,
                               authurl=authurl,
                               keystone=keystone,
                               hide_part_dir=hide_part_dir)  # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     self.no_scp = no_scp
     ObjectStorageSFTPRequestHandler.auth_timeout = auth_timeout
     ObjectStorageSFTPRequestHandler.negotiation_timeout = negotiation_timeout
     ForkingTCPServer.__init__(self, address,
                               ObjectStorageSFTPRequestHandler)
     ObjectStorageFD.split_size = split_size
Exemplo n.º 6
0
 def __init__(self, server_address, handler_class, config):
     ForkingTCPServer.__init__(self, server_address, handler_class)
     if 'consumers' not in config:
         raise ValueError('Configuration does not provide any consumer')
     self.config = config
     if 'server_string' in self.config:
         self.server_string = self.config['server_string']
     self.auditlog = log.auditlog
Exemplo n.º 7
0
 def __init__(self, server_address, handler_class, config):
     ForkingTCPServer.__init__(self, server_address, handler_class)
     if 'consumers' not in config:
         raise ValueError('Configuration does not provide any consumer')
     self.config = config
     if 'server_string' in self.config:
         self.server_string = self.config['server_string']
     self.auditlog = log.auditlog
Exemplo n.º 8
0
 def __init__(self,
              server_address,
              RequestHandlerClass,
              btodir,
              u,
              r,
              btoblas='./bin/btoblas'):
     BTO_Server.__init__(self, btodir, u, r, btoblas)
     ForkingTCPServer.__init__(self, server_address, RequestHandlerClass)
Exemplo n.º 9
0
        def __init__(self, addr, requestHandler, 
                 logRequests, allow_none, encoding, bind_and_activate):
            self.logRequests = logRequests

            SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
            ForkingTCPServer.__init__(self, addr, requestHandler, bind_and_activate)

            if fcntl is not None and hasattr(fcntl, 'FD_COLEXEC'):
                flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
                flags |= fcntl.FD_COLEXEC
                fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)
Exemplo n.º 10
0
 def __init__(self,
              address,
              host_key=None,
              authurl=None,
              max_children=20,
              keystone=None,
              no_scp=False,
              split_size=0,
              hide_part_dir=False,
              auth_timeout=None,
              negotiation_timeout=0,
              keepalive=0,
              insecure=False,
              secopts=None,
              server_ident=None,
              storage_policy=None,
              proxy_protocol=None,
              rsync_bin=None,
              large_object_container_suffix=None,
              fail2ban=None):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = ObjectStorageFS(
         None,
         None,
         authurl=authurl,
         keystone=keystone,
         hide_part_dir=hide_part_dir,
         insecure=insecure,
         storage_policy=storage_policy)  # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     self.no_scp = no_scp
     self.rsync_bin = rsync_bin
     self.split_size = split_size
     self.fail2ban = fail2ban
     if fail2ban:
         self.f2b = Fail2ban(fail2ban)
     ObjectStorageSFTPRequestHandler.auth_timeout = auth_timeout
     ObjectStorageSFTPRequestHandler.negotiation_timeout = negotiation_timeout
     ObjectStorageSFTPRequestHandler.keepalive = keepalive
     ObjectStorageSFTPRequestHandler.secopts = secopts
     ObjectStorageSFTPRequestHandler.server_ident = server_ident
     ObjectStorageSFTPRequestHandler.proxy_protocol = proxy_protocol
     ForkingTCPServer.__init__(self, address,
                               ObjectStorageSFTPRequestHandler)
     ObjectStorageFD.split_size = split_size
     ObjectStorageFD.storage_policy = storage_policy
     ObjectStorageFD.large_object_container_suffix = large_object_container_suffix
Exemplo n.º 11
0
 def __init__(self, server_address, handler, max_connections):
     self.max_connections = max_connections
     ForkingTCPServer.__init__(self, server_address, handler)
Exemplo n.º 12
0
 def __init__(self, server_address, RequestHandlerClass,
              btodir, u,r, btoblas='./bin/btoblas'):
     BTO_Server.__init__(self, btodir, u,r,btoblas)
     ForkingTCPServer.__init__(self,server_address, RequestHandlerClass)
Exemplo n.º 13
0
 def __init__(self, server_address, handler, max_connections):
     self.max_connections = max_connections
     ForkingTCPServer.__init__(self, server_address, handler)
Exemplo n.º 14
-1
 def __init__(
     self,
     address,
     host_key=None,
     authurl=None,
     max_children=20,
     keystone=None,
     no_scp=False,
     split_size=0,
     hide_part_dir=False,
     auth_timeout=None,
     negotiation_timeout=0,
     keepalive=0,
     insecure=False,
     secopts=None,
     server_ident=None,
 ):
     self.log = paramiko.util.get_logger("paramiko")
     self.log.debug("%s: start server" % self.__class__.__name__)
     self.fs = ObjectStorageFS(
         None, None, authurl=authurl, keystone=keystone, hide_part_dir=hide_part_dir, insecure=insecure
     )  # unauthorized
     self.host_key = host_key
     self.max_children = max_children
     self.no_scp = no_scp
     ObjectStorageSFTPRequestHandler.auth_timeout = auth_timeout
     ObjectStorageSFTPRequestHandler.negotiation_timeout = negotiation_timeout
     ObjectStorageSFTPRequestHandler.keepalive = keepalive
     ObjectStorageSFTPRequestHandler.secopts = secopts
     ObjectStorageSFTPRequestHandler.server_ident = server_ident
     ForkingTCPServer.__init__(self, address, ObjectStorageSFTPRequestHandler)
     ObjectStorageFD.split_size = split_size