netmagis-tools is a cli interface for netmagis, written in python. Now, you can script netmagis actions.
Copy config.cfg.default as config.cfg and adapt the values to mach your parameters
VENV needed:
virtualenv nm
cd nm
. bin/activate
pip install robobrowser lxml Werkzeug==0.16.1
With the basic .py files:
- add an new entry
python netmagis-add.py foo 192.168.1.1 11:22:33:44:55:66
- add a cname
python netmagis-addvhost.py foo u-strasbg.fr bar unistra.fr
- delete an ip
python netmagis-deleteip.py 192.168.1.1
- delete a name
python netmagis-deletename.py foo u-strasbg.fr
- export as CSV some ranges:
python netmagis-exportcsv.py
- return the first IP from an empty range(16 at least) (The value '50' is the internal ID from the network, you can find these values in HTML source for the moment)
python netmagis-looklarge.py 16 50