aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/rpkic.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-02-16 03:28:40 +0000
committerRob Austein <sra@hactrn.net>2012-02-16 03:28:40 +0000
commit9154d42a748475bd75941249917b56470dbf99b2 (patch)
tree1f0b37477723ec532519e56af4b85cc8fac71d8f /rpkid/rpki/rpkic.py
parent3bb90a90b62e9aff25080eef861b84af38f42095 (diff)
Fix delete_self operation. Closes #196.
svn path=/branches/tk161/; revision=4341
Diffstat (limited to 'rpkid/rpki/rpkic.py')
-rw-r--r--rpkid/rpki/rpkic.py45
1 files changed, 31 insertions, 14 deletions
diff --git a/rpkid/rpki/rpkic.py b/rpkid/rpki/rpkic.py
index 98c494fe..4a07bc77 100644
--- a/rpkid/rpki/rpkic.py
+++ b/rpkid/rpki/rpkic.py
@@ -17,7 +17,7 @@ integration with the Django-based GUI interface.
$Id$
-Copyright (C) 2009--2011 Internet Systems Consortium ("ISC")
+Copyright (C) 2009--2012 Internet Systems Consortium ("ISC")
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -39,17 +39,28 @@ PERFORMANCE OF THIS SOFTWARE.
# modules, or anything that imports Django modules. Bottom line is
# that we don't import such modules until we need them.
-
-# We need context managers for transactions. Well, unless we're
-# willing to have this program depend on a Django settings.py file so
-# that we can use decorators, which I'm not, at the moment.
-
-from __future__ import with_statement
-
-import csv, re, os, getopt, sys, base64, time, glob, copy, warnings
-import rpki.config, rpki.cli, rpki.sundial, rpki.log, rpki.oids
-import rpki.http, rpki.resource_set, rpki.relaxng, rpki.exceptions
-import rpki.left_right, rpki.x509, rpki.async
+import csv
+import re
+import os
+import getopt
+import sys
+import base64
+import time
+import glob
+import copy
+import warnings
+import rpki.config
+import rpki.cli
+import rpki.sundial
+import rpki.log
+import rpki.oids
+import rpki.http
+import rpki.resource_set
+import rpki.relaxng
+import rpki.exceptions
+import rpki.left_right
+import rpki.x509
+import rpki.async
class BadCommandSyntax(Exception): "Bad command line syntax."
class BadPrefixSyntax(Exception): "Bad prefix syntax."
@@ -336,6 +347,14 @@ class main(rpki.cli.Cmd):
return self.irdb_handle_complete(rpki.irdb.Repository, *args)
+ def do_delete_self(self, arg):
+ """
+ Delete the current RPKI entity (<self/> object).
+ """
+
+ self.zoo.delete_self()
+
+
def do_renew_child(self, arg):
"""
Update validity period for one child entity.
@@ -434,8 +453,6 @@ class main(rpki.cli.Cmd):
self.zoo.load_roa_requests(argv[0])
-
-
def do_synchronize(self, arg):
"""
Whack daemons to match IRDB.