Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
zoe
main
Commits
8aa59fbf
Commit
8aa59fbf
authored
May 12, 2017
by
Daniele Venzano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint errors
parent
3c64fb4d
Pipeline
#4072
failed with stages
in 1 minute and 58 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
zoe_api/rest_api/execution.py
zoe_api/rest_api/execution.py
+7
-7
zoe_cmd/entrypoint.py
zoe_cmd/entrypoint.py
+3
-3
zoe_lib/executions.py
zoe_lib/executions.py
+1
-1
No files found.
zoe_api/rest_api/execution.py
View file @
8aa59fbf
...
...
@@ -126,7 +126,7 @@ class ExecutionCollectionAPI(RequestHandler):
def
get
(
self
):
"""
Returns a list of all active executions.
The list can be filtered by passing a non-empty JSON dictionary. Any combination of the following filters is supported:
* status: one of submitted, scheduled, starting, error, running, cleaning up, terminated
...
...
@@ -139,7 +139,7 @@ class ExecutionCollectionAPI(RequestHandler):
* later_than_submit: all execution that where submitted later than this timestamp
* later_than_start: all execution that started later than this timestamp
* later_than_end: all execution that started later than this timestamp
All timestamps should be passed as number of seconds since the epoch (UTC timezone).
example: curl -u 'username:password' -X GET -H "Content-Type: application/json" -d '{"status":"terminated"}' http://bf5:8080/api/0.6/execution
...
...
@@ -162,12 +162,12 @@ class ExecutionCollectionAPI(RequestHandler):
(
'later_than_start'
,
int
),
(
'later_than_end'
,
int
)
]
for
f
in
filters
:
if
f
[
0
]
in
self
.
request
.
arguments
:
if
f
[
1
]
==
str
:
filt_dict
[
f
[
0
]]
=
self
.
request
.
arguments
[
f
[
0
]][
0
].
decode
(
'utf-8'
)
for
f
ilter
in
filters
:
if
f
ilter
[
0
]
in
self
.
request
.
arguments
:
if
f
ilter
[
1
]
==
str
:
filt_dict
[
f
ilter
[
0
]]
=
self
.
request
.
arguments
[
filter
[
0
]][
0
].
decode
(
'utf-8'
)
else
:
filt_dict
[
f
[
0
]]
=
f
[
1
](
self
.
request
.
arguments
[
f
[
0
]][
0
])
filt_dict
[
f
ilter
[
0
]]
=
filter
[
1
](
self
.
request
.
arguments
[
filter
[
0
]][
0
])
execs
=
self
.
api_endpoint
.
execution_list
(
uid
,
role
,
**
filt_dict
)
...
...
zoe_cmd/entrypoint.py
View file @
8aa59fbf
...
...
@@ -82,9 +82,9 @@ def exec_list_cmd(args):
'later_than_end'
]
filters
=
{}
for
k
,
v
in
vars
(
args
).
items
():
if
k
in
filter_names
:
filters
[
k
]
=
v
for
k
ey
,
value
in
vars
(
args
).
items
():
if
k
ey
in
filter_names
:
filters
[
k
ey
]
=
value
data
=
exec_api
.
list
(
**
filters
)
for
e
in
sorted
(
data
.
values
(),
key
=
lambda
x
:
x
[
'id'
]):
print
(
'Execution {} (User: {}, ID: {}): {}'
.
format
(
e
[
'name'
],
e
[
'user_id'
],
e
[
'id'
],
e
[
'status'
]))
...
...
zoe_lib/executions.py
View file @
8aa59fbf
...
...
@@ -64,7 +64,7 @@ class ZoeExecutionsAPI(ZoeAPIBase):
def
list
(
self
,
**
kwargs
):
"""
Returns a list of all executions for the calling user, all of them if the user is admin.
The list can be filtered by passing arguments. Any combination of the following filters is supported:
* status: one of submitted, scheduled, starting, error, running, cleaning up, terminated
...
...
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