merging registry into git

This commit is contained in:
Xuu 2017-12-31 06:01:03 +00:00
parent b00215bb81
commit 577726434c
9 changed files with 17 additions and 9 deletions

View file

@ -1,4 +1,4 @@
inet6num: fd06:e881:1300:0000:0000:0000:0000:0000-fd06:e881:130f:ffff:ffff:ffff:ffff:ffff
inet6num: fd06:e881:1300:0000:0000:0000:0000:0000 - fd06:e881:130f:ffff:ffff:ffff:ffff:ffff
netname: NET-REWBYSOFT-VMCLUSTER
nserver: ns1.aperture-laboratories.dn42
country: NL

View file

@ -1,4 +1,4 @@
inet6num: fd51:cc31:30f5:0000:0000:0000:0000:0000-fd51:cc31:30f5:ffff:ffff:ffff:ffff:ffff
inet6num: fd51:cc31:30f5:0000:0000:0000:0000:0000 - fd51:cc31:30f5:ffff:ffff:ffff:ffff:ffff
netname: NET-REWBYSOFT-000
country: NL
admin-c: REWBYCRAFT-DN42

View file

@ -1,4 +1,4 @@
inet6num: fdca:852a:928d:0000:0000:0000:0000:0000-fdca:852a:928d:ffff:ffff:ffff:ffff:ffff
inet6num: fdca:852a:928d:0000:0000:0000:0000:0000 - fdca:852a:928d:ffff:ffff:ffff:ffff:ffff
netname: NET-REWBYSOFT-001
remarks: This prefix will be decomissioned shortly.
country: NL

View file

@ -1,4 +1,4 @@
inet6num: fdfd:dead:c0de:0000:0000:0000:0000:0000-fdfd:dead:c0de:ffff:ffff:ffff:ffff:ffff
inet6num: fdfd:dead:c0de:0000:0000:0000:0000:0000 - fdfd:dead:c0de:ffff:ffff:ffff:ffff:ffff
netname: NET-REWBYSOFT
nserver: ns1.aperture-laboratories.dn42
descr: Main allocation.

View file

@ -1,4 +1,4 @@
inetnum: 172.20.226.0-172.20.226.255
inetnum: 172.20.226.0 - 172.20.226.255
netname: NET-REWBYSOFT-VMCLUSTER
nserver: ns1.aperture-laboratories.dn42
descr: Secondary allocation. Used by VM cluster.

View file

@ -1,4 +1,4 @@
inetnum: 172.23.169.0-172.23.169.255
inetnum: 172.23.169.0 - 172.23.169.255
netname: NET-REWBYSOFT-ASIX
nserver: ns1.aperture-laboratories.dn42
descr: ASIX Network

View file

@ -1,4 +1,4 @@
inetnum: 172.23.179.0-172.23.179.255
inetnum: 172.23.179.0 - 172.23.179.255
netname: ASIX-2
descr: Second allocation for asix (because it ran out)
admin-c: REWBYCRAFT-DN42

View file

@ -0,0 +1,4 @@
route: 172.20.140.0/23
origin: AS4242420842
mnt-by: REWBYSOFT-MNT
bgp-status: active

View file

@ -181,7 +181,7 @@ class FileDOM:
if i[0].strip() not in keys:
keys[i[0].strip()] = []
keys[i[0].strip()].append(lineno - 1)
keys[i[0].strip()].append(len(dom) - 1)
last_multi = None
@ -213,8 +213,9 @@ class FileDOM:
def get(self, key, index=0, default=None):
if key not in self.keys:
return default
if index > len(self.keys[key]) or index < -len(self.keys[key]):
if index >= len(self.keys[key]) or index <= -len(self.keys[key]):
return default
return self.dom[self.keys[key][index]][1]
@ -741,6 +742,8 @@ def test_policy(obj_type, name, mntner):
return "FAIL"
def sanity_check(dom):
# log.info(dom.keys)
# log.info(dom.dom)
ck = "PASS"
if dom.schema == "dn42.inetnum":
cidr = dom.get("cidr")
@ -755,6 +758,7 @@ def sanity_check(dom):
if dom.schema == "dn42.inet6num":
cidr = dom.get("cidr")
log.info(cidr)
Lnet, Hnet, mask = inet6range(cidr)
cidr_range = pretty_ip(Lnet) + "-" + pretty_ip(Hnet)
file_range = dom.get("inet6num")