From ed6e675ccbe2a3e2c57dfb35e4c71684a25110b0 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 9 Jul 2014 05:39:54 +0000 Subject: Add withdrawal hashes to publication and rrdp. svn path=/branches/tk705/; revision=5888 --- rpki/publication.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'rpki/publication.py') diff --git a/rpki/publication.py b/rpki/publication.py index 19ab2107..7b5abaf9 100644 --- a/rpki/publication.py +++ b/rpki/publication.py @@ -49,11 +49,15 @@ class base_publication_elt(rpki.xml_utils.base_elt, publication_namespace): Base element for publication protocol. Publish and withdraw PDUs subclass this. """ - attributes = ("tag", "uri") + attributes = ("tag", "uri", "hash") + + tag = None + uri = None + hash = None payload = None def __repr__(self): - return rpki.log.log_repr(self, self.uri, self.payload) + return rpki.log.log_repr(self, self.tag, self.uri, self.hash, self.payload) def serve_dispatch(self, r_msg, snapshot, cb, eb): """ @@ -138,15 +142,6 @@ class publish_elt(base_publication_elt): f.write(self.payload.get_DER()) os.rename(filename_tmp, filename) - @classmethod - def make(cls, uri, obj, tag = None): - """ - Construct a publication PDU. - """ - - assert isinstance(obj, rpki.x509.uri_dispatch(uri)) - return cls.make_pdu(uri = uri, payload = obj, tag = tag) - class withdraw_elt(base_publication_elt): @@ -177,15 +172,6 @@ class withdraw_elt(base_publication_elt): else: dirname = os.path.dirname(dirname) - @classmethod - def make(cls, uri, obj, tag = None): - """ - Construct a withdrawal PDU. - """ - - assert isinstance(obj, rpki.x509.uri_dispatch(uri)) - return cls.make_pdu(uri = uri, tag = tag) - class report_error_elt(rpki.xml_utils.text_elt, publication_namespace): """ -- cgit v1.2.3