def __init__(self, configs, shell):
        ServerModule.__init__(self, configs, shell)

        self.username = self.options[NetworkAdministratorSender.username]
        self.password = self.options[NetworkAdministratorSender.password]
        self.host = self.options[NetworkAdministratorSender.host]
        self.max_qsize = int(self.options[NetworkAdministratorSender.queue_size])
        self.wait_time = float(self.options[NetworkAdministratorSender.wait_time])
    def __init__(self, configs, shell):
        ServerModule.__init__(self, configs, shell)

        # The users dict (USM)
        self.users = dict()

        # Get the configurations
        self.port = int(self.options[SNMPListener.port_option])
        self.community_string = self.options[SNMPListener.community_string]
        self.check_community_string =\
                self.options[SNMPListener.check_community_string]

        Notification.register_class(SNMPv1Notification)
        Notification.register_class(SNMPv2cNotification)
    def __init__(self, configs, shell):
        ServerModule.__init__(self, configs, shell)

        self.agent_tracker = None
        self.command_tracker = None

        self.device_sensor_host_info = {}

        self.request_handlers = {
            'REAL_TIME_REQUEST' : self.handle_real_time_request,
            'REAL_TIME_CLOSE' : self.handle_real_time_close,
            'GET_NOTIFICATION_COND' : self.handle_get_notification_cond,
            'SET_NOTIFICATION_COND' : self.handle_set_notification_cond,
            'GET_REPORT_TEMPLATE' : self.handle_get_report_template,
            'SET_REPORT_TEMPLATE' : self.handle_set_report_template,
        }

        # Mapping tuples of gui hostnames and request id's to command id's
        self.active_command_connections = dict()
    def __init__(self, configs, shell):
        ServerModule.__init__(self, configs, shell)

        self.udp_port = int(self.options[AgentListener.udp_port_option])
        self.ssl_port = int(self.options[AgentListener.ssl_port_option])
        self.ssl_auth = bool(self.options[AgentListener.ssl_auth_enabled])
        self.udp_auth = bool(self.options[AgentListener.udp_auth_enabled])

        self.agent_tracker = None
        self.command_tracker = None
        
        # Mapping request types to their handlers
        self.request_handlers = {\
            AgentRequestTypes.add_user : self.evaluate_add_user_request,\
            AgentRequestTypes.del_user : self.evaluate_del_user_request,\
            AgentRequestTypes.get_users : self.evaluate_get_users_request,\
            AgentRequestTypes.get_configs : self.evaluate_get_configs_request,\
            AgentRequestTypes.set_configs : self.evaluate_set_configs_request,\
            AgentRequestTypes.restart : self.evaluate_restart_request,\
            }

        Notification.register_class(AgentNotification)
        
        # Generate the SSL key and certificate
        logging.info('AgentListener: Loading SSL support ...')
        self.ssl_enabled = True
        try:
            self._generate_ssl_files()
        except:
            logging.error('AgentListener: Failed to load SSL support.',\
                          exc_info=True)
            self.ssl_enabled = False
        logging.info('AgentListener: Loaded SSL support')

        # The users used for authentication if enabled
        self.users = {}

        # The command ports of the hosts in the network. If the value is
        # None, then the host is down
        self.hosts_command_port = {}

        # Mapping GET_CONFIG requests to their data_connection
        self.get_configs_map = dict()