diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-04-03 22:29:34 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-04-03 22:29:34 +0000 |
commit | 8eb584c27a20975ad1f66c92b7cd8ce52e129b06 (patch) | |
tree | 0de857772a603f33e8464c632dab824dda6fc555 /rpkid/rpki/gui/routeview/util.py | |
parent | 07fa0b0c9dcb9c2b1b2e1ad982bf3005e2195e8e (diff) |
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
Diffstat (limited to 'rpkid/rpki/gui/routeview/util.py')
-rw-r--r-- | rpkid/rpki/gui/routeview/util.py | 6 |
1 files changed, 4 insertions, 2 deletions
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' |