This new method rnodes = rtree.search_covered("10.123.0.0/16") allows you to find all nodes within a certain prefix.
Pull contains Python implementation that passes the tests I wrote, plus cursory inspection by @job, but I'm not 100% certain about correctness. Pull contains a C stub that is a copy of .prefixes() except it returns nodes, just so I can at least run the tests.
PRing this now to solicit feedback on the Python implementation, so that I can extend the tests if any issues are found, and write the C version then. Of course, if anybody feels like doing the C version, I won't complain ;)
Coverage increased (+0.47%) to 86.43% when pulling 1c3d9dd2fd5d18fccf8de7f766721ebafbfbd931 on Habbie:search_covered into 854d09c5e43aa2a0d3165284dd213be4b6bced3f on mjschultz:master.
Coverage increased (+0.47%) to 86.43% when pulling 1c3d9dd2fd5d18fccf8de7f766721ebafbfbd931 on Habbie:search_covered into 854d09c5e43aa2a0d3165284dd213be4b6bced3f on mjschultz:master.
This new method
rnodes = rtree.search_covered("10.123.0.0/16")
allows you to find all nodes within a certain prefix.Pull contains Python implementation that passes the tests I wrote, plus cursory inspection by @job, but I'm not 100% certain about correctness. Pull contains a C stub that is a copy of
.prefixes()
except it returns nodes, just so I can at least run the tests.PRing this now to solicit feedback on the Python implementation, so that I can extend the tests if any issues are found, and write the C version then. Of course, if anybody feels like doing the C version, I won't complain ;)