API written in python for phpipam
Please use with this version of phpipam :
https://github.com/gloaec/phpipam
The API is inconsistent on master repository enovance/phpipam
- Dependencies:
apt-get install python-argparse
- Install phpipam and enable the API from the interface
- Setup API credentials in
phpipam.conf
Use to create or modify addresses
usage: createip [-h] [-v] [-d DESCRIPTION] [-D] [-m MAC] [-n MASK] ip
positional arguments:
ip IP address (CIDR format supported)
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-d DESCRIPTION, --description DESCRIPTION
Ip address description
-D, --debug Debug mode
-m MAC, --mac MAC Mac address
-n MASK, --mask MASK Netmask
Use to get the csv export of IP/MAC addresses bindings.
usage: getipmacs [-h] [-f {eole,csv,dhcpd.conf}] [-o OUTPUTFILE]
[-s SEPARATOR] [-D] [-v]
optional arguments:
-h, --help show this help message and exit
-f {eole,csv,dhcpd.conf}, --format {eole,csv,dhcpd.conf}
Output format
-o OUTPUTFILE, --outputfile OUTPUTFILE
Destination file
-s SEPARATOR, --separator SEPARATOR
CSV export separator
-D, --debug Debug mode
-v, --version Display version
If you choose eole format, options will be set as such :
- outputfile =
/var/lib/eole/config/dhcp.conf
- separator =
#