aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/build-freebsd-ports.py5
-rw-r--r--rpki/rpkic.py26
2 files changed, 17 insertions, 14 deletions
diff --git a/buildtools/build-freebsd-ports.py b/buildtools/build-freebsd-ports.py
index 17ee2abe..ab2f9be6 100644
--- a/buildtools/build-freebsd-ports.py
+++ b/buildtools/build-freebsd-ports.py
@@ -83,8 +83,9 @@ shutil.copytree(os.path.join(args.svndir, "buildtools", "freebsd-skeleton"), arg
if args.local_dist:
subprocess.check_call(("svn", "export", args.svndir, os.path.join(args.portsdir, tarname)))
- with open(os.path.join(args.portsdir, tarname, "VERSION"), "w") as f:
- f.write(version + "\n")
+ for fn, fmt in (("VERSION", "%s\n"), ("rpki/version.py", "VERSION = \"%s\"\n")):
+ with open(os.path.join(args.portsdir, tarname, fn), "w") as f:
+ f.write(fmt % version)
subprocess.check_call(("tar", "cJvvf", tarball, tarname), cwd = args.portsdir)
shutil.rmtree(os.path.join(args.portsdir, tarname))
elif os.path.exists(os.path.join(portsdir_old, tarball)):
diff --git a/rpki/rpkic.py b/rpki/rpkic.py
index d324948f..d5b7895a 100644
--- a/rpki/rpkic.py
+++ b/rpki/rpkic.py
@@ -622,18 +622,20 @@ class main(Cmd):
Show resources received by this entity from its parent(s).
"""
- for pdu in self.zoo.call_rpkid(
- rpki.left_right.list_received_resources_elt.make_pdu(self_handle = self.zoo.handle)):
-
- print "Parent: ", pdu.parent_handle
- print " notBefore:", pdu.notBefore
- print " notAfter: ", pdu.notAfter
- print " URI: ", pdu.uri
- print " SIA URI: ", pdu.sia_uri
- print " AIA URI: ", pdu.aia_uri
- print " ASN: ", pdu.asn
- print " IPv4: ", pdu.ipv4
- print " IPv6: ", pdu.ipv6
+ q_msg = self.zoo._compose_left_right_query()
+ SubElement(q_msg, rpki.left_right.tag_list_received_resources, self_handle = self.zoo.handle)
+
+ for r_pdu in self.zoo.call_rpkid(q_msg):
+
+ print "Parent: ", r_pdu.get("parent_handle")
+ print " notBefore:", r_pdu.get("notBefore")
+ print " notAfter: ", r_pdu.get("notAfter")
+ print " URI: ", r_pdu.get("uri")
+ print " SIA URI: ", r_pdu.get("sia_uri")
+ print " AIA URI: ", r_pdu.get("aia_uri")
+ print " ASN: ", r_pdu.get("asn")
+ print " IPv4: ", r_pdu.get("ipv4")
+ print " IPv6: ", r_pdu.get("ipv6")
@parsecmd(argsubparsers)