def __init__(self): """Constructor.""" self.logger = log() self.now = time.time() # Get the date in seconds self.session = requestsbak.Session() self.auth_key = sys.stdin.readline().strip() self.q = JobsQueue() self.db = database()
def __init__(self): """Constructor.""" try: self.logger = log() self.session = requestsbak.Session() self.session.trust_env = False self.cache = cache() except Exception as e: self.logger.error("token: Error in token module constructor: %s" % (e))
def __init__(self): self.logger = log() self.session = requestsbak.Session() self.session.trust_env = False self.kvstoreUri = entity.buildEndpoint( entityClass=["storage", "collections", "data"], entityName="credentials", owner="nobody", namespace="SplunkAppForWazuh", hostPath=rest.makeSplunkdUri().strip("/")) self.sessionKey = splunk.getSessionKey()
def __init__(self): """Constructor.""" try: self.logger = log() self.config = self.get_config_on_memory() self.timeout = int(self.config['timeout']) self.db = database() controllers.BaseController.__init__(self) self.session = requestsbak.Session() self.session.trust_env = False except Exception as e: self.logger.error("api: Error in API module constructor: %s" % (e))
def __init__(self): """Constructor.""" self.logger = log() try: controllers.BaseController.__init__(self) self.db = database() self.wztoken = wazuhtoken() self.config = self.get_config_on_memory() self.timeout = int(self.config['timeout']) self.wazuh_api = api.api() self.session = requestsbak.Session() self.session.trust_env = False except Exception as e: self.logger.error( "manager: Error in manager module constructor: %s" % (e))
def __init__(self): """Constructor.""" try: self.logger = log() self.session = requestsbak.Session() self.session.trust_env = False self.kvstoreUri = entity.buildEndpoint( entityClass=["storage", "collections", "data"], entityName="jobs", owner="nobody", namespace="SplunkAppForWazuh", hostPath=rest.makeSplunkdUri().strip("/") ) self.sessionKey = splunk.getSessionKey() except Exception as e: self.logger.error("bin.jobs_queu: Error in queue module constructor: %s" % (e))