@@ -55,19 +55,22 @@ def connection_error():
5555
5656KV_PARSERS = [
5757 ('backup' , 'Backup to stdout or a JSON file' , [
58- [['key' ], {'help' : 'The key to use as target to backup a specific key or folder.' ,
59- 'nargs' :'?' }],
58+ [['key' ], {'help' : 'The key to use as target to backup a '
59+ 'specific key or folder.' ,
60+ 'nargs' : '?' }],
6061 [['-b' , '--base64' ], {'help' : 'Base64 encode values' ,
6162 'action' : 'store_true' }],
6263 [['-f' , '--file' ], {'help' : 'JSON file to write instead of stdout' ,
6364 'nargs' : '?' }],
6465 [['-p' , '--pretty' ], {'help' : 'pretty-print JSON output' ,
6566 'action' : 'store_true' }]]),
6667 ('restore' , 'Restore from stdin or a JSON file' , [
67- [['key' ], {'help' : 'The key as target to restore to a specific key or folder.' ,
68- 'nargs' :'?' }],
69- [['-p' , '--prune' ], {'help' :'Remove entries from consul tree that are not in restore file.' ,
70- 'action' : 'store_true' }],
68+ [['key' ], {'help' : 'The key as target to restore to a specific key '
69+ 'or folder.' ,
70+ 'nargs' : '?' }],
71+ [['-p' , '--prune' ], {'help' : 'Remove entries from consul tree that '
72+ 'are not in restore file.' ,
73+ 'action' : 'store_true' }],
7174 [['-b' , '--base64' ], {'help' : 'Restore from Base64 encode values' ,
7275 'action' : 'store_true' }],
7376 [['-f' , '--file' ],
@@ -77,8 +80,9 @@ def connection_error():
7780 {'help' : 'Do not replace existing entries' ,
7881 'action' : 'store_true' }]]),
7982 ('ls' , 'List all of the keys' , [
80- [['key' ], {'help' : 'The key to use as target to list contents of specific key or folder' ,
81- 'nargs' :'?' }],
83+ [['key' ], {'help' : 'The key to use as target to list contents of '
84+ 'specific key or folder' ,
85+ 'nargs' : '?' }],
8286 [['-l' , '--long' ],
8387 {'help' : 'Long format' ,
8488 'action' : 'store_true' }]]),
@@ -165,11 +169,11 @@ def add_register_args(parser):
165169 check .add_argument ('path' , default = None ,
166170 help = 'Path to the script invoked by Consul' )
167171 httpcheck = rsparsers .add_parser ('httpcheck' ,
168- help = 'Define an HTTP-based check' )
172+ help = 'Define an HTTP-based check' )
169173 httpcheck .add_argument ('interval' , default = 10 , type = int ,
170- help = 'How often to run the check script' )
174+ help = 'How often to run the check script' )
171175 httpcheck .add_argument ('url' , default = None ,
172- help = 'HTTP URL to be polled by Consul' )
176+ help = 'HTTP URL to be polled by Consul' )
173177 rsparsers .add_parser ('no-check' , help = 'Do not enable service monitoring' )
174178 ttl = rsparsers .add_parser ('ttl' , help = 'Define a duration based TTL check' )
175179 ttl .add_argument ('duration' , type = int , default = 10 ,
@@ -436,7 +440,6 @@ def kv_restore(consul, args):
436440 consul .kv .delete (key )
437441 except exceptions .ConnectionError :
438442 connection_error ()
439-
440443
441444
442445def kv_rm (consul , args ):
0 commit comments