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/scripts/load_csv.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'rpkid/rpki/gui/scripts/load_csv.py') diff --git a/rpkid/rpki/gui/scripts/load_csv.py b/rpkid/rpki/gui/scripts/load_csv.py index 0ef49cce..ebb995b6 100755 --- a/rpkid/rpki/gui/scripts/load_csv.py +++ b/rpkid/rpki/gui/scripts/load_csv.py @@ -1,6 +1,6 @@ # $Id$ # -# Copyright (C) 2010 SPARTA, Inc. dba Cobham Analytic Solutions +# Copyright (C) 2010, 2011 SPARTA, Inc. dba Cobham Analytic Solutions # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -23,22 +23,18 @@ # for the handle you are loading data # -import sys, os +import os os.environ['DJANGO_SETTINGS_MODULE'] = 'rpki.gui.settings' import csv import socket # for socket.error -import rpki -import rpki.resource_set -import rpki.ipaddrs +import rpki.resource_set, rpki.ipaddrs from rpki.myrpki import csv_reader - from rpki.gui.app import models from rpki.gui.app.views import add_roa_requests -cfg_file = os.getenv("RPKI_CONF", "rpki.conf") -cfg = rpki.config.parser(cfg_file, "myrpki") +cfg = rpki.config.parser(section='myrpki') handle = cfg.get('handle') asn_csv = cfg.get('asn_csv') prefix_csv = cfg.get('prefix_csv') -- cgit v1.2.3