diff options
author | Rob Austein <sra@hactrn.net> | 2014-07-09 05:39:54 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-07-09 05:39:54 +0000 |
commit | ed6e675ccbe2a3e2c57dfb35e4c71684a25110b0 (patch) | |
tree | d790587c217adec5327ec42a2e4774e3587de3d7 /rpki/publication.py | |
parent | 13a65b463cd0acedd3bc36c9437d5ee8b2e26b60 (diff) |
Add withdrawal hashes to publication and rrdp.
svn path=/branches/tk705/; revision=5888
Diffstat (limited to 'rpki/publication.py')
-rw-r--r-- | rpki/publication.py | 26 |
1 files changed, 6 insertions, 20 deletions
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): """ |