From 7dae9e6bb4f8c026257c9d27fb2018cadd250cb4 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 7 Jan 2014 15:06:40 +0000 Subject: Switch `rpkic show_published_objects` to use `.tracking_data()` format, same as rpkid and pubd use in their logs. Closes #663. svn path=/trunk/; revision=5618 --- rpkid/rpki/rpkic.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'rpkid/rpki/rpkic.py') diff --git a/rpkid/rpki/rpkic.py b/rpkid/rpki/rpkic.py index 02e6922d..64f9e69f 100644 --- a/rpkid/rpki/rpkic.py +++ b/rpkid/rpki/rpkic.py @@ -651,25 +651,19 @@ class main(Cmd): Show published objects. """ - # At least for now, we don't show the object itself, as this could - # be quite large and would require some pretty-printing code that - # we've not yet written. - if arg: raise BadCommandSyntax("This command takes no arguments") for pdu in self.zoo.call_rpkid( rpki.left_right.list_published_objects_elt.make_pdu(self_handle = self.zoo.handle)): + track = rpki.x509.uri_dispatch(pdu.uri)(Base64 = pdu.obj).tracking_data(pdu.uri) child = pdu.child_handle - print "URI: ", pdu.uri - if child is not None: - print " Child:", child - - # If we were trying to parse the published objects themselves, - # we'd use the filename suffix of pdu.uri to figure out what - # kind of Base64-encoded DER object is lurking in pdu.obj. + if child is None: + print track + else: + print track, child def do_load_asns(self, arg): -- cgit v1.2.3