diff options
author | Rob Austein <sra@hactrn.net> | 2012-11-09 20:16:53 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-11-09 20:16:53 +0000 |
commit | 7935cc245662541328446e98e4c315678a2254aa (patch) | |
tree | 5c82dfcf7409c228ac32c62ee20a73a9baa9e721 /rpkid/rpki/rpkid.py | |
parent | 8df7c42567e05b5446bcd3ab31b35342492b0ba4 (diff) |
Add "merge_publication_directories" option to let Iain do some testing
with better hierarchical publication. Eventually this will likely
become the default and this option can go away, but not today.
svn path=/branches/tk274/; revision=4823
Diffstat (limited to 'rpkid/rpki/rpkid.py')
-rw-r--r-- | rpkid/rpki/rpkid.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/rpkid/rpki/rpkid.py b/rpkid/rpki/rpkid.py index 314a05e3..42671f7f 100644 --- a/rpkid/rpki/rpkid.py +++ b/rpkid/rpki/rpkid.py @@ -137,11 +137,17 @@ class main(object): self.publication_kludge_base = self.cfg.get("publication-kludge-base", "publication/") + # Icky hack to let Iain do some testing quickly, should go away + # once we sort out whether we can make this change permanent. + + self.merge_publication_directories = self.cfg.getboolean("merge_publication_directories", + False) + self.use_internal_cron = self.cfg.getboolean("use-internal-cron", True) self.initial_delay = random.randint(self.cfg.getint("initial-delay-min", 10), self.cfg.getint("initial-delay-max", 120)) - + # Should be much longer in production self.cron_period = rpki.sundial.timedelta(seconds = self.cfg.getint("cron-period", 120)) self.cron_keepalive = rpki.sundial.timedelta(seconds = self.cfg.getint("cron-keepalive", 0)) @@ -509,7 +515,11 @@ class ca_obj(rpki.sql.sql_persistent): sia_uri = parent.sia_base if not sia_uri.endswith("/"): raise rpki.exceptions.BadURISyntax, "SIA URI must end with a slash: %s" % sia_uri - return sia_uri + str(self.ca_id) + "/" + # With luck this can go away sometime soon. + if self.gctx.merge_publication_directories: + return sia_uri + else: + return sia_uri + str(self.ca_id) + "/" def check_for_updates(self, parent, rc, cb, eb): """ |