aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/irdb/zookeeper.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-06-16 22:13:17 +0000
committerRob Austein <sra@hactrn.net>2012-06-16 22:13:17 +0000
commita590075c9225dce5695571ec27204aab3c2bb671 (patch)
tree48e600caeafcd2d7a0e81823fda0e205e8c2b045 /rpkid/rpki/irdb/zookeeper.py
parent6f020d4066f9f2cbe31d47573468052923b5ab7f (diff)
Add "--flat_publication" option to yamltest, and corresponding
"--flat" option to rpkic configure_publication_client. These are for testing and simulation, do not use them in production. svn path=/trunk/; revision=4545
Diffstat (limited to 'rpkid/rpki/irdb/zookeeper.py')
-rw-r--r--rpkid/rpki/irdb/zookeeper.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/rpkid/rpki/irdb/zookeeper.py b/rpkid/rpki/irdb/zookeeper.py
index 83fd8665..7dedeb7e 100644
--- a/rpkid/rpki/irdb/zookeeper.py
+++ b/rpkid/rpki/irdb/zookeeper.py
@@ -606,7 +606,7 @@ class Zookeeper(object):
@django.db.transaction.commit_on_success
- def configure_publication_client(self, filename, sia_base = None):
+ def configure_publication_client(self, filename, sia_base = None, flat = False):
"""
Configure publication server to know about a new client, given the
client's request-for-service message as input. Reads the client's
@@ -619,6 +619,10 @@ class Zookeeper(object):
client_ta = rpki.x509.X509(Base64 = client.findtext("bpki_client_ta"))
+ if sia_base is None and flat:
+ self.log("Flat publication structure forced, homing client at top-level")
+ sia_base = "rsync://%s/%s/%s/" % (self.rsync_server, self.rsync_module, client.get("handle"))
+
if sia_base is None and client.get("handle") == self.handle and self.resource_ca.certificate == client_ta:
self.log("This looks like self-hosted publication")
sia_base = "rsync://%s/%s/%s/" % (self.rsync_server, self.rsync_module, self.handle)