Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
obs
osc-plugins
Commits
6584c0eb
There was a problem fetching the pipeline summary.
Commit
6584c0eb
authored
7 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
Better documentation and error handling for CLI
parent
0bf6f5ac
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mpcdf_enable_repositories.py
+7
-5
7 additions, 5 deletions
mpcdf_enable_repositories.py
with
7 additions
and
5 deletions
mpcdf_enable_repositories.py
+
7
−
5
View file @
6584c0eb
...
@@ -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
=
"
E
nable for all CUDA+MPI repositories
"
)
help
=
"
Flag to e
nable for all CUDA+MPI repositories
"
)
@osc.cmdln.option
(
'
--cuda
'
,
action
=
"
store_true
"
,
@osc.cmdln.option
(
'
--cuda
'
,
action
=
"
store_true
"
,
help
=
"
E
nable for all CUDA repositories
"
)
help
=
"
Flag to e
nable for all CUDA repositories
"
)
@osc.cmdln.option
(
'
--mpi
'
,
action
=
"
store_true
"
,
@osc.cmdln.option
(
'
--mpi
'
,
action
=
"
store_true
"
,
help
=
"
E
nable for all MPI module repositories
"
)
help
=
"
Flag to e
nable for all MPI module repositories
"
)
@osc.cmdln.option
(
'
--compilers
'
,
action
=
"
store_true
"
,
@osc.cmdln.option
(
'
--compilers
'
,
action
=
"
store_true
"
,
help
=
"
E
nable for all compiler module repositories
"
)
help
=
"
Flag to e
nable for all compiler module repositories
"
)
@osc.cmdln.option
(
'
--system
'
,
action
=
"
store_true
"
,
@osc.cmdln.option
(
'
--system
'
,
action
=
"
store_true
"
,
help
=
"
E
nable for System repository
"
)
help
=
"
Flag to e
nable 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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment