aboutsummaryrefslogtreecommitdiff
path: root/rpki/irdb/zookeeper.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-11-10 13:09:07 +0000
committerRob Austein <sra@hactrn.net>2015-11-10 13:09:07 +0000
commitac415cdd0f88f8479975627772dd0a84797b261a (patch)
tree4c943706862165f42d4164138504446c3e132ea0 /rpki/irdb/zookeeper.py
parent947f220a4884a44b62afd18892b14433e440a139 (diff)
Use a lock to serialize rpkid tasks. Add temporary trace call
sequence trace code to rpki.rpkidb.models to assist in simplifying some of the gratuitously complicated method call chains. Various trivial PyLint cleanups. svn path=/branches/tk705/; revision=6161
Diffstat (limited to 'rpki/irdb/zookeeper.py')
-rw-r--r--rpki/irdb/zookeeper.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/rpki/irdb/zookeeper.py b/rpki/irdb/zookeeper.py
index a65f1f5f..514ff683 100644
--- a/rpki/irdb/zookeeper.py
+++ b/rpki/irdb/zookeeper.py
@@ -599,10 +599,10 @@ class Zookeeper(object):
self.log("Child calls itself %r, we call it %r" % (x.get("child_handle"), child_handle))
child, created = rpki.irdb.models.Child.objects.get_or_certify(
- issuer = self.resource_ca,
- handle = child_handle,
- ta = rpki.x509.X509(Base64 = x.findtext(tag_oob_child_bpki_ta)),
- valid_until = valid_until)
+ issuer = self.resource_ca,
+ handle = child_handle,
+ ta = rpki.x509.X509(Base64 = x.findtext(tag_oob_child_bpki_ta)),
+ valid_until = valid_until)
return self.generate_parental_response(child), child_handle
@@ -1210,7 +1210,7 @@ class Zookeeper(object):
q_msg = self._compose_publication_control_query()
for client in self.server_ca.clients.all():
SubElement(q_msg, rpki.publication_control.tag_client, action = "set",
- client_handle = client.handle, clear_reply_protection = "yes")
+ client_handle = client.handle, clear_replay_protection = "yes")
self.call_pubd(q_msg)
@@ -1654,10 +1654,10 @@ class Zookeeper(object):
q_msg = self._compose_left_right_query()
SubElement(q_msg, rpki.left_right.tag_tenant, action = "list")
- self.call_rpkid(q_msg)
+ r_msg = self.call_rpkid(q_msg)
- tenant_handles = set(s.get("tenant_handle") for s in q_msg)
- ca_handles = set(ca.handle for ca in rpki.irdb.models.ResourceHolderCA.objects.all())
+ tenant_handles = set(s.get("tenant_handle") for s in r_msg)
+ ca_handles = set(ca.handle for ca in rpki.irdb.models.ResourceHolderCA.objects.all())
assert ca_handles <= tenant_handles
q_msg = self._compose_left_right_query()