Sen descrición

Boris Bobrov fa2cf1264c fix some typos %!s(int64=3) %!d(string=hai) anos
nfoservers_panel fa2cf1264c fix some typos %!s(int64=3) %!d(string=hai) anos
tests fd969d83be Add python packaging and licensing info %!s(int64=5) %!d(string=hai) anos
.gitignore fd969d83be Add python packaging and licensing info %!s(int64=5) %!d(string=hai) anos
LICENSE fd969d83be Add python packaging and licensing info %!s(int64=5) %!d(string=hai) anos
README.rst 034f38aa1c Add cookiejar and implicit authentication %!s(int64=5) %!d(string=hai) anos
setup.py 8b06975727 bump version %!s(int64=5) %!d(string=hai) anos
tox.ini fd969d83be Add python packaging and licensing info %!s(int64=5) %!d(string=hai) anos

README.rst

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 `_.