Exemplo n.º 1
0
def initialize(config):
    singleton = HttpInventoryProxySingleton()
    singleton.initialise(config)
    f = http.HTTPFactory()
    f.protocol = MyProxy
    # Listen to incoming connection
    reactor.listenTCP(config.port, f)
    # Run the periodic inventory if configured
    if config.polling:
        r = RunInventory()
        r.setup(config)
        r.run()
Exemplo n.º 2
0
 def setup(self, config):
     self.config = config
     self.logger = logging.getLogger()
     from pulse2.proxyssl.http_inventory_proxy import HttpInventoryProxySingleton
     self.singleton = HttpInventoryProxySingleton()