From 1c623d4568c3b54499b559035a28cfc5eb9c3d6d Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Fri, 25 Feb 2011 19:02:02 +0000 Subject: portal-gui no longer invokes the myrpki.py command line tool. It now updates the IRDB directly, and notifies rpkid to immediately perform an update, rather than waiting for the next cron job to cycle. added a 'valid_until' field to the Child model, to store the end of the RPKI resource certificate validity period. change load_csv.py and list_resources.py to use the code for locating rpki.conf in rpki.config rather than duplicating it locally. fixed bug in AddressRange model in function as_resource_range() where IPv4 addresses were returned as IPv6. svn path=/portal-gui/templates/myrpki/child_view.html; revision=3694 --- rpkid/rpki/gui/app/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rpkid/rpki/gui/app/models.py') diff --git a/rpkid/rpki/gui/app/models.py b/rpkid/rpki/gui/app/models.py index 78327b8f..3b161a59 100644 --- a/rpkid/rpki/gui/app/models.py +++ b/rpkid/rpki/gui/app/models.py @@ -90,7 +90,6 @@ class AddressRange(models.Model): try: self.as_resource_range().prefixlen() except rpki.exceptions.MustBePrefix, err: - print err return False return True @@ -106,7 +105,7 @@ class RoaRequest(models.Model): def as_roa_prefix(self): '''Convert to a rpki.resouce_set.roa_prefix subclass.''' r = self.prefix.as_resource_range() - if isinstance(r, rpki.resource_set.resource_set_ipv4): + if isinstance(r, rpki.resource_set.resource_range_ipv4): return rpki.resource_set.roa_prefix_ipv4(r.min, r.prefixlen(), self.max_length) else: @@ -152,6 +151,7 @@ class Asn(models.Model): class Child(models.Model): conf = models.ForeignKey(Conf, related_name='children') handle = HandleField() # parent's name for child + valid_until = models.DateTimeField() def __unicode__(self): return u"%s's child %s" % (self.conf, self.handle) -- cgit v1.2.3