Description: Create Volume snapshot with invalid Volume ID is throwing 500 Error.
Expected Result: Should return error code 400. (raise Bad Request)
Actual Result: Is returning 500 error code . (Compute Fault)
LOG:
-------
AssertionError: Create Snapshot did not raise Badrequest for ['', '1234567890', 'alphabetic', '!@#$%^&*()_+:>>'] as invalidVolume IDs
-------------------- >> begin captured logging << --------------------
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:8774/v1.1/admin/os-snapshots
tempest.common.rest_client: ERROR: Request Body: {"snapshot": {"force": "false", "display_name": "VolumeSnap-46474293957", "display_description": "VolumeSnapDescrip-32621310791", "volume_id": ""}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Mon, 18 Jun 2012 19:29:29 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-f23bb461-1dac-4582-ab77-4db4281681bd'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:8774/v1.1/admin/os-snapshots
tempest.common.rest_client: ERROR: Request Body: {"snapshot": {"force": "false", "display_name": "VolumeSnap-46474293957", "display_description": "VolumeSnapDescrip-32621310791", "volume_id": "1234567890"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Mon, 18 Jun 2012 19:29:33 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-8770baca-2ee6-4e33-8593-88caecce6d27'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:8774/v1.1/admin/os-snapshots
tempest.common.rest_client: ERROR: Request Body: {"snapshot": {"force": "false", "display_name": "VolumeSnap-46474293957", "display_description": "VolumeSnapDescrip-32621310791", "volume_id": "alphabetic"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Mon, 18 Jun 2012 19:29:34 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-0a111b54-4139-4219-ae15-f1464f389091'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
tempest.common.rest_client: ERROR: Request URL: http://127.0.0.1:8774/v1.1/admin/os-snapshots
tempest.common.rest_client: ERROR: Request Body: {"snapshot": {"force": "false", "display_name": "VolumeSnap-46474293957", "display_description": "VolumeSnapDescrip-32621310791", "volume_id": "!@#$%^&*()_+:>>"}}
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Mon, 18 Jun 2012 19:29:38 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-877e3e4f-8b2d-4989-a0e3-7c242c8b61f1'}
tempest.common.rest_client: ERROR: Response Body: {u'computeFault': {u'message': u'The server has either erred or is incapable of performing the requested operation.', u'code': 500}}
--------------------- >> end captured logging << ---------------------
Fix proposed to branch: master /review. openstack. org/11390
Review: https:/