Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hum it has been a while ... i sort of moved blockfinder to use a class style setup and optparser instead of getopt. This also has some more ipv6 functionality (iff IPy is available). #18

Merged
merged 15 commits into from
Apr 19, 2011

Conversation

d1b
Copy link
Collaborator

@d1b d1b commented Mar 29, 2011

hum it has been a while ... i sort of moved blockfinder to use a class style setup and optparser instead of getopt. This also has some more ipv6 functionality (iff IPy is available).

d1b added 11 commits January 13, 2011 16:36
…get the ipv6 addr of a host

Signed-off-by: dave bl <db@d1b.org>
… which is pulled from 'test_data.py'.

Run all the tests with verbosity=2

Signed-off-by: dave bl <db@d1b.org>
…y as the usage() method's,

OptionParser (imho) makes for much cleaner code .

Signed-off-by: dave bl <db@d1b.org>
Signed-off-by: dave bl <db@d1b.org>
Signed-off-by: dave bl <db@d1b.org>
…_use_ipv6 test case

Signed-off-by: dave bl <db@d1b.org>
… declared

Signed-off-by: dave bl <db@d1b.org>
…ad only 1024 bytes at a time.

Signed-off-by: dave bl <db@d1b.org>
…tionality).

Signed-off-by: dave bl <db@d1b.org>
…to use the cursor after calling this method an exception would be raised. This meant that ipv4 LIR lookups were broken.

Signed-off-by: dave bl <db@d1b.org>
@ioerror
Copy link
Owner

ioerror commented Apr 4, 2011

It is going to take me a bit to review this but overall, I plan to merge it pending review.

@d1b
Copy link
Collaborator Author

d1b commented Apr 5, 2011

you should also pull in d1b@518907e

d1b added 4 commits April 5, 2011 21:24
…"/test/" as the test_dir in BlockFinderTestExtras.

Add a clean_up method to BlockFinderTestExtras to remove the temporary base folder when done.

Signed-off-by: dave bl <db@d1b.org>
…on of lir rows - the process was taking a *very* long time. This 'commit' moves the commit() to come after rows have been inserted.

Signed-off-by: dave bl <db@d1b.org>
…by one in some cases. This commit should fix that issue. Tests will be added for the issue in a later commit.

Signed-off-by: dave bl <db@d1b.org>
…ould be listed incorrectly where a delegation listing specified more than one CIDR block (e.g. 193.9.29.0 with a size of 768 - contains a /23 and a /24). This commit should fix that issue iff you have the netaddr module installed.

Signed-off-by: dave bl <db@d1b.org>
@ioerror
Copy link
Owner

ioerror commented Apr 18, 2011

I'm going to review/merge these today or tomorrow - sorry for the giant delay.

@hellais
Copy link
Contributor

hellais commented Apr 18, 2011

The README should specify where one can download NetAddr (http://code.google.com/p/netaddr/) and IPy (http://c0re.23.nu/c0de/IPy/) that are both imported.
Also from what I understand optparse (http://docs.python.org/library/optparse.html) is deprecated since 2.7, it would be best to use either argparse (only supported since 2.7) or stay with the good old getopt.

@ioerror
Copy link
Owner

ioerror commented Apr 18, 2011

It's also worth noting 'python-ipy' and 'python-netaddr' are valid debian/ubuntu/etc package names.

@ioerror ioerror merged commit 7e0c782 into ioerror:master Apr 19, 2011
@ioerror
Copy link
Owner

ioerror commented Apr 19, 2011

I've reviewed it all and merged everything - thanks!

@ioerror
Copy link
Owner

ioerror commented Apr 19, 2011

I've noticed this - I'm not sure if it's new:

./blockfinder -l
Updating LIR delegation cache...
Fetching ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.inetnum.gz
Fetching 159354.0 kilobytes
[================================================================================================================================================>] 124.81 K/s
Fetching ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.inet6num.gz
Fetching 2079.0 kilobytes
[================================================================================================================================================>] 355.14 K/s
Extracting and inserting information from the lir files can take up to 5 minutes
list index out of range
list index out of range
list index out of range
list index out of range
list index out of range
list index out of range
list index out of range

Thoughts?

@d1b
Copy link
Collaborator Author

d1b commented Apr 19, 2011

@hellais yes that maybe the case now - but as python2.7 is the last python 2.X release (or will be). So using optparse is ok for python 2.X. We don't currently support python3 - when we add support for python3 we can review this.

@d1b
Copy link
Collaborator Author

d1b commented Apr 19, 2011

@ioerror iirc that was there before. It should probably only be shown in verbose mode.
Hum... it turns out there are some entries like this:
inetnum: 213.246.170.136

  • 213.246.170.143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants