Open plajjan opened 12 years ago
Naturally, we should try to make our support as RIR neutral as possible but given that RIPE is the only one that I have experience with, it's a natural place to start at least. While routes and AS-numbers would be nice to support, this issue should focus on inetnum & inet6nums as that is what is most needed.
Inetnum;
inetnum: [mandatory] [single] [primary/lookup key]
netname: [mandatory] [single] [lookup key]
descr: [mandatory] [multiple] [ ]
country: [mandatory] [multiple] [ ]
geoloc: [optional] [single] [ ]
language: [optional] [multiple] [ ]
org: [optional] [single] [inverse key]
admin-c: [mandatory] [multiple] [inverse key]
tech-c: [mandatory] [multiple] [inverse key]
status: [mandatory] [single] [ ]
remarks: [optional] [multiple] [ ]
notify: [optional] [multiple] [inverse key]
mnt-by: [mandatory] [multiple] [inverse key]
mnt-lower: [optional] [multiple] [inverse key]
mnt-domains: [optional] [multiple] [inverse key]
mnt-routes: [optional] [multiple] [inverse key]
mnt-irt: [optional] [multiple] [inverse key]
changed: [mandatory] [multiple] [ ]
source: [mandatory] [single] [ ]
We will need to introduce a few more attributes for our prefixes to be able to do this.
How should we handle fields that can take multiple values? Simply an array of texts?
The descr value could potentially also be a multi-line value, so perhaps the same thing with an array of text. If the prefix description is long, should we automatically wrap it into multiple descr lines? Need to store a flag (boolean) if the user overrides the value of descr manually or if it should be copied.
Given that the inetnum object for a prefix could already exist in the RIPE whois db, we need a way to fetch the current object and store that somewhere and then use some of the values from it when we push an update for our new object. For example, RIPE typically puts RIPE-NCC-HM-PI-MNT for all PI assignments and they become rather unhappy if it is removed.
I think it's okay that the output format is fixed, as in the order of fields could be in the same order at all times. Having a custom order would make things a lot more complex without adding much.
We should store what the user want the RIPE object to look like and what it currently looks like.
I guess the later would be a good start and almost a prerequisite of pushing new data to RIPE.
Should we store historic data as well? So one can go back in time and look at how it used to look in RIPE?
How should we run the jobs to pull and push data from/to RIPE?
I don't think nipapd should do that. Rather we should have some form of job queueing system and let a second daemon handle it.
It could possibly run within nipapd, but as a separate process forked by it.
Need to be able to fetch data.
This seems crap. We don't want a wrapper around whois. https://code.google.com/p/python-whois/
This one? https://code.google.com/p/python-whois/ Or https://code.google.com/p/pywhois/
Why bother with a whois-wrapper. At least for RIPE and ARIN there are RESTful APIs for queries and updates of the DBs available: https://github.com/RIPE-NCC/whois/wiki/WHOIS-REST-API https://www.arin.net/resources/whoisrws/whois_api.html + http://projects.arin.net/arinr/arincli.7.html
Good point :) although it only helps people in ARIN and RIPE land but I'm willing to live with that for now.
Well I'm aware that there are missing three other RIRs. But I'm pretty sure that you will have to write code for every RIR because there are always differences. Starting with RIPE NCC and ARIN would be a start. But there will always be differences between the systems...
BTW:
Support for pushing updates to RIPE about inetnums, routes and so forth would be pretty sweet.