Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
itminedu
snf-ganeti
Commits
0ad64cf8
Commit
0ad64cf8
authored
16 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
Implement “gnt-job archive” to archive jobs
Reviewed-by: iustinp
parent
c609f802
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/gnt-job
+15
-1
15 additions, 1 deletion
scripts/gnt-job
with
15 additions
and
1 deletion
scripts/gnt-job
+
15
−
1
View file @
0ad64cf8
...
...
@@ -43,6 +43,7 @@ _USER_JOB_STATUS = {
constants
.
JOB_STATUS_ERROR
:
"
error
"
,
}
def
ListJobs
(
opts
,
args
):
"""
List the jobs
...
...
@@ -92,6 +93,15 @@ def ListJobs(opts, args):
return
0
def
ArchiveJobs
(
opts
,
args
):
client
=
GetClient
()
for
job_id
in
args
:
client
.
ArchiveJob
(
job_id
)
return
0
commands
=
{
'
list
'
:
(
ListJobs
,
ARGS_NONE
,
[
DEBUG_OPT
,
NOHDR_OPT
,
SEP_OPT
,
USEUNITS_OPT
,
FIELDS_OPT
],
...
...
@@ -99,7 +109,11 @@ commands = {
"
(see the man page for details): id, status, op_list,
"
"
op_status, op_result.
"
"
The default field
"
"
list is (in order): %s.
"
%
"
,
"
.
join
(
_LIST_DEF_FIELDS
))
"
list is (in order): %s.
"
%
"
,
"
.
join
(
_LIST_DEF_FIELDS
)),
'
archive
'
:
(
ArchiveJobs
,
ARGS_ANY
,
[
DEBUG_OPT
],
"
<job-id> [<job-id> ...]
"
,
"
Archive specified jobs
"
),
}
...
...
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