deckhand/deckhand
Felipe Monteiro 04ad3fa93b Add validation for empty documents inside multi-document payload
This is to add a helper function to base controller resource class
for detecting whether a list of documents has any empty (None)
or non-object entries in it (since all documents should be
objects), resulting in a 400 Bad Request getting raised.
This is to prevent the following stacktrace from occurring:

File "/usr/local/lib/python3.5/dist-packages/falcon/api.py", line 244, in __call__
responder(req, resp, **params)
File "./deckhand/policy.py", line 104, in handler
return func(*args, **kwargs)
File "./deckhand/control/buckets.py", line 58, in on_put
documents, data_schemas, pre_validate=True)
File "./deckhand/engine/document_validation.py", line 387, in __init__
raw_document[prop] = document.get(prop)
AttributeError: 'NoneType' object has no attribute 'get'

Change-Id: I76fc9b0d7662358f8b26b5bddf1187e92d1554de
2018-03-31 22:36:55 -04:00
..
barbican Document replacement: Update Document unique constraint 2018-03-28 17:08:03 -04:00
client Fix Revision Resource print out in Deckhand client 2018-03-13 22:31:38 -04:00
common Log all document data following any layering action failure 2018-03-29 10:10:03 -04:00
conf Fix secret_uuid used to query Barbican's Secrets API 2018-03-26 21:30:57 +01:00
control Add validation for empty documents inside multi-document payload 2018-03-31 22:36:55 -04:00
db Document replacement: Update Document unique constraint 2018-03-28 17:08:03 -04:00
engine Log all document data following any layering action failure 2018-03-29 10:10:03 -04:00
policies Rename Deckhand bucket endpoint to buckets for consistency 2017-10-27 19:21:03 +01:00
tests Add validation for empty documents inside multi-document payload 2018-03-31 22:36:55 -04:00
__init__.py Oslo config integration (#1) 2017-06-26 16:57:50 -07:00
cmd.py Integrate Deckhand with keystone auth 2017-10-16 19:54:46 +01:00
context.py Integrate Deckhand with keystone auth 2017-10-16 19:54:46 +01:00
errors.py Log all document data following any layering action failure 2018-03-29 10:10:03 -04:00
factories.py Document replacement: Update Document unique constraint 2018-03-28 17:08:03 -04:00
policy.py DECKHAND-66: Document substitution implementation 2017-10-13 15:16:27 -04:00
service.py [Trivial Fix] Make profile directory if it doesn't exist 2018-02-15 23:35:09 -05:00
types.py Add functional tests for "owned" documents 2017-12-23 02:25:29 +00:00