mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-07-13 22:26:22 +08:00
merging registry into git
This commit is contained in:
parent
b00215bb81
commit
577726434c
9 changed files with 17 additions and 9 deletions
|
@ -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
|
netname: NET-REWBYSOFT-VMCLUSTER
|
||||||
nserver: ns1.aperture-laboratories.dn42
|
nserver: ns1.aperture-laboratories.dn42
|
||||||
country: NL
|
country: NL
|
||||||
|
|
|
@ -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
|
netname: NET-REWBYSOFT-000
|
||||||
country: NL
|
country: NL
|
||||||
admin-c: REWBYCRAFT-DN42
|
admin-c: REWBYCRAFT-DN42
|
||||||
|
|
|
@ -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
|
netname: NET-REWBYSOFT-001
|
||||||
remarks: This prefix will be decomissioned shortly.
|
remarks: This prefix will be decomissioned shortly.
|
||||||
country: NL
|
country: NL
|
||||||
|
|
|
@ -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
|
netname: NET-REWBYSOFT
|
||||||
nserver: ns1.aperture-laboratories.dn42
|
nserver: ns1.aperture-laboratories.dn42
|
||||||
descr: Main allocation.
|
descr: Main allocation.
|
||||||
|
|
|
@ -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
|
netname: NET-REWBYSOFT-VMCLUSTER
|
||||||
nserver: ns1.aperture-laboratories.dn42
|
nserver: ns1.aperture-laboratories.dn42
|
||||||
descr: Secondary allocation. Used by VM cluster.
|
descr: Secondary allocation. Used by VM cluster.
|
||||||
|
|
|
@ -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
|
netname: NET-REWBYSOFT-ASIX
|
||||||
nserver: ns1.aperture-laboratories.dn42
|
nserver: ns1.aperture-laboratories.dn42
|
||||||
descr: ASIX Network
|
descr: ASIX Network
|
||||||
|
|
|
@ -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
|
netname: ASIX-2
|
||||||
descr: Second allocation for asix (because it ran out)
|
descr: Second allocation for asix (because it ran out)
|
||||||
admin-c: REWBYCRAFT-DN42
|
admin-c: REWBYCRAFT-DN42
|
||||||
|
|
4
data/route/172.20.140.0_23
Normal file
4
data/route/172.20.140.0_23
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
route: 172.20.140.0/23
|
||||||
|
origin: AS4242420842
|
||||||
|
mnt-by: REWBYSOFT-MNT
|
||||||
|
bgp-status: active
|
|
@ -181,7 +181,7 @@ class FileDOM:
|
||||||
if i[0].strip() not in keys:
|
if i[0].strip() not in keys:
|
||||||
keys[i[0].strip()] = []
|
keys[i[0].strip()] = []
|
||||||
|
|
||||||
keys[i[0].strip()].append(lineno - 1)
|
keys[i[0].strip()].append(len(dom) - 1)
|
||||||
|
|
||||||
last_multi = None
|
last_multi = None
|
||||||
|
|
||||||
|
@ -213,8 +213,9 @@ class FileDOM:
|
||||||
def get(self, key, index=0, default=None):
|
def get(self, key, index=0, default=None):
|
||||||
if key not in self.keys:
|
if key not in self.keys:
|
||||||
return default
|
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 default
|
||||||
|
|
||||||
return self.dom[self.keys[key][index]][1]
|
return self.dom[self.keys[key][index]][1]
|
||||||
|
|
||||||
|
|
||||||
|
@ -741,6 +742,8 @@ def test_policy(obj_type, name, mntner):
|
||||||
return "FAIL"
|
return "FAIL"
|
||||||
|
|
||||||
def sanity_check(dom):
|
def sanity_check(dom):
|
||||||
|
# log.info(dom.keys)
|
||||||
|
# log.info(dom.dom)
|
||||||
ck = "PASS"
|
ck = "PASS"
|
||||||
if dom.schema == "dn42.inetnum":
|
if dom.schema == "dn42.inetnum":
|
||||||
cidr = dom.get("cidr")
|
cidr = dom.get("cidr")
|
||||||
|
@ -755,6 +758,7 @@ def sanity_check(dom):
|
||||||
|
|
||||||
if dom.schema == "dn42.inet6num":
|
if dom.schema == "dn42.inet6num":
|
||||||
cidr = dom.get("cidr")
|
cidr = dom.get("cidr")
|
||||||
|
log.info(cidr)
|
||||||
Lnet, Hnet, mask = inet6range(cidr)
|
Lnet, Hnet, mask = inet6range(cidr)
|
||||||
cidr_range = pretty_ip(Lnet) + "-" + pretty_ip(Hnet)
|
cidr_range = pretty_ip(Lnet) + "-" + pretty_ip(Hnet)
|
||||||
file_range = dom.get("inet6num")
|
file_range = dom.get("inet6num")
|
||||||
|
|
Loading…
Add table
Reference in a new issue