Roles missing from objects queried using depth parameter
See original GitHub issuePython version: Python 3.4.3 ipwhois Version: 0.14.0
I am attempting to get role information at depth for RDAP queries, but the roles are only ever filled in for the first level. Examples with the entirely random example IP 12.3.4.5
-
Example 1
import ipwhois
from pprint import pprint
ip = ipwhois.IPWhois("12.3.4.5")
result = ip.lookup_rdap()
pprint(result)
(See ex_1_result.txt, roles are included for ATTW
. See also ex_1_debug.txt)
Example 2
import ipwhois
from pprint import pprint
ip = ipwhois.IPWhois("12.3.4.5")
result = ip.lookup_rdap(depth=1)
pprint(result)
(See ex_2_result.txt, roles are included for ATTW
again, but missing for all other entities. See also ex_2_debug.txt)
Example 3
wget http://rdap.arin.net/registry/ip/12.3.4.5
(see ex_3_result.txt, roles are included for all entities.)
Based on the debug output, it seems that the role information is available in the initial query but is not used when depth
== 0 and ignored or overwritten when depth
> 0.
I am not sure if this is by design or if I am otherwise misunderstanding the configuration and expected output here. It is interesting that the results of wget http://rdap.arin.net/registry/ip/12.3.4.5
, for example, actually include a number of entities and their associated information that is all removed or ignored when depth
== 0. This seems to make sense, but why not include the basic information since it is already there?
I haven’t dug in to the code at all, but I would be happy to do a PR if there is interest in tweaking this functionality.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Awesome, thanks for testing. I’ll get v0.15.1 pushed to PyPi soon.
Merged in 917b6b5. Waiting for final tests before I push to PyPi. Travis needs to implement load balancing with multiple external IPs. Multiple back to back tests are killing me…