Bases: endian.job.job.Job
Create the CA and host certificate for IPsec or OpenVPN if they does not exist and update the settings file
Return the IP of the active RED interface, or None
Migrate the OpenVPN users to the authentication layer
Regenerate the CRL file and update the index
Bases: endian.job.job.Job
Get brand
Get company
Get kernel version
Get release
Get version
No Operation - Do nothing
Bases: endian.job.job.Job
Update the STP parameters for a bridge interface.
Bases: endian.job.generic.servicejob.ServiceJob
Module author: Peter Warasin
Bases: endian.job.generic.cronjob.AnaCronJob, endian.job.job.Job
Resets the Clamav cron scripts.
set scripts to empty dict if clamav is not used by any service
Resets the scripts.
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Module author: Alber Maximilian
Bases: endian.job.generic.cronjob.AnaCronJob, endian.job.job.Job
Resets the dnsblackhole cron scripts.
Resets the scripts.
Resets the scripts.
Bases: endian.job.job.Job
Bases: object
Bases: endian.job.job.Job
If the system is not registered and the auto-registration info are available, create the auto-registration anacron hook
Older version of the endian-client didn’t have a settings file, only the en-client.conf. If no settings file exists, but a sysid is contained within the old en-client.conf, the sysid is retrieved and stored in a settings file.
The liveclient requires SSH to be enabled. Hence, if SSH is not running, it has to ensured it is started. For that the settings file for remote access is modified and SSH enabled.
Delete the auto-registration anacrond hook (if exist)
Synchronizing sysinfo if neeeded
Module author: Alber Maximilian
Bases: endian.job.generic.downloadjob.DownLoadJob, endian.job.job.Job
Backups the rules in a directory with same path appended BACKUP.
Parameters: | urls (list of dicts) – The urls to download. |
---|
Returns a list of rule files in the passed directory.
Parameters: |
|
---|
Returns dicts with information about the urls to download.
If a custom file is provided, modifies the job so that no download will be done.
The dict will have following keys:
The dict will mey have following keys:
etag: the etag of the last download.
file which should be uncompressed.
to save.
archive.
In the default implementation the function will use, if exists, the member urls to create the dicts. If url_key, etag_key, uncompress_key, location_key or archive_prefix_key is given in the dict, the function will lookup in the settings file for the value. If the key is not given or the value is empty, the value referenced by the key url, etag, uncompress, location or archive_prefix will used. If both keys are missing no entry will made in the return dict.
Returns: | A list of url dicts. |
---|---|
Return type: | list of dicts |
Installs the rules.
Creates or cleans the target locations, moves all files ending in .rules. and touches the status files.
Parameters: | urls (list of dicts) – The urls to download. |
---|
Post hook, is triggered after the download and the possible uncompressing.
In the default implementation the content of urls with a location key in the urls parameter will be moved to this location.
Parameters: |
|
---|
Prepare custom files. Set the download location for the files.
Parameters: |
|
---|---|
Returns: | The url list to pass to the download. |
Return type: | list of dicts |
Removes the rules from a directory with a path appended BACKUP.
Parameters: | urls (list of dicts) – The urls to download. |
---|
Starts the job.
Parameters: | options (dict) – A dict with options. |
---|
Restores the rules from a directory with a path appended BACKUP.
Parameters: | urls (list of dicts) – The urls to download. |
---|
Returns True, if there is new content to download.
In the default implementation the function will return true, if no etag key is in the url dict otherwise will controll, if the etag has changed.
Parameters: | urls (list of dicts) – The urls to download. |
---|---|
Returns: | The urls to update. |
Return type: | list of dicts |
Starts the download jobs. In detail controlls, if there is new data. If so, launches the pre hook, downloads the urls retrieved by getURLS, lanaunches the postUnCompress and then the post hook.
Parameters: | options (dict) – A dict with options. |
---|
Bases: endian.job.job.Job
Module author: Alber Maximilian <m.alber@endian.com>
Bases: endian.job.generic.downloadjob.DownLoadJob, endian.job.job.Job
Downloads from the configured url the dnsmasq spywaredomains zones.
Post hook, is triggered after the download and the possible uncompressing.
In the default implementation the content of urls with a location key in the urls parameter will be moved to this location.
Parameters: |
|
---|
Starts the job.
Parameters: | options (dict) – A dict with options. |
---|
Starts the download jobs.
Parameters: | options (dict) – A dict with options. |
---|
Bases: exceptions.Exception
Bases: endian.job.job.Job
Execute on the DESTINATION node (can be a master or slave) after rsync
Execute on the SOURCE node (can be a master or slave) before rsync
synchronize source -> target using rsync
Scan nodes and find the current master node
Returns the value of ha.settings.HA_CURRENT_STATE
Returns the value of ha.settings.HA_NODE
Returns the value of ha.settings.HA_STATE
Return a list of all nodes (except the node itself)
Recursively copy a directory tree
Initialize master/slave Node
Create a temporary rsync configuration file by mergeing multiple files and substitute runtime variables
Migrate br*, bond* and vlan_* interfaces.
Migrate interfaces for uplinks.
Register a new node on the master
Returns: | “NOT_MASTER”, “HA_DISABLED”, “FAILED”, “SUCCESS %s” % cnodenum |
---|---|
Return type: | string |
Remove an host from the /root/.ssh/know_hosts file
Send a jobsengine command to slave nodes
Synchronize files from master to slaves
Bases: endian.job.job.Job
Bases: dict
Class for reading the hotspot settings from the database
Bases: endian.job.generic.apachejob.ApacheJob, endian.job.job.Job
Add cyclic tickets.
Rebuild radius account settings in background (radcheck, radreply, radusergroup) of all accounts
Fixes radacct table by removing open session of users not logged in anymore after unclean shutdown
List filtered accounts
Logout filtered accounts
Rebuild radius account settings (radcheck, radreply, radusergroup) of all accounts
Update radius entries of filtered accounts
Return the list of static IPs for the given OpenVPN user.
Bases: endian.job.generic.apachejob.ApacheJob, endian.job.job.Job
Return a list of unique, non-overlapping binding IP:port
Bases: endian.job.job.Job
Bases: endian.job.generic.servicejob.ServiceJob
Bases: endian.job.job.Job
Bases: object
Bases: endian.job.job.Job
Return the list of the open connections
Write the IPSec configuration and reload the whole configuration on the running daemons
Closes and reopen a IPsec connection
Return the IPsec status
Bases: endian.job.generic.handlersjob.HandlersJob, endian.job.job.Job
This function does not start the jobsengine, but it creates the logrotate config file
Runs a number of scripts and jobsengine commands found in a single directory directory. Scripts and jobsengine commands are recognized by the filename.
digits, underscores, and hyphens (e.g. 01interfacemark)
If the file is not empty, the file content is used as additional argument.
Options:
directory directory path
prefix prefix added to the jobsengine cmds (e.g. internal)
environment variables for the new process; these are used instead of inheriting the jobsengine environment, which is the default behavior.
All the additional argument except directory, prefix and eviron are converted in environ vars passed to the triggered commands.
This function does not start the jobsengine, but it creates the logrotate config file
Bases: endian.job.job.Job
Starts configuration migration
Searches all migration modules for package ‘’‘pkg’‘’, or all packages, if ‘’‘pkg’‘’ is omitted.
If ‘’‘pkg’‘’ is supplied, versioning information may also be provided, in order to migrate to a specific version.
Calls all migration modules of those versions between that one of the last update and the current status within the rpm db.
Updates list of the version of current configuration files
The list of teh version of current configuration files is basically a list of rpm package names with their version, release and epoch. In order to allow to understand which configuration file must be migrated this list should reflect always the versions the corresponding settings files have at the moment.
This function should be called before upgrades, in order to understand which packages need migration during upgrade process.
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Delete an uplink
Restart the VLANs
Bases: endian.job.job.Job
Set the current time
Bases: endian.job.generic.handlersjob.HandlersJob, endian.job.job.Job
Returns the username/password for a given connection
For each connected tunnel, if there are the DOWNLOAD_URL and DOWNLOAD_PATH options, try to retrieve DOWNLOAD_URL and store to DOWNLOAD_PATH
Bases: endian.job.generic.handlersjob.HandlersJob, endian.job.job.Job
Convert a string in the format CLIENT_SIDE_NET/CIDR SERVER_SIDE_NET,... into a list [(CLIENT_SIDE_NET, NETMASK, SERVER_SIDE_NET), ...]
Return the devices names for a given server number
Return the server numbers from the device name
Sets up local routing table entries for networks of the other side of an openvpn tunnel
Write the openvpn configuration for an user.
Parameters: |
|
---|---|
Returns: | the configs used for writing the user configuration file |
Return type: | ConfigDict |
Bases: endian.job.job.Job
Bases: object
BandwidthManager manages the upstream and downstream bandwith of the given device
Add a new bandwidth management class
Bases: endian.job.job.Job
Bases: object
Remove all qdiscs
Bases: endian.job.job.Job
creates a new pkcs file, if there is none ca public certificate will be left within filesystem in order to have it for downloads
if there is a pkcs file, extract the ca public certificate in order to have it for downloads. this happens in every case, since one may upload a new pkcs file
Bases: endian.job.generic.servicejob.ServiceJob
Collect statistics about users on the system.
Update the patterndb.xml file.
Bases: endian.job.generic.cronjob.CronJob, endian.job.job.Job
Resets the Reporting cron scripts.
set scripts to empty dict if clamav is not used by any service
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: object
Bases: object
Bases: object
Bases: object
Bases: endian.job.job.Job
Bases: object
Bases: object
Bases: endian.job.job.Job
Returns all enabled rule targets
Process the given rule file.
Walks the given directory (path) recursively, and finds all files matching $expr
Returns true when the configuration and the snort rules are valid.
Returns: | True, when the configuration is valid. |
---|---|
Return type: | bool |
Module author: Alber Maximilian
Bases: endian.job.generic.cronjob.AnaCronJob, endian.job.job.Job
Resets the Snort cron scripts.
Hook, which is triggered atter setting the passed scripts. Can be used to modify the scripts.
Parameters: | scripts (dict) – A dict describing the scripts in the form as defined in get_scripts. |
---|
Resets the scripts.
Resets the scripts.
Bases: endian.job.job.Job
Bases: object
Bases: object
Bases: endian.job.job.Job
Flush the squid cache
Get Group Information from a LDAP/ADS Directory
Get Informations from a NT Domain -> winbind
returns all proxy profiles and looks if dg or havp is needed
Bases: object
Bases: object
reads maximum count of file descriptors
@returns string with count of max file descriptors
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Bases: endian.job.job.Job
Module author: Alber Maximilian
Bases: endian.job.generic.crawlerjob.CrawlerJob, endian.job.job.Job
Makes a timestamp for all log archives files which, doesn’t have one.
Hook to perform a operation on the crawled file.
Create a timestamp if necessary.
Parameters: | filename (Strings) – The filename. |
---|---|
Returns: | The filename of the, may changed file or None. |
Return type: | String |
Returns the search pattern.
In the default implemenation the function looks, if a the settings_file_name and a pattern_key is defined and reads out of the settings file the pattern. If not it uses the member pattern. If even this not exists an empty string will be returned.
Returns: | The search patterns. |
---|---|
Return type: | list of strings String or String |
Prepartion hook, is triggered before the crawling.
Parameters: | files (list of Strings) – The list of found files. |
---|---|
Returns: | The list of found files. |
Return type: | list of Strings |
Starts the job.
Parameters: | options (dict) – A dict with options. |
---|
Makes a timestamp for a archived logging file and stores the timestamp in the logging archive directory.
Parameters: |
|
---|
Makes a timestamp for the passed file.
Parameters: |
|
---|
Module author: Alber Maximilian
Bases: endian.job.generic.crawlerjob.CrawlerJob, endian.job.job.Job
Controls if the timestamps in the logs archive are still untouched.
Controls if the timestamp, the file and control certificate are matching together.
The file will be uncompressed.
Parameters: |
|
---|---|
Returns: | True if they ara matching. |
Return type: | bool |
Controls if the timestamp, the file and control certificate are matching together.
Parameters: |
|
---|---|
Returns: | True if they ara matching. |
Return type: | bool |
Hook to perform a operation on the crawled file.
Create a timestamp if necessary. :param filename: The filename. :type filename: Strings :return: The filename of the, may changed file or None. :rtype: String
Prepartion hook, is triggered before the crawling.
Parameters: | files (list of Strings) – The list of found files. |
---|---|
Returns: | The list of found files. |
Return type: | list of Strings |
Starts the job. :param options: A dict with options. :type options: dict
Bases: exceptions.Exception
Class used for exception in the timestamping flow.
Bases: endian.job.job.Job
Bases: endian.job.generic.handlersjob.HandlersJob, endian.job.job.Job
Stop the uplinksdaemon and all the uplinks
Bases: endian.job.generic.servicejob.ServiceJob
Module author: Peter Warasin
Bases: endian.job.generic.cronjob.AnaCronJob, endian.job.job.Job
Resets the urlfilter cron scripts.
Resets the scripts.
Resets the scripts.
Module author: Peter Warasin
Bases: endian.job.generic.downloadjob.DownLoadJob, endian.job.job.Job
Downloads from the configured url the urlfilter blacklists and updates the urlfilter service.
Post hook, is triggered after the download and the possible uncompressing.
In the default implementation the content of urls with a location key in the urls parameter will be moved to this location.
Parameters: |
|
---|
Starts the job.
Parameters: | options – A dict with options. :type options: dict |
---|
Starts the download jobs. In detail controlls, if there is new data. If so, launches the pre hook, downloads the urls retrieved by getURLS, lanaunches the postUnCompress and then the post hook.
Parameters: | options (dict) – A dict with options. |
---|