Comment 4 for bug 1432212

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

Look i tried to create one with -ve size and got this

{"instance": {"volume": {"size": -2}, "flavorRef": "2", "name": "test"}} from (pid=6861) authorize /mnt/stack/trove/trove/common/auth.py:67
2015-03-15 09:05:18.932 DEBUG trove.common.wsgi [req-e38d8044-d7b1-473c-a65d-1fb02b9ff4d5 3b9db0087ce24e088b1f54ce366e54f7 5017f5ad40c1439f972351b523767de6] Getting schema for type:create from (pid=6861) get_schema /mnt/stack/trove/trove/common/wsgi.py:372
2015-03-15 09:05:18.932 DEBUG trove.common.wsgi [req-e38d8044-d7b1-473c-a65d-1fb02b9ff4d5 3b9db0087ce24e088b1f54ce366e54f7 5017f5ad40c1439f972351b523767de6] Found Schema: none from (pid=6861) get_schema /mnt/stack/trove/trove/common/wsgi.py:377
2015-03-15 09:05:18.933 INFO trove.common.wsgi [req-e38d8044-d7b1-473c-a65d-1fb02b9ff4d5 3b9db0087ce24e088b1f54ce366e54f7 5017f5ad40c1439f972351b523767de6] Validation error: instance['volume']['size'] -2 is not valid under any of the given schemas; -2 is less than the minimum of 0; -2 is not of type 'string'
2015-03-15 09:05:18.934 DEBUG trove.common.wsgi [req-e38d8044-d7b1-473c-a65d-1fb02b9ff4d5 3b9db0087ce24e088b1f54ce366e54f7 5017f5ad40c1439f972351b523767de6] Traceback (most recent call last):
  File "/mnt/stack/trove/trove/common/wsgi.py", line 247, in execute_action
    self.controller.validate_request(action, action_args)
  File "/mnt/stack/trove/trove/common/wsgi.py", line 404, in validate_request
    raise exception.BadRequest(message=error_msg)
BadRequest: Validation error: instance['volume']['size'] -2 is not valid under any of the given schemas; -2 is less than the minimum of 0; -2 is not of type 'string'