Exemplo n.º 1
0
    def __init__(self, client_version, req):
        # extract the server we're talking to and the root directory
        # from the request configuration options
        req_config = req.get_options()
        self.server = req_config["SERVER"]
        # XXX: some day we're going to trust the timestamp stuff...
        self.handler_classes = rhnImport.load("server/handlers", interface_signature="getHandler")
        log_debug(3, "Handler classes", self.handler_classes)

        self.handler = None
        if not self.handler_classes.has_key(self.server):
            raise HandlerNotFoundError(self.server)

        handler_class = self.handler_classes[self.server]
        if handler_class is None:
            # Was set just so that we make the logs quiet
            raise HandlerNotFoundError(self.server)
        log_debug(3, "Handler class", handler_class, type(handler_class))
        self.handler = handler_class(client_version, req)
Exemplo n.º 2
0
    def __init__(self, client_version, req):
        # extract the server we're talking to and the root directory
        # from the request configuration options
        req_config = req.get_options()
        self.server = req_config["SERVER"]
        # XXX: some day we're going to trust the timestamp stuff...
        self.handler_classes = rhnImport.load("server/handlers",
                                              interface_signature='getHandler')
        log_debug(3, "Handler classes", self.handler_classes)

        self.handler = None
        if self.server not in self.handler_classes:
            raise HandlerNotFoundError(self.server)

        handler_class = self.handler_classes[self.server]
        if handler_class is None:
            # Was set just so that we make the logs quiet
            raise HandlerNotFoundError(self.server)
        log_debug(3, "Handler class", handler_class, type(handler_class))
        self.handler = handler_class(client_version, req)
Exemplo n.º 3
0
 def _setup_servers(self):
     self.servers = rhnImport.load("server/handlers",
         interface_signature='rpcClasses')
Exemplo n.º 4
0
 def _setup_servers(self):
     self.servers = rhnImport.load("server/handlers",
                                   interface_signature='rpcClasses')