aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui/app/models.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2011-02-25 19:02:02 +0000
committerMichael Elkins <melkins@tislabs.com>2011-02-25 19:02:02 +0000
commit1c623d4568c3b54499b559035a28cfc5eb9c3d6d (patch)
tree109b93e3da7d906f8f4ef88f137ff76feebded1b /rpkid/rpki/gui/app/models.py
parentace4e7a45aa19d0193bded4f76b6ab406d30665d (diff)
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
Diffstat (limited to 'rpkid/rpki/gui/app/models.py')
-rw-r--r--rpkid/rpki/gui/app/models.py4
1 files changed, 2 insertions, 2 deletions
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)