Commit 5a8de7a0 authored by Andrii Salnikov's avatar Andrii Salnikov

as of Python 3 3 subparsers are now optional that lead to no action None instead of help

parent 1527914a
......@@ -461,6 +461,7 @@ class AccountingControl(ComponentControl):
accounting_actions = job_accounting_ctl.add_subparsers(title='Job Accounting Actions', dest='jobaction',
metavar='ACTION', help='DESCRIPTION')
accounting_actions.required = True
accounting_job = accounting_actions.add_parser('info', help='Show job accounting data')
accounting_job.add_argument('-o', '--output', default='all',
......@@ -482,6 +483,7 @@ class AccountingControl(ComponentControl):
accounting_actions = accounting_ctl.add_subparsers(title='Accounting Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
accounting_actions.required = True
# add legacy accounting control as a sub-parser
LegacyAccountingControl.register_parser(accounting_actions)
......
......@@ -207,6 +207,7 @@ class LegacyAccountingControl(ComponentControl):
accounting_actions = accounting_ctl.add_subparsers(title='Legacy Accounting Actions', dest='legacyaction',
metavar='ACTION', help='DESCRIPTION')
accounting_actions.required = True
# republish
accounting_republish = accounting_actions.add_parser('republish',
......
......@@ -100,6 +100,7 @@ class CacheControl(ComponentControl):
cache_actions = cache_ctl.add_subparsers(title='A-REX Cache Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
cache_actions.required = True
cache_stats = cache_actions.add_parser('stats', help='Show cache usage statistics')
......
......@@ -1065,6 +1065,7 @@ class CommunityRTEControl(ComponentControl):
crte_actions = crte_ctl.add_subparsers(title='Community RTE Actions', dest='communityaction',
metavar='ACTION', help='DESCRIPTION')
crte_actions.required = True
cadd = crte_actions.add_parser('add', help='Add new trusted community to ARC CE')
cadd.add_argument('-f', '--fingerprint', help='Fingerprint of the community key', action='store')
......
......@@ -137,6 +137,7 @@ class ConfigControl(ComponentControl):
config_actions = config_ctl.add_subparsers(title='Config Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
config_actions.required = True
config_dump = config_actions.add_parser('dump', help='Dump ARC CE running configuration')
......
......@@ -476,6 +476,8 @@ class JobsControl(ComponentControl):
jobs_actions = jobs_ctl.add_subparsers(title='Jobs Control Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
jobs_actions.required = True
jobs_list = jobs_actions.add_parser('list', help='List available A-REX jobs')
jobs_list.add_argument('-l', '--long', help='Detailed listing of jobs', action='store_true')
jobs_list.add_argument('-s', '--state', help='Filter jobs by state', action='append', choices=__JOB_STATES)
......
......@@ -616,6 +616,7 @@ class RTEControl(ComponentControl):
rte_actions = rte_ctl.add_subparsers(title='RunTime Environments Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
rte_actions.required = True
rte_enable = rte_actions.add_parser('enable', help='Enable RTE to be used by A-REX')
rte_enable.add_argument('rte', nargs='+', help='RTE name').completer = complete_rte_name
......
......@@ -247,6 +247,7 @@ class ServicesControl(ComponentControl):
services_actions = services_ctl.add_subparsers(title='Services Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
services_actions.required = True
services_enable = services_actions.add_parser('enable', help='Enable ARC CE services')
services_enable.add_argument('--now', help='Start the services just after enable', action='store_true')
......
......@@ -298,6 +298,7 @@ class TestCAControl(ComponentControl):
testca_actions = testca_ctl.add_subparsers(title='Test CA Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
testca_actions.required = True
testca_init = testca_actions.add_parser('init', help='Generate self-signed TestCA files')
add_parser_digest_validity(testca_init)
......
......@@ -501,6 +501,7 @@ deb http://dist.eugridpma.info/distribution/igtf/current igtf accredited
deploy_actions = deploy_ctl.add_subparsers(title='Deployment Actions', dest='action',
metavar='ACTION', help='DESCRIPTION')
deploy_actions.required = True
igtf_ca = deploy_actions.add_parser('igtf-ca', help='Deploy IGTF CA certificates')
igtf_ca.add_argument('bundle', help='IGTF CA bundle name', nargs='+',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment