From 8eb584c27a20975ad1f66c92b7cd8ce52e129b06 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Wed, 3 Apr 2013 22:29:34 +0000 Subject: allow rpkigui-import-routes to be invoked with zero arguments, in which it will download the routeview.org data from the default URL see #502 svn path=/trunk/; revision=5267 --- rpkid/rpki/gui/routeview/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rpkid/rpki/gui/routeview/util.py') diff --git a/rpkid/rpki/gui/routeview/util.py b/rpkid/rpki/gui/routeview/util.py index 589a7714..44168be2 100644 --- a/rpkid/rpki/gui/routeview/util.py +++ b/rpkid/rpki/gui/routeview/util.py @@ -33,6 +33,8 @@ import rpki.gui.app.timestamp # globals logger = logging.getLogger(__name__) +# Eventually this can be retrived from rpki.conf +DEFAULT_URL = 'http://archive.routeviews.org/oix-route-views/oix-full-snapshot-latest.dat.bz2' def parse_text(f): last_prefix = None @@ -161,13 +163,13 @@ class PipeFailed(ProgException): pass -def import_routeviews_dump(filename, filetype='auto'): +def import_routeviews_dump(filename=DEFAULT_URL, filetype='auto'): """Load the oix-full-snapshot-latest.bz2 from routeview.org into the rpki.gui.routeview database. Arguments: - filename [required]: the full path to the downloaded file to parse + filename [optional]: the full path to the downloaded file to parse filetype [optional]: 'text' or 'mrt' -- cgit v1.2.3