diff options
-rw-r--r-- | rpkid/rpki/irdb/zookeeper.py | 12 | ||||
-rw-r--r-- | rpkid/rpki/rpkic.py | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/rpkid/rpki/irdb/zookeeper.py b/rpkid/rpki/irdb/zookeeper.py index d172e18e..b8ed1245 100644 --- a/rpkid/rpki/irdb/zookeeper.py +++ b/rpkid/rpki/irdb/zookeeper.py @@ -594,6 +594,18 @@ class Zookeeper(object): @django.db.transaction.commit_on_success + def delete_rootd(self): + """ + Delete rootd associated with this RPKI entity. + """ + + try: + self.resource_ca.rootd.delete() + except rpki.irdb.Rootd.DoesNotExist: + self.log("No associated rootd") + + + @django.db.transaction.commit_on_success def configure_publication_client(self, filename, sia_base = None): """ Configure publication server to know about a new client, given the diff --git a/rpkid/rpki/rpkic.py b/rpkid/rpki/rpkic.py index a94954a2..1ec1014a 100644 --- a/rpkid/rpki/rpkic.py +++ b/rpkid/rpki/rpkic.py @@ -299,6 +299,18 @@ class main(rpki.cli.Cmd): return self.irdb_handle_complete(rpki.irdb.Parent, *args) + def do_delete_rootd(self, arg): + """ + Delete rootd associated with this RPKI entity. + """ + + try: + self.zoo.delete_rootd() + self.zoo.synchronize() + except rpki.irdb.Rootd.DoesNotExist: + print "No associated rootd" + + def do_configure_publication_client(self, arg): """ Configure publication server to know about a new client, given the |