Skip to content
Snippets Groups Projects
Commit 6584c0eb authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Better documentation and error handling for CLI

parent 0bf6f5ac
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -12,15 +12,15 @@ import osc.cmdln ...@@ -12,15 +12,15 @@ import osc.cmdln
@osc.cmdln.option('--cuda-mpi', action="store_true", @osc.cmdln.option('--cuda-mpi', action="store_true",
help="Enable for all CUDA+MPI repositories") help="Flag to enable for all CUDA+MPI repositories")
@osc.cmdln.option('--cuda', action="store_true", @osc.cmdln.option('--cuda', action="store_true",
help="Enable for all CUDA repositories") help="Flag to enable for all CUDA repositories")
@osc.cmdln.option('--mpi', action="store_true", @osc.cmdln.option('--mpi', action="store_true",
help="Enable for all MPI module repositories") help="Flag to enable for all MPI module repositories")
@osc.cmdln.option('--compilers', action="store_true", @osc.cmdln.option('--compilers', action="store_true",
help="Enable for all compiler module repositories") help="Flag to enable for all compiler module repositories")
@osc.cmdln.option('--system', action="store_true", @osc.cmdln.option('--system', action="store_true",
help="Enable for System repository") help="Flag to enable for System repository")
@osc.cmdln.option('--reset', action="store_true", @osc.cmdln.option('--reset', action="store_true",
help="Re-create the set of enabled repositories from the MPCDF:enable_repositores attribute") help="Re-create the set of enabled repositories from the MPCDF:enable_repositores attribute")
@osc.cmdln.option('--set', action="store_true", @osc.cmdln.option('--set', action="store_true",
...@@ -99,6 +99,8 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args): ...@@ -99,6 +99,8 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args):
if opts.reset or opts.set: if opts.reset or opts.set:
mpcdf_common.mpcdf_enable_repositories(api_url, project, package, verbose=True) mpcdf_common.mpcdf_enable_repositories(api_url, project, package, verbose=True)
elif (opts.compilers or opts.mpi or opts.cuda or opts.cuda_mpi):
print("ERROR: Invalid arguments, try --help")
else: else:
try: try:
repos = mpcdf_common.get_attribute_values(api_url, project, package, "MPCDF:enable_repositories") repos = mpcdf_common.get_attribute_values(api_url, project, package, "MPCDF:enable_repositories")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment