Neat IP Address Planner - NIPAP is the best open source IPAM in the known universe, challenging classical IP address management (IPAM) systems in many areas.
I have a remote host from which I want to run my script and access the NIPAP API externally. Remote host is reachable from NIPAP server (10.10.10.36) and I already updated the nipap.conf file per below:
listen = 0.0.0.0
port = 1337
Below is the error I got from the remote host:
vm:~$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
--> import pynipap
--> from pynipap import VRF, Pool, Prefix
--> pynipap.xmlrpc_uri = "http://user01:user01@10.10.10.36:1337/XMLRPC"
--> a = pynipap.AuthOptions({'authoritative_source': 'nipap'})
--> print(a)
--> <pynipap.AuthOptions object at 0x7f35bd1063d0>
--> search_result = Prefix.smart_search('192.168.2.0/24')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3/dist-packages/pynipap.py", line 1103, in smart_search
result['error'] = smart_result['error']
KeyError: 'error'
Strange, I don't see anything obviously wrong there.
Does it work if you try to do the same thing locally on the server where nipapd is running?
Any error messages from nipapd?
I have a remote host from which I want to run my script and access the NIPAP API externally. Remote host is reachable from NIPAP server (10.10.10.36) and I already updated the nipap.conf file per below:
listen = 0.0.0.0
port = 1337
Below is the error I got from the remote host: vm:~$ python3 Python 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. --> import pynipap --> from pynipap import VRF, Pool, Prefix --> pynipap.xmlrpc_uri = "http://user01:user01@10.10.10.36:1337/XMLRPC" --> a = pynipap.AuthOptions({'authoritative_source': 'nipap'}) --> print(a) --> <pynipap.AuthOptions object at 0x7f35bd1063d0> --> search_result = Prefix.smart_search('192.168.2.0/24') Traceback (most recent call last): File "", line 1, in
File "/usr/lib/python3/dist-packages/pynipap.py", line 1103, in smart_search
result['error'] = smart_result['error']
KeyError: 'error'
Remote host: Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal