diff options
-rw-r--r-- | docs/left-right-protocol | 2 | ||||
-rw-r--r-- | docs/publication-protocol | 2 | ||||
-rw-r--r-- | rpkid/INSTALLATION | 2 | ||||
-rw-r--r-- | rpkid/Makefile | 2 | ||||
-rw-r--r-- | rpkid/OPERATION | 65 | ||||
-rwxr-xr-x | rpkid/irbe-cli.py | 19 | ||||
-rw-r--r-- | rpkid/irbe-cli.usage | 57 |
7 files changed, 87 insertions, 62 deletions
diff --git a/docs/left-right-protocol b/docs/left-right-protocol index eca2a249..d0b00436 100644 --- a/docs/left-right-protocol +++ b/docs/left-right-protocol @@ -473,5 +473,5 @@ Error handling __________________________________________________________________ - Generated on Wed Jun 11 22:30:25 2008 for RPKI Engine by doxygen + Generated on Thu Jun 12 02:11:59 2008 for RPKI Engine by doxygen 1.5.5 diff --git a/docs/publication-protocol b/docs/publication-protocol index 53a0e399..76df7778 100644 --- a/docs/publication-protocol +++ b/docs/publication-protocol @@ -223,5 +223,5 @@ Additional access control considerations. __________________________________________________________________ - Generated on Wed Jun 11 22:30:25 2008 for RPKI Engine by doxygen + Generated on Thu Jun 12 02:11:59 2008 for RPKI Engine by doxygen 1.5.5 diff --git a/rpkid/INSTALLATION b/rpkid/INSTALLATION index ad121ec2..b64e82e9 100644 --- a/rpkid/INSTALLATION +++ b/rpkid/INSTALLATION @@ -68,5 +68,5 @@ Installation __________________________________________________________________ - Generated on Thu Jun 12 00:09:16 2008 for RPKI Engine by doxygen + Generated on Thu Jun 12 02:11:59 2008 for RPKI Engine by doxygen 1.5.5 diff --git a/rpkid/Makefile b/rpkid/Makefile index 72aeeb29..f9e2dd17 100644 --- a/rpkid/Makefile +++ b/rpkid/Makefile @@ -76,7 +76,7 @@ resource-cert-samples/.stamp: generate-testrepo.py Makefile HTML2TEXT = xsltproc --html tweak-doc.xsl $? | lynx -dump -nolist -force_html /dev/stdin >$@ irbe-cli.usage: irbe-cli.py - python irbe-cli.py --help >$@ + python irbe-cli.py --help | sed 's/^/ /' >$@ dox doxygen: irbe-cli.usage cd rpki && TZ='' doxygen diff --git a/rpkid/OPERATION b/rpkid/OPERATION index 2ab98fe8..f1bdb5b8 100644 --- a/rpkid/OPERATION +++ b/rpkid/OPERATION @@ -338,35 +338,40 @@ irbe-cli.py the business PKI in order to issue signing certs corresponding to newly generated business keys. -Command line IR back-end control program for rpkid and pubd. - -Usage: - -# Top-level options: - --config= --help --pem_out= --verbose - -# left-right protocol: - parent --action= --tag= --self_id= --parent_id= --bsc_id= --repository_id= --p -eer_contact_uri= --sia_base= --sender_name= --recipient_name= --bpki_cms_cert= - --bpki_cms_glue= --bpki_https_cert= --bpki_https_glue= --rekey --reissue --revoke - repository --action= --tag= --self_id= --repository_id= --bsc_id= --peer_conta -ct_uri= --bpki_cms_cert= --bpki_cms_glue= --bpki_https_cert= --bpki_https_glue= - self --action= --tag= --self_id= --crl_interval= --regen_margin= --bpki_cert= ---bpki_glue= --rekey --reissue --revoke --run_now --publish_world_now - child --action= --tag= --self_id= --child_id= --bsc_id= --bpki_cert= --bpki_gl -ue= --reissue - route_origin --action= --tag= --self_id= --route_origin_id= --as_number= --ipv -4= --ipv6= --suppress_publication - bsc --action= --tag= --self_id= --bsc_id= --key_type= --hash_alg= --key_length -= --signing_cert= --signing_cert_crl= --generate_keypair - -# publication protocol: - certificate --action= --tag= --client_id= --uri= - roa --action= --tag= --client_id= --uri= - manifest --action= --tag= --client_id= --uri= - client --action= --tag= --client_id= --base_uri= --bpki_cert= --bpki_glue= - config --action= --tag= --bpki_crl= - crl --action= --tag= --client_id= --uri= + Command line IR back-end control program for rpkid and pubd. + + Usage: + + # Top-level options: + --config= --help --pem_out= --verbose + + # left-right protocol: + parent --action= --tag= --self_id= --parent_id= --bsc_id= + --repository_id= --peer_contact_uri= --sia_base= --sender_name= + --recipient_name= --bpki_cms_cert= --bpki_cms_glue= + --bpki_https_cert= --bpki_https_glue= --rekey --reissue --revoke + repository --action= --tag= --self_id= --repository_id= --bsc_id= + --peer_contact_uri= --bpki_cms_cert= --bpki_cms_glue= + --bpki_https_cert= --bpki_https_glue= + self --action= --tag= --self_id= --crl_interval= --regen_margin= + --bpki_cert= --bpki_glue= --rekey --reissue --revoke --run_now + --publish_world_now + child --action= --tag= --self_id= --child_id= --bsc_id= --bpki_cert= + --bpki_glue= --reissue + route_origin --action= --tag= --self_id= --route_origin_id= + --as_number= --ipv4= --ipv6= --suppress_publication + bsc --action= --tag= --self_id= --bsc_id= --key_type= --hash_alg= + --key_length= --signing_cert= --signing_cert_crl= + --generate_keypair + + # publication protocol: + certificate --action= --tag= --client_id= --uri= + roa --action= --tag= --client_id= --uri= + manifest --action= --tag= --client_id= --uri= + client --action= --tag= --client_id= --base_uri= --bpki_cert= + --bpki_glue= + config --action= --tag= --bpki_crl= + crl --action= --tag= --client_id= --uri= Global options (--config, --help, --pem_out) come first, then zero or more commands (parent, repository, self, child, route_origin, bsc), @@ -683,5 +688,5 @@ testpoke.py __________________________________________________________________ - Generated on Thu Jun 12 00:09:16 2008 for RPKI Engine by doxygen + Generated on Thu Jun 12 02:11:59 2008 for RPKI Engine by doxygen 1.5.5 diff --git a/rpkid/irbe-cli.py b/rpkid/irbe-cli.py index 26fb957b..61677e79 100755 --- a/rpkid/irbe-cli.py +++ b/rpkid/irbe-cli.py @@ -18,11 +18,20 @@ Command line IR back-end control program for rpkid and pubd. """ -import getopt, sys +import getopt, sys, textwrap import rpki.left_right, rpki.https, rpki.x509, rpki.config, rpki.log, rpki.publication pem_out = None +class UsageWrapper(textwrap.TextWrapper): + """Call interface around Python textwrap.Textwrapper class.""" + + def __call__(self, *args): + """Format arguments, with TextWrapper indentation.""" + return self.fill(textwrap.dedent(" ".join(args))) + +usage_fill = UsageWrapper(subsequent_indent = " " * 4) + class cmd_elt_mixin(object): """Protocol mix-in for command line client element PDUs.""" @@ -98,7 +107,7 @@ class cmd_msg_mixin(object): def usage(cls): """Generate usage message for this PDU.""" for k,v in cls.pdus.items(): - print " ", k, v.usage() + print usage_fill(k, v.usage()) # left-right protcol @@ -194,13 +203,13 @@ class publication_cms_msg(rpki.publication.cms_msg): top_opts = ["config=", "help", "pem_out=", "verbose"] - def usage(code = 1): - print __doc__ + print __doc__.strip() + print print "Usage:" print print "# Top-level options:" - print " ", " ".join("--" + x for x in top_opts) + print usage_fill(*["--" + x for x in top_opts]) print print "# left-right protocol:" left_right_msg.usage() diff --git a/rpkid/irbe-cli.usage b/rpkid/irbe-cli.usage index d40f4ecc..6b1d498f 100644 --- a/rpkid/irbe-cli.usage +++ b/rpkid/irbe-cli.usage @@ -1,23 +1,34 @@ - -Command line IR back-end control program for rpkid and pubd. - -Usage: - -# Top-level options: - --config= --help --pem_out= --verbose - -# left-right protocol: - parent --action= --tag= --self_id= --parent_id= --bsc_id= --repository_id= --peer_contact_uri= --sia_base= --sender_name= --recipient_name= --bpki_cms_cert= --bpki_cms_glue= --bpki_https_cert= --bpki_https_glue= --rekey --reissue --revoke - repository --action= --tag= --self_id= --repository_id= --bsc_id= --peer_contact_uri= --bpki_cms_cert= --bpki_cms_glue= --bpki_https_cert= --bpki_https_glue= - self --action= --tag= --self_id= --crl_interval= --regen_margin= --bpki_cert= --bpki_glue= --rekey --reissue --revoke --run_now --publish_world_now - child --action= --tag= --self_id= --child_id= --bsc_id= --bpki_cert= --bpki_glue= --reissue - route_origin --action= --tag= --self_id= --route_origin_id= --as_number= --ipv4= --ipv6= --suppress_publication - bsc --action= --tag= --self_id= --bsc_id= --key_type= --hash_alg= --key_length= --signing_cert= --signing_cert_crl= --generate_keypair - -# publication protocol: - certificate --action= --tag= --client_id= --uri= - roa --action= --tag= --client_id= --uri= - manifest --action= --tag= --client_id= --uri= - client --action= --tag= --client_id= --base_uri= --bpki_cert= --bpki_glue= - config --action= --tag= --bpki_crl= - crl --action= --tag= --client_id= --uri= + Command line IR back-end control program for rpkid and pubd. + + Usage: + + # Top-level options: + --config= --help --pem_out= --verbose + + # left-right protocol: + parent --action= --tag= --self_id= --parent_id= --bsc_id= + --repository_id= --peer_contact_uri= --sia_base= --sender_name= + --recipient_name= --bpki_cms_cert= --bpki_cms_glue= + --bpki_https_cert= --bpki_https_glue= --rekey --reissue --revoke + repository --action= --tag= --self_id= --repository_id= --bsc_id= + --peer_contact_uri= --bpki_cms_cert= --bpki_cms_glue= + --bpki_https_cert= --bpki_https_glue= + self --action= --tag= --self_id= --crl_interval= --regen_margin= + --bpki_cert= --bpki_glue= --rekey --reissue --revoke --run_now + --publish_world_now + child --action= --tag= --self_id= --child_id= --bsc_id= --bpki_cert= + --bpki_glue= --reissue + route_origin --action= --tag= --self_id= --route_origin_id= + --as_number= --ipv4= --ipv6= --suppress_publication + bsc --action= --tag= --self_id= --bsc_id= --key_type= --hash_alg= + --key_length= --signing_cert= --signing_cert_crl= + --generate_keypair + + # publication protocol: + certificate --action= --tag= --client_id= --uri= + roa --action= --tag= --client_id= --uri= + manifest --action= --tag= --client_id= --uri= + client --action= --tag= --client_id= --base_uri= --bpki_cert= + --bpki_glue= + config --action= --tag= --bpki_crl= + crl --action= --tag= --client_id= --uri= |