Merge "Support filtering output of --list-images"
This commit is contained in:
commit
fa09b3e077
@ -160,7 +160,7 @@ _CLI_OPTS = [
|
||||
cfg.BoolOpt('list-dependencies', short='l',
|
||||
help='Show image dependencies (filtering supported)'),
|
||||
cfg.BoolOpt('list-images',
|
||||
help='Show all available images'),
|
||||
help='Show all available images (filtering supported)'),
|
||||
cfg.StrOpt('namespace', short='n', default='kolla',
|
||||
help='The Docker namespace name'),
|
||||
cfg.BoolOpt('cache', default=True,
|
||||
|
@ -898,7 +898,9 @@ class KollaWorker(object):
|
||||
f.write(dot.source)
|
||||
|
||||
def list_images(self):
|
||||
for count, image in enumerate(self.images):
|
||||
for count, image in enumerate([
|
||||
image for image in self.images if image.status == STATUS_MATCHED
|
||||
]):
|
||||
print(count + 1, ':', image.name)
|
||||
|
||||
def list_dependencies(self):
|
||||
@ -1001,6 +1003,8 @@ def run_build():
|
||||
return
|
||||
if conf.list_images:
|
||||
kolla.build_image_list()
|
||||
kolla.find_parents()
|
||||
kolla.filter_images()
|
||||
kolla.list_images()
|
||||
return
|
||||
if conf.list_dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user