Tempest: ValidationError: u'deactivated'

asked 2015-05-21 20:52:44 -0500

bkopilov gravatar image

updated 2015-05-22 07:33:26 -0500

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'
edit retag flag offensive close merge delete