Fix bugs
1) Handle hash_sum = None situation 2) Add workflows to horizon archive Change-Id: Ie44e43bdabab239fbdfdcaae90c533f663041dd3
This commit is contained in:
parent
d121a41953
commit
c6a3f103ff
@ -37,7 +37,7 @@ def _get_archive(client, hash_sum):
|
||||
manifests = parser.parse()
|
||||
types = None
|
||||
if client == 'conductor':
|
||||
types = ('heat', 'agent', 'scripts')
|
||||
types = ('heat', 'agent', 'scripts', 'workflows')
|
||||
elif client == 'ui':
|
||||
types = ('ui',)
|
||||
else:
|
||||
|
@ -82,6 +82,11 @@ class Archiver(object):
|
||||
return os.path.abspath(os.path.join(pkg_dir, ARCHIVE_PKG_NAME))
|
||||
|
||||
def _is_data_cached(self, cache_dir, hash_sum):
|
||||
#ToDo: optimize archive creation: use existing cached version of
|
||||
# archive package when no hash sum is provided by client
|
||||
if not hash_sum:
|
||||
log.warning('Hash parameter was not found in request')
|
||||
return False
|
||||
existing_caches = os.listdir(cache_dir)
|
||||
if len(existing_caches) == 1:
|
||||
if existing_caches[0] == hash_sum:
|
||||
|
Loading…
Reference in New Issue
Block a user