summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-06 15:51:50 +0000
committerGerrit Code Review <review@openstack.org>2018-11-06 15:51:50 +0000
commit2f596fd62713bfd4149757a77a4943dd60b64cca (patch)
tree0e2b7990aa7672ce19d9970d3e1fcd1c9b9fce2c
parent947810ada5fb2f92e28b9eac6f6ebf8dedb460f1 (diff)
parentec8bad3bf4f6e34c703ad429fb6b670b80ac02fb (diff)
Merge "Fix logging when "Duplicate document exists" error occurs"
-rw-r--r--deckhand/engine/layering.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/deckhand/engine/layering.py b/deckhand/engine/layering.py
index d2719cb..d2d199a 100644
--- a/deckhand/engine/layering.py
+++ b/deckhand/engine/layering.py
@@ -329,17 +329,18 @@ class DocumentLayering(object):
329 error_list = [] 329 error_list = []
330 for result in results: 330 for result in results:
331 for e in result['errors']: 331 for e in result['errors']:
332 LOG.error('Document [%s, %s] %s failed with pre-validation ' 332 for d in e['documents']:
333 'error: %s.', e['schema'], e['layer'], e['name'], 333 LOG.error('Document [%s, %s] %s failed with '
334 e['message']) 334 'pre-validation error: "%s". Diagnostic: "%s".',
335 error_list.append( 335 d['schema'], d['layer'], d['name'],
336 ValidationMessage( 336 e['message'], e['diagnostic'])
337 message=e['message'], 337
338 doc_schema=e['schema'], 338 error_list.append(
339 doc_name=e['name'], 339 ValidationMessage(
340 doc_layer=e['layer'] 340 message=e['message'],
341 ) 341 doc_schema=d['schema'],
342 ) 342 doc_name=d['name'],
343 doc_layer=d['layer']))
343 344
344 if error_list: 345 if error_list:
345 raise errors.InvalidDocumentFormat(error_list=error_list) 346 raise errors.InvalidDocumentFormat(error_list=error_list)