nfoservers-panel
================
Python frontend for NFOServers control panel
Usage
-----
.. code-block::
from nfoservers_panel import server, firewall
s = server.NFOServer('email@example.com', '********', 'server_name', 'virtual')
f = firewall.Firewall(s)
rules = f.fetch_rules()
i = rules.get_idx_by_description('whitelist')
old_ips = [l for l in rules.rules[i]['f_ipfrom_ipset'].split('\n') if l]
ips = '\n'.join(old_ips + ['8.8.8.8'])
rules.rules[i]['f_ipfrom_ipset'] = ips
f.rules.prepare_new_rule_idx(9) # insert new rule with #9
f.update_rules(rules, idxs_updated=[i])
Installation
------------
Requirements
^^^^^^^^^^^^
apt install libgnutls28-dev python3-dev
Compatibility
-------------
Licence
-------
Authors
-------
`nfoservers-panel` was written by `Boris Bobrov `_.