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',
|
cfg.BoolOpt('list-dependencies', short='l',
|
||||||
help='Show image dependencies (filtering supported)'),
|
help='Show image dependencies (filtering supported)'),
|
||||||
cfg.BoolOpt('list-images',
|
cfg.BoolOpt('list-images',
|
||||||
help='Show all available images'),
|
help='Show all available images (filtering supported)'),
|
||||||
cfg.StrOpt('namespace', short='n', default='kolla',
|
cfg.StrOpt('namespace', short='n', default='kolla',
|
||||||
help='The Docker namespace name'),
|
help='The Docker namespace name'),
|
||||||
cfg.BoolOpt('cache', default=True,
|
cfg.BoolOpt('cache', default=True,
|
||||||
|
@ -898,7 +898,9 @@ class KollaWorker(object):
|
|||||||
f.write(dot.source)
|
f.write(dot.source)
|
||||||
|
|
||||||
def list_images(self):
|
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)
|
print(count + 1, ':', image.name)
|
||||||
|
|
||||||
def list_dependencies(self):
|
def list_dependencies(self):
|
||||||
@ -1001,6 +1003,8 @@ def run_build():
|
|||||||
return
|
return
|
||||||
if conf.list_images:
|
if conf.list_images:
|
||||||
kolla.build_image_list()
|
kolla.build_image_list()
|
||||||
|
kolla.find_parents()
|
||||||
|
kolla.filter_images()
|
||||||
kolla.list_images()
|
kolla.list_images()
|
||||||
return
|
return
|
||||||
if conf.list_dependencies:
|
if conf.list_dependencies:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user