diff options
author | Rob Austein <sra@hactrn.net> | 2014-01-07 15:06:40 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-01-07 15:06:40 +0000 |
commit | 7dae9e6bb4f8c026257c9d27fb2018cadd250cb4 (patch) | |
tree | 0b9ff61a9d750c6093fa55ea999d7e23f8cba90c /rpkid/rpki/rpkic.py | |
parent | 26862c4593fbe4ef3d25d7646a046467eaa4cf1a (diff) |
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
Diffstat (limited to 'rpkid/rpki/rpkic.py')
-rw-r--r-- | rpkid/rpki/rpkic.py | 16 |
1 files changed, 5 insertions, 11 deletions
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): |