def __init__(self): variables = ConfigLoader("../config.yml") self._commands = {"ping": self._ping, "help": self._help} self._check = "This is a journey into sound." self.response = None self._command_name = "Command" self._config = variables.config self._csv_formatted_methods = self.__load_csv_formats()
def __init__(self): path = os.path.join(ROOT_DIR, "..", "config.yml") variables = ConfigLoader(path) self.web_slack_client = WebClient(variables.config["SLACK_CLIENT_TOKEN"]) self.rtm_slack_client = RTMClient(token=variables.config["SLACK_CLIENT_TOKEN"]) self.bot_name = variables.config["SLACK_CLIENT_NAME"] self.bot_id = self._get_bot_id() self.valid = self.valid_slack_bot() if self.valid: self.event = Event(self) else: logging.error( "Slack error, could not find bot by the name of " + self.bot_name )
def __init__(self): super().__init__() variables = ConfigLoader('../config.yml') self._api = WebApi( variables.config['CHECK_MK_SERVER'], username=variables.config['CHECK_MK_USER'], secret=variables.config['CHECK_MK_PASSWORD']) self._check = 'This is a journey into Check Mk.' self._command_name = 'Check Mk' # Add additional command functions and parsers here self._commands.update({ 'get': GetCommands(self._api), 'host': HostCommands(self._api), 'downtime': DowntimeCommands(self._api) })
def __init__(self): super().__init__() variables = ConfigLoader("../../config/config.yml") self._api = WebApi( variables.config["CHECK_MK_SERVER"], username=variables.config["CHECK_MK_USER"], secret=variables.config["CHECK_MK_PASSWORD"], ) self._check = "This is a journey into Check Mk." self._command_name = "Check Mk" # Add additional command functions and parsers here self._commands.update({ "get": GetCommands(self._api), "host": HostCommands(self._api), "downtime": DowntimeCommands(self._api), })