Code Review
/
releng
/
lftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
68f40d3
)
Automatically hide protected images
87/7887/2
author
Thanh Ha
<thanh.ha@linuxfoundation.org>
Sat, 9 Dec 2017 01:45:25 +0000
(20:45 -0500)
committer
Thanh Ha
<thanh.ha@linuxfoundation.org>
Sat, 9 Dec 2017 01:52:30 +0000
(20:52 -0500)
We are not able to delete protected images so automatically filter
them out of our results.
Issue: RELENG-705
Change-Id: Id7fa5ab73ec912aac9b04dfb30c29492320402f2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
lftools/openstack/image.py
patch
|
blob
|
history
diff --git
a/lftools/openstack/image.py
b/lftools/openstack/image.py
index
4c9ac98
..
8b2a77f
100644
(file)
--- a/
lftools/openstack/image.py
+++ b/
lftools/openstack/image.py
@@
-31,6
+31,8
@@
def _filter_images(images, days=0, hide_public=False, ci_managed=True):
continue
if ci_managed and image.metadata.get('ci_managed', None) != 'yes':
continue
+ if image.protected:
+ continue
if days and (
datetime.strptime(image.created_at, '%Y-%m-%dT%H:%M:%SZ')
>= datetime.now() - timedelta(days=days)):