summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Eagan <sean.eagan@att.com>2019-02-27 09:57:59 -0600
committerSean Eagan <sean.eagan@att.com>2019-02-28 15:57:18 -0600
commit8cf71c0c6d5e50d25464521ff6b0a5c448c7fd67 (patch)
tree59ef6c4642c4ad3da67a5b2a0286708cd8bc8dbb
parentc7d9e21b1e3c144eee54d7d2a5da3eb562255894 (diff)
Don't log unsupported document type messages
In the full airship use case, shipyard sends a deckhand url to armada which returns all site documents, so this leads to many many of these unwanted messages which make the logs difficult to use. Hence this removes these messages. Change-Id: I297df16d180b9ed6fae6bb8f8a0d96c3533766ae
Notes
Notes (review): Code-Review+2: Bryan Strassner <strassner.bryan@gmail.com> Code-Review+1: Dan Crank <dan.no@att.com> Code-Review+1: Drew Walters <drewwalters96@gmail.com> Code-Review+1: Nishant Kumar <nishant.e.kumar@ericsson.com> Code-Review+2: Scott Hussey <sthussey@att.com> Workflow+1: Scott Hussey <sthussey@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 01 Mar 2019 15:14:59 +0000 Reviewed-on: https://review.openstack.org/639720 Project: openstack/airship-armada Branch: refs/heads/master
-rw-r--r--armada/utils/validate.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/armada/utils/validate.py b/armada/utils/validate.py
index 98323f3..1f93e1a 100644
--- a/armada/utils/validate.py
+++ b/armada/utils/validate.py
@@ -177,19 +177,6 @@ def validate_armada_document(document):
177 diagnostic='Armada is misconfigured.') 177 diagnostic='Armada is misconfigured.')
178 LOG.error('ValidationMessage: %s', vmsg.get_output_json()) 178 LOG.error('ValidationMessage: %s', vmsg.get_output_json())
179 details.append(vmsg.get_output()) 179 details.append(vmsg.get_output())
180 else:
181 vmsg = ValidationMessage(
182 message='Unsupported document type.',
183 error=False,
184 name='ARM002',
185 level='Warning',
186 schema=schema,
187 doc_name=document_name,
188 diagnostic='Please ensure document is one of '
189 'the following schema types: %s' % list(SCHEMAS.keys()))
190 LOG.info('Unsupported document type, ignoring %s.', schema)
191 LOG.debug('ValidationMessage: %s', vmsg.get_output_json())
192 # Validation API doesn't care about this type of message, don't send
193 180
194 if len([x for x in details if x.get('error', False)]) > 0: 181 if len([x for x in details if x.get('error', False)]) > 0:
195 return False, details 182 return False, details