Skip to content

Commit

Permalink
Merge pull request #117 from jelu/fix-cli-auth
Browse files Browse the repository at this point in the history
Fix client subnet authority
  • Loading branch information
jelu authored Jun 10, 2024
2 parents 602ca41 + 8568c84 commit dcec817
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 55 deletions.
3 changes: 3 additions & 0 deletions dsc_datatool/generator/client_subnet_authority.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def _read(self, input):
else:
if status == 'RESERVED':
rir = 'IANA'
elif designation == 'Segment Routing (SRv6) SIDs':
# TODO: How to better handle this weird allocation?
rir = 'IANA'
else:
raise Exception('Unknown whois/designation: %r/%r' % (whois, designation))

Expand Down
88 changes: 44 additions & 44 deletions tests/ipv4-address-space.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Prefix,Designation,Date,WHOIS,RDAP,Status [1],Note
000/8,IANA - Local Identification,1981-09,,,RESERVED,[2]
000/8,IANA - Local Identification,1981-09,,,RESERVED,[2][3]
001/8,APNIC,2010-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
002/8,RIPE NCC,2009-09,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
003/8,Administered by ARIN,1994-05,whois.arin.net,"https://rdap.arin.net/registry
Expand All @@ -15,14 +15,14 @@ http://rdap.arin.net/registry",LEGACY,
http://rdap.arin.net/registry",LEGACY,
009/8,Administered by ARIN,1992-08,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
010/8,IANA - Private Use,1995-06,,,RESERVED,[3]
010/8,IANA - Private Use,1995-06,,,RESERVED,[4]
011/8,DoD Intel Information Systems,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
012/8,AT&T Bell Laboratories,1995-06,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
013/8,Administered by ARIN,1991-09,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
014/8,APNIC,2010-04,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,[4]
014/8,APNIC,2010-04,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,[5]
015/8,Administered by ARIN,1994-07,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
016/8,Administered by ARIN,1994-11,whois.arin.net,"https://rdap.arin.net/registry
Expand Down Expand Up @@ -80,7 +80,7 @@ http://rdap.arin.net/registry",LEGACY,
046/8,RIPE NCC,2009-09,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
047/8,Administered by ARIN,1991-01,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
048/8,Prudential Securities Inc.,1995-05,whois.arin.net,"https://rdap.arin.net/registry
048/8,Administered by ARIN,1995-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
049/8,APNIC,2010-08,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
050/8,ARIN,2010-02,whois.arin.net,"https://rdap.arin.net/registry
Expand All @@ -93,7 +93,7 @@ http://rdap.arin.net/registry",LEGACY,
http://rdap.arin.net/registry",LEGACY,
055/8,DoD Network Information Center,1995-04,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
056/8,US Postal Service,1994-06,whois.arin.net,"https://rdap.arin.net/registry
056/8,Administered by ARIN,1994-06,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
057/8,Administered by RIPE NCC,1995-05,whois.ripe.net,https://rdap.db.ripe.net/,LEGACY,
058/8,APNIC,2004-04,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
Expand Down Expand Up @@ -157,7 +157,7 @@ http://rdap.arin.net/registry",ALLOCATED,
099/8,ARIN,2006-10,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
100/8,ARIN,2010-11,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,[5]
http://rdap.arin.net/registry",ALLOCATED,[6]
101/8,APNIC,2010-08,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
102/8,AFRINIC,2011-02,whois.afrinic.net,"https://rdap.afrinic.net/rdap/
http://rdap.afrinic.net/rdap/",ALLOCATED,
Expand Down Expand Up @@ -189,7 +189,7 @@ http://rdap.arin.net/registry",ALLOCATED,
124/8,APNIC,2005-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
125/8,APNIC,2005-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
126/8,APNIC,2005-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
127/8,IANA - Loopback,1981-09,,,RESERVED,[6]
127/8,IANA - Loopback,1981-09,,,RESERVED,[7]
128/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
129/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
Expand Down Expand Up @@ -266,12 +266,12 @@ http://rdap.arin.net/registry",LEGACY,
168/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
169/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,[7]
http://rdap.arin.net/registry",LEGACY,[8]
170/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,
171/8,Administered by APNIC,1993-05,whois.apnic.net,https://rdap.apnic.net/,LEGACY,
172/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,[8]
http://rdap.arin.net/registry",LEGACY,[9]
173/8,ARIN,2008-02,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
174/8,ARIN,2008-02,whois.arin.net,"https://rdap.arin.net/registry
Expand All @@ -295,7 +295,7 @@ http://rdap.arin.net/registry",ALLOCATED,
190/8,LACNIC,1995-06,whois.lacnic.net,https://rdap.lacnic.net/rdap/,ALLOCATED,
191/8,Administered by LACNIC,1993-05,whois.lacnic.net,https://rdap.lacnic.net/rdap/,LEGACY,
192/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,[9][10]
http://rdap.arin.net/registry",LEGACY,[10][11]
193/8,RIPE NCC,1993-05,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
194/8,RIPE NCC,1993-05,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
195/8,RIPE NCC,1993-05,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
Expand All @@ -304,13 +304,13 @@ http://rdap.afrinic.net/rdap/",LEGACY,
197/8,AFRINIC,2008-10,whois.afrinic.net,"https://rdap.afrinic.net/rdap/
http://rdap.afrinic.net/rdap/",ALLOCATED,
198/8,Administered by ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",LEGACY,[11]
http://rdap.arin.net/registry",LEGACY,[12]
199/8,ARIN,1993-05,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
200/8,LACNIC,2002-11,whois.lacnic.net,https://rdap.lacnic.net/rdap/,ALLOCATED,
201/8,LACNIC,2003-04,whois.lacnic.net,https://rdap.lacnic.net/rdap/,ALLOCATED,
202/8,APNIC,1993-05,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
203/8,APNIC,1993-05,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,[12]
203/8,APNIC,1993-05,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,[13]
204/8,ARIN,1994-03,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
205/8,ARIN,1994-03,whois.arin.net,"https://rdap.arin.net/registry
Expand Down Expand Up @@ -340,35 +340,35 @@ http://rdap.arin.net/registry",ALLOCATED,
221/8,APNIC,2002-07,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
222/8,APNIC,2003-02,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
223/8,APNIC,2010-04,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
224/8,Multicast,1981-09,,,RESERVED,[13]
225/8,Multicast,1981-09,,,RESERVED,[13]
226/8,Multicast,1981-09,,,RESERVED,[13]
227/8,Multicast,1981-09,,,RESERVED,[13]
228/8,Multicast,1981-09,,,RESERVED,[13]
229/8,Multicast,1981-09,,,RESERVED,[13]
230/8,Multicast,1981-09,,,RESERVED,[13]
231/8,Multicast,1981-09,,,RESERVED,[13]
232/8,Multicast,1981-09,,,RESERVED,[13]
233/8,Multicast,1981-09,,,RESERVED,[13]
234/8,Multicast,1981-09,,,RESERVED,[13][14]
235/8,Multicast,1981-09,,,RESERVED,[13]
236/8,Multicast,1981-09,,,RESERVED,[13]
237/8,Multicast,1981-09,,,RESERVED,[13]
238/8,Multicast,1981-09,,,RESERVED,[13]
239/8,Multicast,1981-09,,,RESERVED,[13][15]
240/8,Future use,1981-09,,,RESERVED,[16]
241/8,Future use,1981-09,,,RESERVED,[16]
242/8,Future use,1981-09,,,RESERVED,[16]
243/8,Future use,1981-09,,,RESERVED,[16]
244/8,Future use,1981-09,,,RESERVED,[16]
245/8,Future use,1981-09,,,RESERVED,[16]
246/8,Future use,1981-09,,,RESERVED,[16]
247/8,Future use,1981-09,,,RESERVED,[16]
248/8,Future use,1981-09,,,RESERVED,[16]
249/8,Future use,1981-09,,,RESERVED,[16]
250/8,Future use,1981-09,,,RESERVED,[16]
251/8,Future use,1981-09,,,RESERVED,[16]
252/8,Future use,1981-09,,,RESERVED,[16]
253/8,Future use,1981-09,,,RESERVED,[16]
254/8,Future use,1981-09,,,RESERVED,[16]
255/8,Future use,1981-09,,,RESERVED,[16][17]
224/8,Multicast,1981-09,,,RESERVED,[14]
225/8,Multicast,1981-09,,,RESERVED,[14]
226/8,Multicast,1981-09,,,RESERVED,[14]
227/8,Multicast,1981-09,,,RESERVED,[14]
228/8,Multicast,1981-09,,,RESERVED,[14]
229/8,Multicast,1981-09,,,RESERVED,[14]
230/8,Multicast,1981-09,,,RESERVED,[14]
231/8,Multicast,1981-09,,,RESERVED,[14]
232/8,Multicast,1981-09,,,RESERVED,[14]
233/8,Multicast,1981-09,,,RESERVED,[14]
234/8,Multicast,1981-09,,,RESERVED,[14][15]
235/8,Multicast,1981-09,,,RESERVED,[14]
236/8,Multicast,1981-09,,,RESERVED,[14]
237/8,Multicast,1981-09,,,RESERVED,[14]
238/8,Multicast,1981-09,,,RESERVED,[14]
239/8,Multicast,1981-09,,,RESERVED,[14][16]
240/8,Future use,1981-09,,,RESERVED,[17]
241/8,Future use,1981-09,,,RESERVED,[17]
242/8,Future use,1981-09,,,RESERVED,[17]
243/8,Future use,1981-09,,,RESERVED,[17]
244/8,Future use,1981-09,,,RESERVED,[17]
245/8,Future use,1981-09,,,RESERVED,[17]
246/8,Future use,1981-09,,,RESERVED,[17]
247/8,Future use,1981-09,,,RESERVED,[17]
248/8,Future use,1981-09,,,RESERVED,[17]
249/8,Future use,1981-09,,,RESERVED,[17]
250/8,Future use,1981-09,,,RESERVED,[17]
251/8,Future use,1981-09,,,RESERVED,[17]
252/8,Future use,1981-09,,,RESERVED,[17]
253/8,Future use,1981-09,,,RESERVED,[17]
254/8,Future use,1981-09,,,RESERVED,[17]
255/8,Future use,1981-09,,,RESERVED,[17][18]
28 changes: 17 additions & 11 deletions tests/ipv6-unicast-address-assignments.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,30 @@ Prefix,Designation,Date,WHOIS,RDAP,Status,Note
2001:0000::/23,IANA,1999-07-01,whois.iana.org,,ALLOCATED,"2001:0000::/23 is reserved for IETF Protocol Assignments [RFC2928].
2001:0000::/32 is reserved for TEREDO [RFC4380].
2001:1::1/128 is reserved for Port Control Protocol Anycast [RFC7723].
2001:2::/48 is reserved for Benchmarking [RFC5180][RFC Errata
1752].
2001:1::2/128 is reserved for Traversal Using Relays around NAT Anycast [RFC8155].
2001:1::3/128 is reserved for DNS-SD Service Registration Protocol Anycast [RFC-ietf-dnssd-srp-25].
2001:2::/48 is reserved for Benchmarking [RFC5180][RFC Errata 1752].
2001:3::/32 is reserved for AMT [RFC7450].
2001:4:112::/48 is reserved for AS112-v6 [RFC7535].
2001:10::/28 is deprecated (previously ORCHID) [RFC4843].
2001:20::/28 is reserved for ORCHIDv2 [RFC7343].
2001:db8::/32 is reserved for Documentation [RFC3849].
2001:30::/28 is reserved for Drone Remote ID Protocol Entity Tags (DETs) [RFC9374].
For complete registration details, see [IANA registry iana-ipv6-special-registry]."
2001:0200::/23,APNIC,1999-07-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
2001:0400::/23,ARIN,1999-07-01,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
2001:0600::/23,RIPE NCC,1999-07-01,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
2001:0800::/22,RIPE NCC,2002-11-02,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,"2001:0800::/23 was allocated on 2002-05-02. The more recent
allocation (2002-11-02) incorporates the previous allocation."
2001:0800::/22,RIPE NCC,2002-11-02,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,2001:0800::/23 was allocated on 2002-05-02. The more recent allocation (2002-11-02) incorporates the previous allocation.
2001:0c00::/23,APNIC,2002-05-02,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,"2001:db8::/32 reserved for Documentation [RFC3849].
For complete registration details, see [IANA registry iana-ipv6-special-registry]."
2001:0e00::/23,APNIC,2003-01-01,whois.apnic.net,https://rdap.apnic.net/,ALLOCATED,
2001:1200::/23,LACNIC,2002-11-01,whois.lacnic.net,https://rdap.lacnic.net/rdap/,ALLOCATED,
2001:1400::/22,RIPE NCC,2003-07-01,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,"2001:1400::/23 was allocated on 2003-02-01. The more recent
allocation (2003-07-01) incorporates the previous allocation."
2001:1400::/22,RIPE NCC,2003-07-01,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,2001:1400::/23 was allocated on 2003-02-01. The more recent allocation (2003-07-01) incorporates the previous allocation.
2001:1800::/23,ARIN,2003-04-01,whois.arin.net,"https://rdap.arin.net/registry
http://rdap.arin.net/registry",ALLOCATED,
2001:1a00::/23,RIPE NCC,2004-01-01,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
2001:1c00::/22,RIPE NCC,2004-05-04,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
2001:2000::/19,RIPE NCC,2019-03-12,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,"2001:2000::/20, 2001:3000::/21, and 2001:3800::/22
were allocated on 2004-05-04. The more recent allocation
(2019-03-12) incorporates all these previous allocations."
2001:2000::/19,RIPE NCC,2019-03-12,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,"2001:2000::/20, 2001:3000::/21, and 2001:3800::/22 were allocated on 2004-05-04. The more recent allocation (2019-03-12) incorporates all these previous allocations."
2001:4000::/23,RIPE NCC,2004-06-11,whois.ripe.net,https://rdap.db.ripe.net/,ALLOCATED,
2001:4200::/23,AFRINIC,2004-06-01,whois.afrinic.net,"https://rdap.afrinic.net/rdap/
http://rdap.afrinic.net/rdap/",ALLOCATED,
Expand Down Expand Up @@ -71,4 +68,13 @@ http://rdap.afrinic.net/rdap/",ALLOCATED,
3ffe::/16,IANA,2008-04,,,RESERVED,"3ffe:831f::/32 was used for Teredo in some old but widely distributed networking stacks. This usage is
deprecated in favor of 2001::/32, which was allocated for the purpose in [RFC4380].
3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156]"
5f00::/8,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156]
5f00::/16,Segment Routing (SRv6) SIDs,2024-04-23,,,ALLOCATED,"5f00::/16 is reserved for Segment Routing (SRv6) SIDs [RFC-ietf-6man-sids-06].
For complete registration details, see [IANA registry iana-ipv6-special-registry]."
5f01::/16,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f02::/15,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f04::/14,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f08::/13,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f10::/12,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f20::/11,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f40::/10,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].
5f80::/9,IANA,2008-04,,,RESERVED,3ffe::/16 and 5f00::/8 were used for the 6bone but were returned. [RFC5156].

0 comments on commit dcec817

Please sign in to comment.