Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

tempest ValidationError

Hi, I am working on a new patch for tempest , add support for glance image deactivate. the test is working. When i am calling to image_list() , there is a validation error. How can i update the schem in tempest ?

Error _StringException: Empty attachments: pythonlogging:''

Traceback (most recent call last): File "/home/bkopilov/Automation/tempest/tempest/api/image/admin/v2/test_images.py", line 51, in test_deactivate_image images = self.admin_client.image_list() File "/home/bkopilov/Automation/tempest/tempest/services/image/v2/json/image_client.py", line 126, in image_list self._validate_schema(body, type='images') File "/home/bkopilov/Automation/tempest/tempest/services/image/v2/json/image_client.py", line 59, in _validate_schema jsonschema.validate(body, schema) File "/home/bkopilov/.local/lib/python2.7/site-packages/jsonschema/validators.py", line 432, in validate cls(schema, args, *kwargs).validate(instance) File "/home/bkopilov/.local/lib/python2.7/site-packages/jsonschema/validators.py", line 117, in validate raise error ValidationError: u'deactivated' is not one of [u'queued', u'saving', u'active', u'killed', u'deleted', u'pending_delete']

Failed validating u'enum' in schema[u'properties'][u'images'][u'items'][u'properties'][u'status']: {u'description': u'Status of the image (READ-ONLY)', u'enum': [u'queued', u'saving', u'active', u'killed', u'deleted', u'pending_delete'], u'type': u'string'}

On instance[u'images'][0][u'status']: u'deactivated'