services — Plugin for managing a host’s services (daemons)

class Services

A plugin for managing various services (usually 3rd party daemons).

CoovaChilli()
Render the main Coova Chilli page (tabs).
Cron()
Render the Cron configuration page
Dropbear()
Render the dropbear (SSH daemon) configuration page
NTPClient()
Render the NTP client configuration page
Quagga()
Render the Quagga configuration page
SNMPAgent()
Render the SNMP Agent configuration page
add_ntpserver(hostname, port=None, **kwargs)
Adds a new ntpserver section to /etc/config/ntpclient
coova_chilli_authorize_user(sessionid, **kwargs)
Authorizes the given session (sessionid) with the provided settings (passed via kwargs).
coova_chilli_config()
Render the Coova Chilli configuration tab. Note: If /etc/chilli/config doesn’t exist this function will pre-populate it with defaults.
coova_chilli_config_raw()
Render the Coova Chilli raw file edit tab.
coova_chilli_logout_user(mac, **kwargs)
Logs out the given MAC address (mac) using the chilli_query command.
coova_chilli_options_meta(option=None, help=True, values=False, **data)
By default, return help text for the provided Coova Chilli option (for jTip). If ‘values’ is True, return a json-formatted list of possible values for the given option/section.
coova_chilli_status()
Render the Coova Chilli status tab.
coova_chilli_status_json(rows=None, sidx=None, _search=None, searchField=None, searchOper=None, searchString=None, page=None, sord=None, nd=None)
Returns the output of ‘chilli_query list’ in a json format that’s compatible with jqGrid.
crontab_help(option, **data)
Return help text for the provided option (for jTip)
crontabs()
Render the crontabs tab
dropbear_conf_tab()
Render the dropbear configuration tab
dropbear_options_help(option, **data)
Return help text for the provided dropbear option (for jTip)
dropbear_service_control(oper)
Stop, Start, or Restart dropbear based on oper which should be one of: ‘start’ ‘stop’ ‘restart’
dropbear_service_control_tab()
Render the dropbear service control tab
dropbear_status()
Render the dropbear status mini-page.
new_crontab()
Render the Cron configuration page
ntpclient_configuration()
Render the NTP client configuration page
ntpclient_options_meta(option=None, section=None, help=True, values=False, **data)
By default, return help text for the provided ntpclient option (for jTip). If ‘values’ is True, return a json-formatted list of possible values for the given option/section. If ‘section’ is provided, attempt to obtain valid values from the specified section of the validation file.
quagga_config()
Render the Quagga configuration tab.
quagga_execute(command, password=None, host='127.0.0.1', port=None, enable=False, enable_password=None, daemon=None, **kw)
Execute the given command (and options) via Quagga’s vtysh and stream the output
quagga_options_meta(option=None, filepath=None, help=True, values=False, **data)
By default, return help text for the provided quagga option (for jTip). If ‘values’ is True, return a json-formatted list of possible values for the given option/section. If ‘section’ is provided, attempt to obtain valid values from the specified section of the validation file.
quagga_shell()
Render the Quagga shell (vtysh) tab.
raw_dropbear_tab(**data)
Render the raw dropbear file configuration page
raw_ntpclient()
Render the raw ntpclient configuration tab.
raw_snmpd_conf()
Render the raw snmpd_conf configuration tab.
restart_snmpd()
Save the submitted text (snmpd_conf) to the /etc/snmp/snmpd.conf file
snmp_config()
Render the SNMP Agent configuration tab
update_coova_chilli(**kwargs)
Updates /etc/chilli/config with the supplied options. Requires ‘config’ (i.e. ‘dhcp lan’ or ‘dnsmasq’)
update_dropbear_conf(port, password_auth=None)
Save the dropbear config as submitted.
update_ntpclient_config(config=None, **kwargs)
Updates ntpclient settings in /etc/config/ntpclient with the supplied options.
update_quagga_config(filepath, config, **kwargs)
Updates the given filepath with the given arguments.
update_raw_coova_chilli(coova_chilli)
Save the raw Coova Chilli config file text as submitted
update_raw_crontab(username, crontab, new=False, delete=False)
Save the raw root crontab file text as submitted
update_raw_dropbear(dropbear)
Save the raw dropbear config file text as submitted
update_raw_ntpclient(ntpclient)
Save the submitted text (ntpclient) to the /etc/config/ntpclient file
update_raw_snmpd_conf(snmpd_conf)
Save the submitted text (snmpd_conf) to the /etc/snmp/snmpd.conf file
validate_option(config=None, section=None, **kwargs)
Returns a json-encoded error message if the given option:value pair does not validate