From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: location@lists.ipfire.org Subject: Re: [PATCH v2 2/2] importer.py: add source information for RIR data feeds Date: Wed, 26 May 2021 20:11:52 +0200 Message-ID: <06b61c69-8623-0bdc-62f5-bff2f1a95eb0@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6268199324690787329==" List-Id: --===============6268199324690787329== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Michael, thanks for your reply. I am not sure if I understood you correctly. What am I missing in which patch= (set)? Thanks, and best regards, Peter M=C3=BCller > Hallo, >=20 > This probably should have been in the first patch because it won=E2=80=99t = work without this. >=20 > Best, > -Michael >=20 >> On 22 May 2021, at 21:33, Peter M=C3=BCller w= rote: >> >> Signed-off-by: Peter M=C3=BCller >> --- >> src/python/importer.py | 66 +++++++++++++++++++++++++++--------------- >> 1 file changed, 42 insertions(+), 24 deletions(-) >> >> 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 >> >> -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" >> + ], >> >> # 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" >> + ], >> >> # 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" >> + # ], >> >> # Latin America and Caribbean Network Information Centre >> # XXX ??? >> >> # 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-l= atest", >> + # "ARIN": [ >> + # "https://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-= latest" >> + # ], >> >> # Asia Pacific Network Information Centre >> - #"https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-extended-lates= t", >> + # "APNIC": [ >> + # "https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-extended-late= st" >> + # ], >> >> # 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" >> + ], >> >> # Latin America and Caribbean Network Information Centre >> - "https://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-lates= t", >> + "LACNIC": [ >> + "https://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-late= st" >> + ], >> >> # R=C3=A9seaux IP Europ=C3=A9ens >> - #"https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-late= st", >> -) >> + # "RIPE": [ >> + # "https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-lat= est" >> + # ], >> +} >> >> class Downloader(object): >> def __init__(self): >> --=20 >> 2.20.1 >> >=20 --===============6268199324690787329==--