From 43a38c179a8f06216dbb3c3035910a5f9588defb Mon Sep 17 00:00:00 2001
From: Joshua Harlow <jxharlow@godaddy.com>
Date: Wed, 29 Jun 2016 17:52:05 -0700
Subject: [PATCH] Fix broken save,list images/dependencies options

It's sorta required to actually build the image
list (and strucutre) to make any of these commands
do anything.

TrivalFix

Change-Id: Ib601bd4d2cc84af6d35a8623b77f9b512124d2ad
---
 kolla/image/build.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kolla/image/build.py b/kolla/image/build.py
index 626f5163e0..99340fa9cd 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -920,14 +920,19 @@ def run_build():
     kolla.set_time()
 
     if conf.save_dependency:
+        kolla.build_image_list()
+        kolla.find_parents()
         kolla.save_dependency(conf.save_dependency)
         LOG.info('Docker images dependency are saved in %s',
                  conf.save_dependency)
         return
     if conf.list_images:
+        kolla.build_image_list()
         kolla.list_images()
         return
     if conf.list_dependencies:
+        kolla.build_image_list()
+        kolla.find_parents()
         kolla.list_dependencies()
         return