From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: location@lists.ipfire.org Subject: Re: [PATCH v2 2/2] importer.py: add source information for RIR data feeds Date: Tue, 25 May 2021 11:30:05 +0100 Message-ID: In-Reply-To: <20210522203352.22746-2-peter.mueller@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6718257142618215758==" List-Id: --===============6718257142618215758== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hallo, This probably should have been in the first patch because it won=E2=80=99t wo= rk without this. Best, -Michael > On 22 May 2021, at 21:33, Peter M=C3=BCller wr= ote: >=20 > Signed-off-by: Peter M=C3=BCller > --- > src/python/importer.py | 66 +++++++++++++++++++++++++++--------------- > 1 file changed, 42 insertions(+), 24 deletions(-) >=20 > diff --git a/src/python/importer.py b/src/python/importer.py > index 5f46bc3..4c8406c 100644 > --- a/src/python/importer.py > +++ b/src/python/importer.py > @@ -25,50 +25,68 @@ import urllib.request > log =3D logging.getLogger("location.importer") > log.propagate =3D 1 >=20 > -WHOIS_SOURCES =3D ( > +WHOIS_SOURCES =3D { > # African Network Information Centre > - "https://ftp.afrinic.net/pub/pub/dbase/afrinic.db.gz", > + "AFRINIC": [ > + "https://ftp.afrinic.net/pub/pub/dbase/afrinic.db.gz" > + ], >=20 > # Asia Pacific Network Information Centre > - "https://ftp.apnic.net/apnic/whois/apnic.db.inet6num.gz", > - "https://ftp.apnic.net/apnic/whois/apnic.db.inetnum.gz", > - #"https://ftp.apnic.net/apnic/whois/apnic.db.route6.gz", > - #"https://ftp.apnic.net/apnic/whois/apnic.db.route.gz", > - "https://ftp.apnic.net/apnic/whois/apnic.db.aut-num.gz", > - "https://ftp.apnic.net/apnic/whois/apnic.db.organisation.gz", > + "APNIC": [ > + "https://ftp.apnic.net/apnic/whois/apnic.db.inet6num.gz", > + "https://ftp.apnic.net/apnic/whois/apnic.db.inetnum.gz", > + #"https://ftp.apnic.net/apnic/whois/apnic.db.route6.gz", > + #"https://ftp.apnic.net/apnic/whois/apnic.db.route.gz", > + "https://ftp.apnic.net/apnic/whois/apnic.db.aut-num.gz", > + "https://ftp.apnic.net/apnic/whois/apnic.db.organisation.gz" > + ], >=20 > # American Registry for Internet Numbers > # XXX there is nothing useful for us in here > - #"https://ftp.arin.net/pub/rr/arin.db", > + # ARIN: [ > + # "https://ftp.arin.net/pub/rr/arin.db" > + # ], >=20 > # Latin America and Caribbean Network Information Centre > # XXX ??? >=20 > # R=C3=A9seaux IP Europ=C3=A9ens > - "https://ftp.ripe.net/ripe/dbase/split/ripe.db.inet6num.gz", > - "https://ftp.ripe.net/ripe/dbase/split/ripe.db.inetnum.gz", > - #"https://ftp.ripe.net/ripe/dbase/split/ripe.db.route6.gz", > - #"https://ftp.ripe.net/ripe/dbase/split/ripe.db.route.gz", > - "https://ftp.ripe.net/ripe/dbase/split/ripe.db.aut-num.gz", > - "https://ftp.ripe.net/ripe/dbase/split/ripe.db.organisation.gz", > -) > - > -EXTENDED_SOURCES =3D ( > + "RIPE": [ > + "https://ftp.ripe.net/ripe/dbase/split/ripe.db.inet6num.gz", > + "https://ftp.ripe.net/ripe/dbase/split/ripe.db.inetnum.gz", > + #"https://ftp.ripe.net/ripe/dbase/split/ripe.db.route6.gz", > + #"https://ftp.ripe.net/ripe/dbase/split/ripe.db.route.gz", > + "https://ftp.ripe.net/ripe/dbase/split/ripe.db.aut-num.gz", > + "https://ftp.ripe.net/ripe/dbase/split/ripe.db.organisation.gz" > + ], > +} > + > +EXTENDED_SOURCES =3D { > # African Network Information Centre > - #"https://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-la= test", > + # "ARIN": [ > + # "https://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-l= atest" > + # ], >=20 > # Asia Pacific Network Information Centre > - #"https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-extended-latest= ", > + # "APNIC": [ > + # "https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-extended-lates= t" > + # ], >=20 > # American Registry for Internet Numbers > - "https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest", > + "ARIN": [ > + "https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest" > + ], >=20 > # Latin America and Caribbean Network Information Centre > - "https://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest= ", > + "LACNIC": [ > + "https://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-lates= t" > + ], >=20 > # R=C3=A9seaux IP Europ=C3=A9ens > - #"https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-lates= t", > -) > + # "RIPE": [ > + # "https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-late= st" > + # ], > +} >=20 > class Downloader(object): > def __init__(self): > --=20 > 2.20.1 >=20 --===============6718257142618215758==--