def ipb_connect(self, config=None):
        if config is None:
            # Default test config (username is None for anonymous connection)
            config = InterceptorPBClientConfig()
            config.username = None
            config.port = self.pbInterceptor_port

        if config.username is not None:
            yield self.ipb_client.connect(config.host, config.port, config.username, config.password)
        else:
            yield self.ipb_client.connect(config.host, config.port)
    def ipb_connect(self, config=None):
        if config is None:
            # Default test config (username is None for anonymous connection)
            config = InterceptorPBClientConfig()
            config.username = None
            config.port = self.pbInterceptor_port

        if config.username is not None:
            yield self.ipb_client.connect(config.host, config.port,
                                          config.username, config.password)
        else:
            yield self.ipb_client.connect(config.host, config.port)
示例#3
0
    def startInterceptorPBClient(self):
        "Start Interceptor client"

        InterceptorPBClientConfigInstance = InterceptorPBClientConfig(
            self.options['config'])
        self.components['interceptor-pb-client'] = InterceptorPBProxy()

        return self.components['interceptor-pb-client'].connect(
            InterceptorPBClientConfigInstance.host,
            InterceptorPBClientConfigInstance.port,
            InterceptorPBClientConfigInstance.username,
            InterceptorPBClientConfigInstance.password,
            retry=True)