Comment 1 for bug 1651064

Revision history for this message
Rikimaru Honjo (honjo-rikimaru-c6) wrote :

I can't reproduce this case by your explanation.
Validation works correctly.
This bug was maybe already fixed.

Reproduce:

I used latest nova on Dec 12,16(7e1f1f68ebc05deabcb308d5918c88563b483833).

$ curl -g -i -X POST http://127.0.0.1:8774/v2.1/os-volumes_boot -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "OpenStack-API-Version: compute 2.37" -H "X-OpenStack-Nova-API-Version: 2.37" -H "X-Auth-Token: gAAAAABYWg2CF13hBj9axkqmhfWk3X_7O_Zf6vORx52A3P8Ed3ZYbIQIFaDyAY45C95R-jIX68YQW-GYTtk9yyjBwMI8ng9pfeUScqIShPiw-g7rp5RsChMSoTsE0NYW5FOFy0XJWoL814o3_n3NkPPrzqp329Jyxr4xIdHqaq_5lEA_irxxmE0" -H "Content-Type: application/json" -d '{"server": {"name": "testvm", "block_device_mapping_v2": [{"source_type": "volume", "uuid": "cfff5649-d9c8-4b16-9cef-788eb080ccc5", "destination_type": "volume1"},{"source_type": "image", "delete_on_termination": true, "boot_index": 0, "uuid": "5ccdf68c-03f6-4dc5-a936-96903a12ed6e", "destination_type": "local"}], "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "a9a98594-c2b9-4523-825c-873a3182272e"}]}}'
HTTP/1.1 400 Bad Request
Openstack-Api-Version: compute 2.37
X-Openstack-Nova-Api-Version: 2.37
Vary: OpenStack-API-Version
Vary: X-OpenStack-Nova-API-Version
Content-Type: application/json; charset=UTF-8
Content-Length: 156
X-Compute-Request-Id: req-9d580023-438a-412d-8b27-d682af59a184
Date: Wed, 21 Dec 2016 05:39:04 GMT

{"badRequest": {"message": "Invalid input for field/attribute destination_type. Value: volume1. u'volume1' is not one of ('local', 'volume')", "code": 400}}

Nova validates correctly.