diff options
author | Rob Austein <sra@hactrn.net> | 2010-03-25 21:09:19 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-03-25 21:09:19 +0000 |
commit | d4ca731db50b6c3f620f993d3e04b399110e81a8 (patch) | |
tree | 1dd08f3e8de983999bdd72f2068cc075ebb72719 | |
parent | b62cbffc32e7bf3cf90aab1c534cdd6b23f1e6a0 (diff) |
Add checks of status field
svn path=/myrpki.rototill/ripe-to-csv.py; revision=3133
-rw-r--r-- | myrpki.rototill/ripe-to-csv.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/myrpki.rototill/ripe-to-csv.py b/myrpki.rototill/ripe-to-csv.py index 25fd61b7..f974bc46 100644 --- a/myrpki.rototill/ripe-to-csv.py +++ b/myrpki.rototill/ripe-to-csv.py @@ -29,6 +29,8 @@ class Handle(dict): want_tags = () + want_status = ("ALLOCATEDPA", "ALLOCATEDPI") + debug = False def set(self, tag, val): @@ -75,17 +77,17 @@ class aut_num(Handle): ctx.asns.writerow((self["mnt-by"], self["aut-num"])) class inetnum(Handle): - want_tags = ("inetnum", "mnt-by", "netname") + want_tags = ("inetnum", "mnt-by", "netname", "status") def finish(self, ctx): - if self.check(): + if self.check() and self["status"] in self.want_status: ctx.prefixes.writerow((self["mnt-by"], self["inetnum"])) class inet6num(Handle): - want_tags = ("inet6num", "mnt-by", "netname") + want_tags = ("inet6num", "mnt-by", "netname", "status") def finish(self, ctx): - if self.check(): + if self.check() and self["status"] in self.want_status: ctx.prefixes.writerow((self["mnt-by"], self["inet6num"])) class main(object): |