)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f9b458863318ebce1f09f5e37303b4a30b871fb5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When booting instance with block_device_mapping provided,"},{"line_number":10,"context_line":"in the current implementation, the \"destination_type\" is"},{"line_number":11,"context_line":"allowed to be None, and this lead to un-sync between Nova"},{"line_number":12,"context_line":"and Cinder: Nova will have a bdm in its record while the"},{"line_number":13,"context_line":"volume is still in \"available\" status in cinder."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch adds a check for destination_type"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a71b18c_71a98423","line":13,"range":{"start_line":11,"start_character":20,"end_line":13,"end_character":48},"updated":"2016-12-07 08:01:16.000000000","message":"Those words confuse for the review I think. There isn\u0027t sync problem between nova and volume.\n\nThe BDM record created at nova api layer. Then in the nova-compute, the BDM record with destination_type\u003dNone will be ignored by the nova code.\n\nSo the user input a invalid BDM in the request, then Nova just ignore this invalid BDM. This is the case silent failed, we can fix it as bug.","commit_id":"47d84e4059b078796504c03f5be5c13fd807bc54"}],"nova/api/openstack/compute/schemas/block_device_mapping.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"5580ee14d098ddb09f9206ee403f07f1d54041cd","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    \u0027block_device_mapping_v2\u0027: {"},{"line_number":71,"context_line":"        \u0027type\u0027: \u0027array\u0027,"},{"line_number":72,"context_line":"        \u0027items\u0027: [block_device_mapping],"},{"line_number":73,"context_line":"        \u0027required\u0027: [\u0027source_type\u0027, \u0027destination_type\u0027, \u0027uuid\u0027],"},{"line_number":74,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_55c0df7c","line":73,"range":{"start_line":73,"start_character":20,"end_line":73,"end_character":64},"updated":"2016-12-18 21:25:02.000000000","message":"I think this \u0027required\u0027 is invalid because the above parameters could be unnecessary when passing no_device parameter. Please see from_api() code.\nThis is the one of difficult validation ways due to multiple complex parameters\u0027 patterns..","commit_id":"eb81ab4742271902afb47cafaeb4c92da397be4f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7a256071b025cc714c43860df9318c4749121870","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    \u0027block_device_mapping_v2\u0027: {"},{"line_number":71,"context_line":"        \u0027type\u0027: \u0027array\u0027,"},{"line_number":72,"context_line":"        \u0027items\u0027: [block_device_mapping],"},{"line_number":73,"context_line":"        \u0027required\u0027: [\u0027source_type\u0027, \u0027destination_type\u0027, \u0027uuid\u0027],"},{"line_number":74,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_81e6b942","line":73,"range":{"start_line":73,"start_character":20,"end_line":73,"end_character":64},"in_reply_to":"1a6eadb0_55c0df7c","updated":"2016-12-19 03:14:06.000000000","message":"Hmm, yes then I think it should be done in the code then.","commit_id":"eb81ab4742271902afb47cafaeb4c92da397be4f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"570d180965829915e843bd67e79bb2ba0bae5f83","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    \u0027block_device_mapping_v2\u0027: {"},{"line_number":71,"context_line":"        \u0027type\u0027: \u0027array\u0027,"},{"line_number":72,"context_line":"        \u0027items\u0027: [block_device_mapping],"},{"line_number":73,"context_line":"        \u0027required\u0027: [\u0027source_type\u0027, \u0027destination_type\u0027, \u0027uuid\u0027],"},{"line_number":74,"context_line":"        \u0027additionalProperties\u0027: False,"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_2beb04b2","line":73,"range":{"start_line":73,"start_character":20,"end_line":73,"end_character":64},"in_reply_to":"1a6eadb0_55c0df7c","updated":"2016-12-19 03:12:30.000000000","message":"Thanks alot, I will have a check","commit_id":"eb81ab4742271902afb47cafaeb4c92da397be4f"}],"nova/block_device.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"957817a672fcfb118efc4ae253bb4c77032874c0","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if source_type not in (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":188,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_45cdaa64","line":192,"range":{"start_line":190,"start_character":0,"end_line":192,"end_character":65},"updated":"2016-12-07 05:33:08.000000000","message":"This is backward incompatible changes, if destination_type is not specified then, it will be None and raise exception here.","commit_id":"47d84e4059b078796504c03f5be5c13fd807bc54"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3c8c8fb4f0dd0b0855d7349c745f45f7f0a02958","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_1e48315b","line":192,"updated":"2016-12-08 01:08:25.000000000","message":"JSON-Schema validates destination_type already since https://review.openstack.org/#/c/258788\n\nSo this can be None only, actually.","commit_id":"121995b0c378b40d7c46aa42b14f28e5a6d77458"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"db4b486d3a96f1db4c98dc5f5365560d58c3afbd","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_ea3edd26","line":192,"in_reply_to":"1a6eadb0_5e045316","updated":"2016-12-15 07:23:45.000000000","message":"Done","commit_id":"121995b0c378b40d7c46aa42b14f28e5a6d77458"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e63861945255aac37fe491c1f318ddbfbe7d43e2","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_5e045316","line":192,"in_reply_to":"3a71b18c_1e48315b","updated":"2016-12-13 14:51:28.000000000","message":"Yeah, does this really mean the JSON schema should have destination_type as a required param? and ln 185 changes to api_dict[\u0027destination_type\u0027] ?","commit_id":"121995b0c378b40d7c46aa42b14f28e5a6d77458"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2df63f8e916891b1ef5ab1a7daabee2ed8bdbeee","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if source_type not in (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":188,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_7ad93b83","line":192,"range":{"start_line":190,"start_character":0,"end_line":192,"end_character":65},"updated":"2016-12-19 08:15:07.000000000","message":"As my previous comment, destination_type is already validated with volume or local if passing the parameter.\nSo it is better to change here like\n\n if destination_type is None:\n     raise exception.InvalidBDMFormat(\n         details\u003d_(\"destination_type should be specified if not specifying no_device.\"))\n\nOr something.","commit_id":"a6f5639ff9d85ad493b400ac78ba1a41530ebb18"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"b41c2dad785badcfbc449f19b89ef6205aa8c354","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if source_type not in (\u0027volume\u0027, \u0027image\u0027, \u0027snapshot\u0027, \u0027blank\u0027):"},{"line_number":188,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type not in (\u0027volume\u0027, \u0027local\u0027):"},{"line_number":191,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":192,"context_line":"                    details\u003d_(\"Invalid destination_type field.\"))"},{"line_number":193,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":194,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":195,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_b164d9e5","line":192,"range":{"start_line":190,"start_character":0,"end_line":192,"end_character":65},"in_reply_to":"1a6eadb0_7ad93b83","updated":"2016-12-19 08:50:17.000000000","message":"Thanks for the review, as discuss on IRC, I\u0027m testing using Nova CLI and it turns out boot command with dbm provided is actually calling os-volume_boot API and thats why the schema didn\u0027t work. But it is another issue and will be fixed in another patch.","commit_id":"a6f5639ff9d85ad493b400ac78ba1a41530ebb18"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"6b61cac2ca380528adf66fdf73b1a568c93a801e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":192,"context_line":"                    destination_type \u003d \u0027local\u0027"},{"line_number":193,"context_line":"                if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":194,"context_line":"                    destination_type \u003d \u0027volume\u0027"},{"line_number":195,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":196,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":197,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da4df55a_937340b1","line":194,"range":{"start_line":194,"start_character":40,"end_line":194,"end_character":46},"updated":"2016-12-22 12:41:47.000000000","message":"will this logic makes \ncheck of \ndestination_type \u003d None, source_type \u003d blank and device_uuid is not None\nbe bypassed?","commit_id":"9e02fd80ad68ff076dbfa12f3f04380b628aaf87"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8a78965bb502a96ac7fd278b0a0efb634bb52949","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":192,"context_line":"                    destination_type \u003d \u0027local\u0027"},{"line_number":193,"context_line":"                if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":194,"context_line":"                    destination_type \u003d \u0027volume\u0027"},{"line_number":195,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":196,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":197,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da4df55a_f2caa619","line":194,"range":{"start_line":194,"start_character":40,"end_line":194,"end_character":46},"in_reply_to":"da4df55a_937340b1","updated":"2016-12-23 03:33:48.000000000","message":"what do you mean? I cannot get your point","commit_id":"9e02fd80ad68ff076dbfa12f3f04380b628aaf87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a510a7c7f2a1125fed77d3ddc0d1a217d18ed444","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type is None:"},{"line_number":191,"context_line":"                if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":192,"context_line":"                    destination_type \u003d \u0027local\u0027"},{"line_number":193,"context_line":"                if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":194,"context_line":"                    destination_type \u003d \u0027volume\u0027"},{"line_number":195,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a430d35_3274bd66","line":192,"updated":"2017-02-08 01:42:20.000000000","message":"This seems like a bad assumption. \u0027local\u0027 is only value for source_type in (\u0027image\u0027, \u0027blank\u0027) but the reverse is not true, i.e. I may want source_type\u003d\u0027image\u0027 and destination_type\u003d\u0027volume\u0027.\n\nYou might be able to make further educated guesses for each type, i.e. if source\u003dblank and guest_format is not swap, for example, then assume local. Or if source\u003dimage and boot_index \u003e\u003d 0.\n\nStill, it seems like we should just fail and require destination_type rather than guess here.","commit_id":"56d5befbc0d17a9e50a4930364676b34e80260b9"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"23a61845af136f6f25fa1ade0f5c661681bbe3c7","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    details\u003d_(\"Invalid source_type field.\"))"},{"line_number":190,"context_line":"            if destination_type is None:"},{"line_number":191,"context_line":"                if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":192,"context_line":"                    destination_type \u003d \u0027local\u0027"},{"line_number":193,"context_line":"                if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":194,"context_line":"                    destination_type \u003d \u0027volume\u0027"},{"line_number":195,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa31d9ce_f5f42388","line":192,"in_reply_to":"1a430d35_3274bd66","updated":"2017-02-13 12:27:20.000000000","message":"yeah, seems logic is too complicated and error leading, so a failure should be better here","commit_id":"56d5befbc0d17a9e50a4930364676b34e80260b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32f6ba6e91456e24612555afd1e70dffa8260154","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            if destination_type is None:"},{"line_number":191,"context_line":"                if source_type in (\u0027image\u0027, \u0027blank\u0027):"},{"line_number":192,"context_line":"                    destination_type \u003d \u0027local\u0027"},{"line_number":193,"context_line":"                if source_type in (\u0027snapshot\u0027, \u0027volume\u0027):"},{"line_number":194,"context_line":"                    destination_type \u003d \u0027volume\u0027"},{"line_number":195,"context_line":"            elif source_type \u003d\u003d \u0027blank\u0027 and device_uuid:"},{"line_number":196,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":197,"context_line":"                    details\u003d_(\"Invalid device UUID.\"))"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a430d35_724725bc","line":194,"range":{"start_line":193,"start_character":16,"end_line":194,"end_character":47},"updated":"2017-02-08 01:57:30.000000000","message":"This is OK since a source_type of snapshot or volume can only have a destination_type of volume:\n\nhttp://docs.openstack.org/developer/nova/block_device_mapping.html#block-device-mapping-v2","commit_id":"56d5befbc0d17a9e50a4930364676b34e80260b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e8369dbc906e899b43a598c4aaa5a10d49a1a69","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            if source_type \u003d\u003d \u0027image\u0027 and destination_type \u003d\u003d \u0027local\u0027:"},{"line_number":204,"context_line":"                try:"},{"line_number":205,"context_line":"                    boot_index \u003d int(api_dict.get(\u0027boot_index\u0027, -1))"},{"line_number":206,"context_line":"                except ValueError:"},{"line_number":207,"context_line":"                    raise exception.InvalidBDMFormat("},{"line_number":208,"context_line":"                        details\u003d_(\"Boot index is invalid.\"))"},{"line_number":209,"context_line":"                # if this bdm is generated from --image ,then"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a430d35_9272d10f","line":206,"range":{"start_line":206,"start_character":23,"end_line":206,"end_character":33},"updated":"2017-02-08 02:01:57.000000000","message":"Unrelated to this change, but this looks like it should also handle TypeError if boot_index is None:\n\n\u003e\u003e\u003e bdm \u003d {\u0027boot_index\u0027: None}\n\u003e\u003e\u003e int(bdm.get(\u0027boot_index\u0027))\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: int() argument must be a string or a number, not \u0027NoneType\u0027\n\u003e\u003e\u003e\n\nBut that depends on this change:\n\nhttps://review.openstack.org/#/c/430497/","commit_id":"56d5befbc0d17a9e50a4930364676b34e80260b9"}],"nova/tests/unit/api/openstack/compute/test_block_device_mapping.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b772a43174cc25117c85b7f28176c6a44eb7357c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_create_instance_bdm(self):"},{"line_number":285,"context_line":"        bdm \u003d [{"},{"line_number":286,"context_line":"            \u0027source_type\u0027: \u0027volume\u0027,"},{"line_number":287,"context_line":"            \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":288,"context_line":"            \u0027device_name\u0027: \u0027fake_dev\u0027,"},{"line_number":289,"context_line":"            \u0027uuid\u0027: \u0027fake_vol\u0027"},{"line_number":290,"context_line":"        }]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da4df55a_19577d03","line":287,"range":{"start_line":287,"start_character":12,"end_line":287,"end_character":41},"updated":"2016-12-22 08:08:57.000000000","message":"Humm, I have a little idea according to this case now.\n\nIs it fine to use source_type as destination_type if not specifying destination_type?\n\nMaybe we need to discuss this more.","commit_id":"f13ffb16f0a16d84d40fe8824db886d50a9c6ac2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7554bb4e301f53407e3a5ed6c58dfeefcae481e4","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_create_instance_bdm(self):"},{"line_number":285,"context_line":"        bdm \u003d [{"},{"line_number":286,"context_line":"            \u0027source_type\u0027: \u0027volume\u0027,"},{"line_number":287,"context_line":"            \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":288,"context_line":"            \u0027device_name\u0027: \u0027fake_dev\u0027,"},{"line_number":289,"context_line":"            \u0027uuid\u0027: \u0027fake_vol\u0027"},{"line_number":290,"context_line":"        }]"}],"source_content_type":"text/x-python","patch_set":11,"id":"da4df55a_19abfd8a","line":287,"range":{"start_line":287,"start_character":12,"end_line":287,"end_character":41},"in_reply_to":"da4df55a_19577d03","updated":"2016-12-22 08:14:37.000000000","message":"we can calculate some default value for the source type from the source_type...but not sure it will be better than the current solution or not.","commit_id":"f13ffb16f0a16d84d40fe8824db886d50a9c6ac2"}],"nova/tests/unit/test_block_device.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"957817a672fcfb118efc4ae253bb4c77032874c0","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    def test_from_api_invalid_destination_type(self):"},{"line_number":595,"context_line":"        api_dict \u003d {\u0027id\u0027: 1,"},{"line_number":596,"context_line":"            \u0027source_type\u0027: \u0027image\u0027,"},{"line_number":597,"context_line":"            \u0027destination_type\u0027: \u0027fake\u0027,"},{"line_number":598,"context_line":"            \u0027uuid\u0027: \u0027fake-volume-id-1\u0027,"},{"line_number":599,"context_line":"            \u0027boot_index\u0027: \u00270\u0027}"},{"line_number":600,"context_line":"        self.assertRaises(exception.InvalidBDMFormat,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_653f06b4","line":597,"range":{"start_line":597,"start_character":12,"end_line":597,"end_character":39},"updated":"2016-12-07 05:33:08.000000000","message":"How about not specify the destination_type. API itself would not allow any other value than local or volume. \nFor much realistic tests, it will be better to test with not specifying the destination_type.","commit_id":"47d84e4059b078796504c03f5be5c13fd807bc54"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1c2a669a5037f31c73c76c51f68edec86a4042e0","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            \u0027destination_type\u0027: \u0027fake\u0027,"},{"line_number":598,"context_line":"            \u0027uuid\u0027: \u0027fake-volume-id-1\u0027,"},{"line_number":599,"context_line":"            \u0027boot_index\u0027: \u00270\u0027}"},{"line_number":600,"context_line":"        self.assertRaises(exception.InvalidBDMFormat,"},{"line_number":601,"context_line":"                          block_device.BlockDeviceDict.from_api, api_dict,"},{"line_number":602,"context_line":"                          False)"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a6eadb0_9a136d0d","line":600,"range":{"start_line":600,"start_character":36,"end_line":600,"end_character":52},"updated":"2016-12-19 11:50:15.000000000","message":"seems this is incorrect? should it be ValidateError?","commit_id":"d6b4281fa170c68b8295e61d58f19c01fbb0dbfd"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"198d4992dc6ace65122f7c23c785f962f67c402b","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            \u0027destination_type\u0027: \u0027fake\u0027,"},{"line_number":598,"context_line":"            \u0027uuid\u0027: \u0027fake-volume-id-1\u0027,"},{"line_number":599,"context_line":"            \u0027boot_index\u0027: \u00270\u0027}"},{"line_number":600,"context_line":"        self.assertRaises(exception.InvalidBDMFormat,"},{"line_number":601,"context_line":"                          block_device.BlockDeviceDict.from_api, api_dict,"},{"line_number":602,"context_line":"                          False)"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a6eadb0_5e6d2931","line":600,"range":{"start_line":600,"start_character":36,"end_line":600,"end_character":52},"in_reply_to":"1a6eadb0_9a136d0d","updated":"2016-12-20 00:50:08.000000000","message":"No, the test destination_type should be None, and maybe a new funtional test about the schema shoulde be tested.","commit_id":"d6b4281fa170c68b8295e61d58f19c01fbb0dbfd"}]}
