Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
d2b92ffc
Commit
d2b92ffc
authored
Jul 28, 2008
by
Michael Hanselmann
Browse files
Implement “gnt-job cancel”
Reviewed-by: ultrotter
parent
188c5e0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/gnt-job
View file @
d2b92ffc
...
...
@@ -102,6 +102,15 @@ def ArchiveJobs(opts, args):
return
0
def
CancelJobs
(
opts
,
args
):
client
=
GetClient
()
for
job_id
in
args
:
client
.
CancelJob
(
job_id
)
return
0
commands
=
{
'list'
:
(
ListJobs
,
ARGS_NONE
,
[
DEBUG_OPT
,
NOHDR_OPT
,
SEP_OPT
,
USEUNITS_OPT
,
FIELDS_OPT
],
...
...
@@ -114,6 +123,10 @@ commands = {
[
DEBUG_OPT
],
"<job-id> [<job-id> ...]"
,
"Archive specified jobs"
),
'cancel'
:
(
CancelJobs
,
ARGS_ANY
,
[
DEBUG_OPT
],
"<job-id> [<job-id> ...]"
,
"Cancel specified jobs"
),
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment