)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Add this property (``volume_type``) to block_device_mapping_v2."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"bp: boot-instance-specific-storage-backend"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Icc301230fe7c8e3ebbbcc7f4a807e562db7f93e3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3f79a3b5_770abf1e","line":14,"updated":"2018-09-26 14:16:57.000000000","message":"You should also update this doc to mention the new field and the microversion restriction associated with it:\n\nhttps://github.com/openstack/nova/blob/master/doc/source/user/block-device-mapping.rst","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Add this property (``volume_type``) to block_device_mapping_v2."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"bp: boot-instance-specific-storage-backend"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Icc301230fe7c8e3ebbbcc7f4a807e562db7f93e3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3f79a3b5_9f75229a","line":14,"in_reply_to":"3f79a3b5_770abf1e","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/api/openstack/api_version_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":162,"context_line":"             ``updated_at`` time to filter nova resources, the resources"},{"line_number":163,"context_line":"             include the servers API, os-instance-action API and"},{"line_number":164,"context_line":"             os-migrations API."},{"line_number":165,"context_line":"    * 2.67 - Add support specifying ``volume_type`` of the storage backend"},{"line_number":166,"context_line":"             to boot instance."},{"line_number":167,"context_line":"\"\"\""},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_17326bf3","line":166,"range":{"start_line":165,"start_character":13,"end_line":166,"end_character":30},"updated":"2018-09-26 14:16:57.000000000","message":"This could be misinterpreted that volume_type is a top-level parameter on the server create request. How about, \"Adds the optional ``volume_type`` field to the ``block_device_mapping_v2`` parameter when creating a server.\"","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":162,"context_line":"             ``updated_at`` time to filter nova resources, the resources"},{"line_number":163,"context_line":"             include the servers API, os-instance-action API and"},{"line_number":164,"context_line":"             os-migrations API."},{"line_number":165,"context_line":"    * 2.67 - Add support specifying ``volume_type`` of the storage backend"},{"line_number":166,"context_line":"             to boot instance."},{"line_number":167,"context_line":"\"\"\""},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_bf733e4e","line":166,"range":{"start_line":165,"start_character":13,"end_line":166,"end_character":30},"in_reply_to":"3f79a3b5_17326bf3","updated":"2018-09-27 10:14:35.000000000","message":"Yeah, this description is more appropriate than before.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/api/openstack/compute/schemas/servers.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"290fdf4958ba9b205b059931481c6d0afb5bcfe1","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            \u0027required\u0027: [\u0027name\u0027, \u0027flavorRef\u0027],"},{"line_number":141,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":142,"context_line":"        },"},{"line_number":143,"context_line":"        \u0027volume_type\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":144,"context_line":"    },"},{"line_number":145,"context_line":"    \u0027required\u0027: [\u0027server\u0027],"},{"line_number":146,"context_line":"    \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_91dc4618","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":42},"updated":"2018-07-02 04:32:57.000000000","message":"seems this adds the API change ,do we have a microversion somewhere?","commit_id":"327c4866d366dc863e25be917f2ed24b531be42c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    \u0027trusted_image_certificates\u0027] \u003d parameter_types.trusted_certs"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"# Add volume type in block_device_mapping_v2,"},{"line_number":353,"context_line":"# Specifying the storage backend to boot instance."},{"line_number":354,"context_line":"base_create_v267 \u003d copy.deepcopy(base_create_v263)"},{"line_number":355,"context_line":"base_create_v267[\u0027properties\u0027][\u0027server\u0027][\u0027properties\u0027]["},{"line_number":356,"context_line":"    \u0027block_device_mapping_v2\u0027][\u0027items\u0027]["}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_d7495366","line":353,"range":{"start_line":352,"start_character":44,"end_line":353,"end_character":50},"updated":"2018-09-26 14:16:57.000000000","message":"You can remove this.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    \u0027trusted_image_certificates\u0027] \u003d parameter_types.trusted_certs"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"# Add volume type in block_device_mapping_v2,"},{"line_number":353,"context_line":"# Specifying the storage backend to boot instance."},{"line_number":354,"context_line":"base_create_v267 \u003d copy.deepcopy(base_create_v263)"},{"line_number":355,"context_line":"base_create_v267[\u0027properties\u0027][\u0027server\u0027][\u0027properties\u0027]["},{"line_number":356,"context_line":"    \u0027block_device_mapping_v2\u0027][\u0027items\u0027]["}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_3f95ee32","line":353,"range":{"start_line":352,"start_character":44,"end_line":353,"end_character":50},"in_reply_to":"3f79a3b5_d7495366","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":354,"context_line":"base_create_v267 \u003d copy.deepcopy(base_create_v263)"},{"line_number":355,"context_line":"base_create_v267[\u0027properties\u0027][\u0027server\u0027][\u0027properties\u0027]["},{"line_number":356,"context_line":"    \u0027block_device_mapping_v2\u0027][\u0027items\u0027]["},{"line_number":357,"context_line":"    \u0027properties\u0027][\u0027volume_type\u0027] \u003d parameter_types.volume_type"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"base_update \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f261fd39","line":357,"range":{"start_line":357,"start_character":19,"end_line":357,"end_character":30},"updated":"2018-09-26 14:16:57.000000000","message":"The API reference needs to be updated for this, like this:\n\nhttps://github.com/openstack/nova/blob/ebab3adb2849c17ebb0249277da89d0d8111e591/api-ref/source/parameters.yaml#L2216","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":354,"context_line":"base_create_v267 \u003d copy.deepcopy(base_create_v263)"},{"line_number":355,"context_line":"base_create_v267[\u0027properties\u0027][\u0027server\u0027][\u0027properties\u0027]["},{"line_number":356,"context_line":"    \u0027block_device_mapping_v2\u0027][\u0027items\u0027]["},{"line_number":357,"context_line":"    \u0027properties\u0027][\u0027volume_type\u0027] \u003d parameter_types.volume_type"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"base_update \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_bf7c9eb6","line":357,"range":{"start_line":357,"start_character":19,"end_line":357,"end_character":30},"in_reply_to":"3f79a3b5_f261fd39","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/api/validation/parameter_types.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c6ec6007153bdcf20ff821663494ea24c5844a09","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_e4239ba9","line":380,"range":{"start_line":380,"start_character":43,"end_line":380,"end_character":59},"updated":"2018-09-25 13:19:32.000000000","message":"The volume name in the Cinder API isn\u0027t match Nova name format I think.\n\nYou can find the nova name validation at https://github.com/openstack/nova/blob/master/nova/api/validation/validators.py#L110\n\nThe cinder name validation at https://github.com/openstack/cinder/blob/master/cinder/api/validation/validators.py#L136","commit_id":"74b305d94000e6cd0c1d16cca74bb3b303b80451"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"97ad5ac2b018bedef7e466da28fd42db1294c1a0","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_5b733e4f","line":380,"range":{"start_line":380,"start_character":43,"end_line":380,"end_character":59},"in_reply_to":"3f79a3b5_e4239ba9","updated":"2018-09-26 00:58:28.000000000","message":"Yes, this parameter should be consistent with cinder, I will change it.","commit_id":"74b305d94000e6cd0c1d16cca74bb3b303b80451"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027volume_name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_3624500e","line":380,"range":{"start_line":380,"start_character":53,"end_line":380,"end_character":66},"updated":"2018-09-26 09:26:11.000000000","message":"I\u0027d say volume_type_name","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027volume_name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_863733ff","line":380,"range":{"start_line":380,"start_character":53,"end_line":380,"end_character":66},"in_reply_to":"3f79a3b5_3624500e","updated":"2018-09-26 11:42:55.000000000","message":"In Cinder, the name is \u0027format\u0027: \u0027name\u0027. I think it is more appropriate to use \"volume_name\" here. If you need to verify the Cinder\u0027s volume name, you can use this variable directly. Maybe you have other considerations?","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027volume_name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_1f57d229","line":380,"range":{"start_line":380,"start_character":53,"end_line":380,"end_character":66},"in_reply_to":"3f79a3b5_5c056a14","updated":"2018-09-27 10:14:35.000000000","message":"Remove this, and replace it with other ones, like:\nvolume_type \u003d {\n    \u0027anyOf\u0027: [\n        {\u0027type\u0027: \u0027string\u0027, \u0027format\u0027: \u0027uuid\u0027},\n        {\u0027type\u0027: [\u0027string\u0027, \u0027null\u0027], \u0027minLength\u0027: 0, \u0027maxLength\u0027: 255}\n    ]\n}\n\nallow None.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":377,"context_line":"volume_type \u003d {"},{"line_number":378,"context_line":"    \u0027type\u0027: \u0027string\u0027,"},{"line_number":379,"context_line":"    \u0027oneOf\u0027: ["},{"line_number":380,"context_line":"        {\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255, \u0027format\u0027: \u0027volume_name\u0027},"},{"line_number":381,"context_line":"        {\u0027format\u0027: \u0027uuid\u0027}"},{"line_number":382,"context_line":"    ]"},{"line_number":383,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_5c056a14","line":380,"range":{"start_line":380,"start_character":53,"end_line":380,"end_character":66},"in_reply_to":"3f79a3b5_863733ff","updated":"2018-09-26 14:16:57.000000000","message":"It\u0027s not the volume name though, it\u0027s the name of the volume type. So agree with Kevin that volume_type_name is better.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/api/validation/validators.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027volume_name\u0027, exception.InvalidName)"},{"line_number":124,"context_line":"def _validate_volume_name(param_value):"},{"line_number":125,"context_line":"    if not param_value:"},{"line_number":126,"context_line":"        msg \u003d _(\"The \u0027name\u0027 can not be None.\")"},{"line_number":127,"context_line":"        raise exception.InvalidName(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_d7ce33b6","line":124,"updated":"2018-09-26 14:16:57.000000000","message":"I\u0027m not sure why we need this if we\u0027re already checking \"{\u0027minLength\u0027: 1, \u0027maxLength\u0027: 255}\" so name cannot be None/\u0027\u0027 because that would violate the minLength schema.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"@jsonschema.FormatChecker.cls_checks(\u0027volume_name\u0027, exception.InvalidName)"},{"line_number":124,"context_line":"def _validate_volume_name(param_value):"},{"line_number":125,"context_line":"    if not param_value:"},{"line_number":126,"context_line":"        msg \u003d _(\"The \u0027name\u0027 can not be None.\")"},{"line_number":127,"context_line":"        raise exception.InvalidName(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_e03836cc","line":124,"in_reply_to":"3f79a3b5_d7ce33b6","updated":"2018-09-27 10:14:35.000000000","message":"Remove this.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/block_device.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c6ec6007153bdcf20ff821663494ea24c5844a09","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                if not (image_uuid_specified and boot_index \u003d\u003d 0):"},{"line_number":198,"context_line":"                    raise exception.InvalidBDMFormat("},{"line_number":199,"context_line":"                        details\u003d_(\"Mapping image to local is not supported.\"))"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            # if this bdm is generated from --volume, use the default volume"},{"line_number":202,"context_line":"            # type of this volume."},{"line_number":203,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a4c7e398","line":200,"updated":"2018-09-25 13:19:32.000000000","message":"I thought you should have some validation like only can specify volume type when the destination type is volume.","commit_id":"74b305d94000e6cd0c1d16cca74bb3b303b80451"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"97ad5ac2b018bedef7e466da28fd42db1294c1a0","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                if not (image_uuid_specified and boot_index \u003d\u003d 0):"},{"line_number":198,"context_line":"                    raise exception.InvalidBDMFormat("},{"line_number":199,"context_line":"                        details\u003d_(\"Mapping image to local is not supported.\"))"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            # if this bdm is generated from --volume, use the default volume"},{"line_number":202,"context_line":"            # type of this volume."},{"line_number":203,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_1b8b8617","line":200,"in_reply_to":"3f79a3b5_a4c7e398","updated":"2018-09-26 00:58:28.000000000","message":"Yeah, lgtm.","commit_id":"74b305d94000e6cd0c1d16cca74bb3b303b80451"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise exception.InvalidBDMFormat(details\u003d_(\"Mapping volume \""},{"line_number":203,"context_line":"                        \"type to local is not supported.\"))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            # if this bdm is generated from --volume, use the default volume"},{"line_number":206,"context_line":"            # type of this volume."},{"line_number":207,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"},{"line_number":208,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":209,"context_line":"                    details\u003d_(\"Specifying volume type to volume is not \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_166ef42b","line":206,"range":{"start_line":205,"start_character":11,"end_line":206,"end_character":34},"updated":"2018-09-26 09:26:11.000000000","message":"I\u0027d say this is not accurate, we are not using the \"default\" type of the volume, we are using the type of the volume as we have no other choice.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                raise exception.InvalidBDMFormat(details\u003d_(\"Mapping volume \""},{"line_number":203,"context_line":"                        \"type to local is not supported.\"))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            # if this bdm is generated from --volume, use the default volume"},{"line_number":206,"context_line":"            # type of this volume."},{"line_number":207,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"},{"line_number":208,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":209,"context_line":"                    details\u003d_(\"Specifying volume type to volume is not \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_a6e90f80","line":206,"range":{"start_line":205,"start_character":11,"end_line":206,"end_character":34},"in_reply_to":"3f79a3b5_166ef42b","updated":"2018-09-26 11:42:55.000000000","message":"Yeah, change it like:\"if this bdm is generated from --volume, use the type of the volume.\"","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            # type of this volume."},{"line_number":207,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"},{"line_number":208,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":209,"context_line":"                    details\u003d_(\"Specifying volume type to volume is not \""},{"line_number":210,"context_line":"                              \"supported.\"))"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        api_dict.pop(\u0027uuid\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_d6615c3a","line":209,"range":{"start_line":209,"start_character":53,"end_line":209,"end_character":64},"updated":"2018-09-26 09:26:11.000000000","message":"to existing volume","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            # type of this volume."},{"line_number":207,"context_line":"            if source_type \u003d\u003d \u0027volume\u0027 and volume_type:"},{"line_number":208,"context_line":"                raise exception.InvalidBDMFormat("},{"line_number":209,"context_line":"                    details\u003d_(\"Specifying volume type to volume is not \""},{"line_number":210,"context_line":"                              \"supported.\"))"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        api_dict.pop(\u0027uuid\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_46527b6a","line":209,"range":{"start_line":209,"start_character":53,"end_line":209,"end_character":64},"in_reply_to":"3f79a3b5_d6615c3a","updated":"2018-09-26 11:42:55.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":106,"context_line":"MIN_COMPUTE_MULTIATTACH \u003d 27"},{"line_number":107,"context_line":"MIN_COMPUTE_TRUSTED_CERTS \u003d 31"},{"line_number":108,"context_line":"MIN_COMPUTE_ABORT_QUEUED_LIVE_MIGRATION \u003d 34"},{"line_number":109,"context_line":"VOLUME_TYPE_MIN_COMPUTE_VERSION \u003d 52"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# FIXME(danms): Keep a global cache of the cells we find the"},{"line_number":112,"context_line":"# first time we look. This needs to be refreshed on a timer or"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_b282a5c6","line":109,"updated":"2018-09-26 14:16:57.000000000","message":"You didn\u0027t actually update the compute RPC API version:\n\nhttps://github.com/openstack/nova/blob/ebab3adb2849c17ebb0249277da89d0d8111e591/nova/objects/service.py#L34\n\nI have no idea where you got that \"54\" value.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"MIN_COMPUTE_MULTIATTACH \u003d 27"},{"line_number":107,"context_line":"MIN_COMPUTE_TRUSTED_CERTS \u003d 31"},{"line_number":108,"context_line":"MIN_COMPUTE_ABORT_QUEUED_LIVE_MIGRATION \u003d 34"},{"line_number":109,"context_line":"VOLUME_TYPE_MIN_COMPUTE_VERSION \u003d 52"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# FIXME(danms): Keep a global cache of the cells we find the"},{"line_number":112,"context_line":"# first time we look. This needs to be refreshed on a timer or"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c0c2da86","line":109,"in_reply_to":"3f79a3b5_b282a5c6","updated":"2018-09-27 10:14:35.000000000","message":"I think I want to set this \"35\", from this: https://github.com/openstack/cinder/blob/master/cinder/api/schemas/volumes.py#L45\n\nSplit this to another path（Maybe need to wait this patch done, then execute \"git review -x\" to build dependence）: https://review.openstack.org/#/c/605573/","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"        return certs_to_return"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _get_bdm_image_metadata(self, context, block_device_mapping,"},{"line_number":1052,"context_line":"                                legacy_bdm\u003dTrue):"},{"line_number":1053,"context_line":"        \"\"\"If we are booting from a volume, we need to get the"},{"line_number":1054,"context_line":"        volume details from Cinder and make sure we pass the"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_3713e703","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":31},"updated":"2018-09-26 14:16:57.000000000","message":"This doesn\u0027t really seem like the correct method to add this validation; this method is meant to get the bootable volume\u0027s image metadata. The validation for the volume type should probably (1) go in a new private method and (2) be called from _validate_bdm. (1) is to avoid making these already large and complicated methods even larger and more complicated. (2) is because that\u0027s where we validate requested bdms, as the name suggests.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"        return certs_to_return"},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"    def _get_bdm_image_metadata(self, context, block_device_mapping,"},{"line_number":1052,"context_line":"                                legacy_bdm\u003dTrue):"},{"line_number":1053,"context_line":"        \"\"\"If we are booting from a volume, we need to get the"},{"line_number":1054,"context_line":"        volume details from Cinder and make sure we pass the"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_80a9427d","line":1051,"range":{"start_line":1051,"start_character":8,"end_line":1051,"end_character":31},"in_reply_to":"3f79a3b5_3713e703","updated":"2018-09-27 10:14:35.000000000","message":"Creating a new method to check the availability of the ``volume_type``, and will be called in _validate_bdm.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"                continue"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"            volume_type \u003d bdm.get(\u0027volume_type\u0027)"},{"line_number":1069,"context_line":"            if volume_type:"},{"line_number":1070,"context_line":"                try:"},{"line_number":1071,"context_line":"                    # NOTE(Brin Zhang): Verify that the specified volume"},{"line_number":1072,"context_line":"                    # type exists. And save the volume type name in the"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f7bb2fe1","line":1069,"updated":"2018-09-26 14:16:57.000000000","message":"Since we\u0027re looping over a potentially large list of requested BDMs where more than one could be requested the same volume type, you should map the results you found so we at most lookup a requested volume type once per request.\n\nIn fact, I would suggest breaking this validation out into a separate change in the series since it\u0027s fairly complicated and will have quite a few test scenarios involved, especially when you including caching the results per requested volume type.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                    # type exists. And save the volume type name in the"},{"line_number":1073,"context_line":"                    # block_device_mapping table."},{"line_number":1074,"context_line":"                    if uuidutils.is_uuid_like(volume_type):"},{"line_number":1075,"context_line":"                        vol_types \u003d self.volume_api.get_volume_type("},{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_57cc6389","line":1075,"range":{"start_line":1075,"start_character":32,"end_line":1075,"end_character":33},"updated":"2018-09-26 14:16:57.000000000","message":"drop the s, this is a singular item, not plural","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":1071,"context_line":"                    # NOTE(Brin Zhang): Verify that the specified volume"},{"line_number":1072,"context_line":"                    # type exists. And save the volume type name in the"},{"line_number":1073,"context_line":"                    # block_device_mapping table."},{"line_number":1074,"context_line":"                    if uuidutils.is_uuid_like(volume_type):"},{"line_number":1075,"context_line":"                        vol_types \u003d self.volume_api.get_volume_type("},{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"},{"line_number":1079,"context_line":"                        volume_types \u003d self.volume_api.get_all_volume_types("},{"line_number":1080,"context_line":"                            context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_56d22cd1","line":1077,"range":{"start_line":1074,"start_character":19,"end_line":1077,"end_character":62},"updated":"2018-09-26 09:26:11.000000000","message":"maybe you should try again with name in this case, as someone may have a uuid-like name, it is rare, but possible.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":1071,"context_line":"                    # NOTE(Brin Zhang): Verify that the specified volume"},{"line_number":1072,"context_line":"                    # type exists. And save the volume type name in the"},{"line_number":1073,"context_line":"                    # block_device_mapping table."},{"line_number":1074,"context_line":"                    if uuidutils.is_uuid_like(volume_type):"},{"line_number":1075,"context_line":"                        vol_types \u003d self.volume_api.get_volume_type("},{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"},{"line_number":1079,"context_line":"                        volume_types \u003d self.volume_api.get_all_volume_types("},{"line_number":1080,"context_line":"                            context)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_e661473a","line":1077,"range":{"start_line":1074,"start_character":19,"end_line":1077,"end_character":62},"in_reply_to":"3f79a3b5_56d22cd1","updated":"2018-09-26 11:42:55.000000000","message":"Yeah, good catch. This need a \"try...except\".","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"},{"line_number":1079,"context_line":"                        volume_types \u003d self.volume_api.get_all_volume_types("},{"line_number":1080,"context_line":"                            context)"},{"line_number":1081,"context_line":"                        for vol_type in volume_types:"},{"line_number":1082,"context_line":"                            if volume_type \u003d\u003d vol_type[\u0027name\u0027]:"},{"line_number":1083,"context_line":"                                break"},{"line_number":1084,"context_line":"                        else:"},{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_16f59451","line":1083,"range":{"start_line":1079,"start_character":24,"end_line":1083,"end_character":37},"updated":"2018-09-26 09:26:11.000000000","message":"maybe we should have a get volume_type by name function in Cinder.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"},{"line_number":1079,"context_line":"                        volume_types \u003d self.volume_api.get_all_volume_types("},{"line_number":1080,"context_line":"                            context)"},{"line_number":1081,"context_line":"                        for vol_type in volume_types:"},{"line_number":1082,"context_line":"                            if volume_type \u003d\u003d vol_type[\u0027name\u0027]:"},{"line_number":1083,"context_line":"                                break"},{"line_number":1084,"context_line":"                        else:"},{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_e61387b6","line":1083,"range":{"start_line":1079,"start_character":24,"end_line":1083,"end_character":37},"in_reply_to":"3f79a3b5_16f59451","updated":"2018-09-26 11:42:55.000000000","message":"Yeah, now, in Cinder only can get volume_type by id https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/volume_types.py#L107.\n\nI think this can be handled first in this way, followed by a function that gets the volume_type by name (if there is time, I can do this patch later), and then optimize it again, what do you think?","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                            context, volume_type)"},{"line_number":1077,"context_line":"                        bdm[\u0027volume_type\u0027] \u003d vol_types[\u0027name\u0027]"},{"line_number":1078,"context_line":"                    else:"},{"line_number":1079,"context_line":"                        volume_types \u003d self.volume_api.get_all_volume_types("},{"line_number":1080,"context_line":"                            context)"},{"line_number":1081,"context_line":"                        for vol_type in volume_types:"},{"line_number":1082,"context_line":"                            if volume_type \u003d\u003d vol_type[\u0027name\u0027]:"},{"line_number":1083,"context_line":"                                break"},{"line_number":1084,"context_line":"                        else:"},{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_17a90b7b","line":1083,"range":{"start_line":1079,"start_character":24,"end_line":1083,"end_character":37},"in_reply_to":"3f79a3b5_e61387b6","updated":"2018-09-26 14:16:57.000000000","message":"The API reference for listing volume types mentions a few filtering parameters:\n\nhttps://developer.openstack.org/api-ref/block-storage/v3/#list-all-volume-types\n\nBut mostly just for paging. And the API reference also doesn\u0027t mention a few others that the client supports like is_public and all_tenants:\n\nhttps://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/volume_types.py#L85\n\nBut that doesn\u0027t really matter to us here. What we\u0027d need is a filter on volume type name to list volume types with a name, or name substring. Since we don\u0027t have that today, the best we can do if given a non-uuid-like name is to list volume types (once per server create request to optimize) and then lookup the name in that list.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"                            if volume_type \u003d\u003d vol_type[\u0027name\u0027]:"},{"line_number":1083,"context_line":"                                break"},{"line_number":1084,"context_line":"                        else:"},{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"},{"line_number":1087,"context_line":"                            raise exception.InvalidBDMVolumeType("},{"line_number":1088,"context_line":"                                id\u003dvolume_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f7056f7a","line":1085,"range":{"start_line":1085,"start_character":54,"end_line":1085,"end_character":55},"updated":"2018-09-26 14:16:57.000000000","message":"drop the s","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"                            if volume_type \u003d\u003d vol_type[\u0027name\u0027]:"},{"line_number":1083,"context_line":"                                break"},{"line_number":1084,"context_line":"                        else:"},{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"},{"line_number":1087,"context_line":"                            raise exception.InvalidBDMVolumeType("},{"line_number":1088,"context_line":"                                id\u003dvolume_type)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_439ed469","line":1085,"range":{"start_line":1085,"start_character":54,"end_line":1085,"end_character":55},"in_reply_to":"3f79a3b5_f7056f7a","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3eddb90db0d58f83d492820125c4c5af6a5f22aa","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"},{"line_number":1087,"context_line":"                            raise exception.InvalidBDMVolumeType("},{"line_number":1088,"context_line":"                                id\u003dvolume_type)"},{"line_number":1089,"context_line":"                except exception.CinderConnectionFailed:"},{"line_number":1090,"context_line":"                    raise"},{"line_number":1091,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_56fb0c47","line":1088,"range":{"start_line":1088,"start_character":32,"end_line":1088,"end_character":46},"updated":"2018-09-26 09:26:11.000000000","message":"maybe use \"id_or_name\" as this might be misleading since it is name in this case.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bd8e14658ad17bdd7f1c92f6c2cda8326c6d9399","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                            LOG.debug(\"The volume types %s is not invalid.\","},{"line_number":1086,"context_line":"                                      volume_type)"},{"line_number":1087,"context_line":"                            raise exception.InvalidBDMVolumeType("},{"line_number":1088,"context_line":"                                id\u003dvolume_type)"},{"line_number":1089,"context_line":"                except exception.CinderConnectionFailed:"},{"line_number":1090,"context_line":"                    raise"},{"line_number":1091,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_860ad376","line":1088,"range":{"start_line":1088,"start_character":32,"end_line":1088,"end_character":46},"in_reply_to":"3f79a3b5_56fb0c47","updated":"2018-09-26 11:42:55.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"                except exception.CinderConnectionFailed:"},{"line_number":1090,"context_line":"                    raise"},{"line_number":1091,"context_line":"                except Exception:"},{"line_number":1092,"context_line":"                    LOG.error(\"Failed to get volume types %s.\", volume_type)"},{"line_number":1093,"context_line":"                    raise exception.InvalidGetVolumeTypes("},{"line_number":1094,"context_line":"                        volume_type\u003dvolume_type)"},{"line_number":1095,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_97319b5c","line":1092,"range":{"start_line":1092,"start_character":56,"end_line":1092,"end_character":57},"updated":"2018-09-26 14:16:57.000000000","message":"drop the s","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"                except exception.CinderConnectionFailed:"},{"line_number":1090,"context_line":"                    raise"},{"line_number":1091,"context_line":"                except Exception:"},{"line_number":1092,"context_line":"                    LOG.error(\"Failed to get volume types %s.\", volume_type)"},{"line_number":1093,"context_line":"                    raise exception.InvalidGetVolumeTypes("},{"line_number":1094,"context_line":"                        volume_type\u003dvolume_type)"},{"line_number":1095,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_0338dceb","line":1092,"range":{"start_line":1092,"start_character":56,"end_line":1092,"end_character":57},"in_reply_to":"3f79a3b5_97319b5c","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"            snapshot_id \u003d bdm.snapshot_id"},{"line_number":1416,"context_line":"            volume_id \u003d bdm.volume_id"},{"line_number":1417,"context_line":"            image_id \u003d bdm.image_id"},{"line_number":1418,"context_line":"            if (image_id is not None and"},{"line_number":1419,"context_line":"                    image_id !\u003d instance.get(\u0027image_ref\u0027)):"},{"line_number":1420,"context_line":"                try:"},{"line_number":1421,"context_line":"                    self._get_image(context, image_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_b2dce545","line":1418,"updated":"2018-09-26 14:16:57.000000000","message":"You\u0027ll need to have a volume_type min compute version check for source_type\u003dimage.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"            snapshot_id \u003d bdm.snapshot_id"},{"line_number":1416,"context_line":"            volume_id \u003d bdm.volume_id"},{"line_number":1417,"context_line":"            image_id \u003d bdm.image_id"},{"line_number":1418,"context_line":"            if (image_id is not None and"},{"line_number":1419,"context_line":"                    image_id !\u003d instance.get(\u0027image_ref\u0027)):"},{"line_number":1420,"context_line":"                try:"},{"line_number":1421,"context_line":"                    self._get_image(context, image_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_061f8a5b","line":1418,"in_reply_to":"3f79a3b5_b2dce545","updated":"2018-09-27 10:14:35.000000000","message":"I think this should be deal with in another patch(https://review.openstack.org/#/c/605573/),after I did th compute rpc api version bump and virt block device changes.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"                    if \u0027attachment_id\u0027 not in bdm:"},{"line_number":1442,"context_line":"                        bdm.attachment_id \u003d None"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"                    # NOTE(Brin Zhang): If we are using volume, update the"},{"line_number":1445,"context_line":"                    # volume type of the current volume to the"},{"line_number":1446,"context_line":"                    # BlockDeviceMapping object(bdm[\u0027volume_type\u0027])"},{"line_number":1447,"context_line":"                    bdm.volume_type \u003d volume.get(\u0027volume_type\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f25fbde1","line":1444,"updated":"2018-09-26 14:16:57.000000000","message":"I\u0027m not sure that we need this? I was thinking the bdm.volume_type (that nova persists) would just be whatever the user requested, so if it\u0027s None it means they didn\u0027t request anything. I don\u0027t really want to try and keep this current and reflect what is in Cinder\u0027s DB because that means we also need to update it if we do things like retype the volume. Beyond the initial server create where nova-compute creates the volume, I don\u0027t think there is any use for the volume type.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"                    if \u0027attachment_id\u0027 not in bdm:"},{"line_number":1442,"context_line":"                        bdm.attachment_id \u003d None"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"                    # NOTE(Brin Zhang): If we are using volume, update the"},{"line_number":1445,"context_line":"                    # volume type of the current volume to the"},{"line_number":1446,"context_line":"                    # BlockDeviceMapping object(bdm[\u0027volume_type\u0027])"},{"line_number":1447,"context_line":"                    bdm.volume_type \u003d volume.get(\u0027volume_type\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c32184b7","line":1444,"in_reply_to":"3f79a3b5_f25fbde1","updated":"2018-09-27 10:14:35.000000000","message":"Remove this.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                    raise exception.InvalidVolume(reason\u003dexc.format_message())"},{"line_number":1455,"context_line":"                except Exception:"},{"line_number":1456,"context_line":"                    raise exception.InvalidBDMVolume(id\u003dvolume_id)"},{"line_number":1457,"context_line":"            elif snapshot_id is not None:"},{"line_number":1458,"context_line":"                try:"},{"line_number":1459,"context_line":"                    snap \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":1460,"context_line":"                    bdm.volume_size \u003d bdm.volume_size or snap.get(\u0027size\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f2d25d33","line":1457,"updated":"2018-09-26 14:16:57.000000000","message":"You\u0027ll need to have a volume_type min compute version check for source_type\u003dsnapshot.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1454,"context_line":"                    raise exception.InvalidVolume(reason\u003dexc.format_message())"},{"line_number":1455,"context_line":"                except Exception:"},{"line_number":1456,"context_line":"                    raise exception.InvalidBDMVolume(id\u003dvolume_id)"},{"line_number":1457,"context_line":"            elif snapshot_id is not None:"},{"line_number":1458,"context_line":"                try:"},{"line_number":1459,"context_line":"                    snap \u003d self.volume_api.get_snapshot(context, snapshot_id)"},{"line_number":1460,"context_line":"                    bdm.volume_size \u003d bdm.volume_size or snap.get(\u0027size\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_464a625b","line":1457,"in_reply_to":"3f79a3b5_f2d25d33","updated":"2018-09-27 10:14:35.000000000","message":"I think this should be deal with in another patch(https://review.openstack.org/#/c/605573/),after I did th compute rpc api version bump and virt block device changes.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1462,"context_line":"                    raise"},{"line_number":1463,"context_line":"                except Exception:"},{"line_number":1464,"context_line":"                    raise exception.InvalidBDMSnapshot(id\u003dsnapshot_id)"},{"line_number":1465,"context_line":"            elif (bdm.source_type \u003d\u003d \u0027blank\u0027 and"},{"line_number":1466,"context_line":"                    bdm.destination_type \u003d\u003d \u0027volume\u0027 and"},{"line_number":1467,"context_line":"                    not bdm.volume_size):"},{"line_number":1468,"context_line":"                raise exception.InvalidBDM(message\u003d_(\"Blank volumes \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_92d9a957","line":1465,"updated":"2018-09-26 14:16:57.000000000","message":"You\u0027ll need to have a volume_type min compute version check for source_type\u003dblank.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":1462,"context_line":"                    raise"},{"line_number":1463,"context_line":"                except Exception:"},{"line_number":1464,"context_line":"                    raise exception.InvalidBDMSnapshot(id\u003dsnapshot_id)"},{"line_number":1465,"context_line":"            elif (bdm.source_type \u003d\u003d \u0027blank\u0027 and"},{"line_number":1466,"context_line":"                    bdm.destination_type \u003d\u003d \u0027volume\u0027 and"},{"line_number":1467,"context_line":"                    not bdm.volume_size):"},{"line_number":1468,"context_line":"                raise exception.InvalidBDM(message\u003d_(\"Blank volumes \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_06546afd","line":1465,"in_reply_to":"3f79a3b5_92d9a957","updated":"2018-09-27 10:14:35.000000000","message":"I think this should be deal with in another patch(https://review.openstack.org/#/c/605573/),after I did th compute rpc api version bump and virt block device changes.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":4007,"context_line":"                    min_compute_version \u003c MIN_COMPUTE_MULTIATTACH):"},{"line_number":4008,"context_line":"                raise exception.MultiattachSupportNotYetAvailable()"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"            # Check to see if the computes have been upgraded to support"},{"line_number":4011,"context_line":"            # booting with specified a volume type."},{"line_number":4012,"context_line":"            if (volume[\u0027volume_type\u0027] and"},{"line_number":4013,"context_line":"                    min_compute_version \u003c VOLUME_TYPE_MIN_COMPUTE_VERSION):"},{"line_number":4014,"context_line":"                raise exception.VolumeTypeNotYetAvailable()"},{"line_number":4015,"context_line":""},{"line_number":4016,"context_line":"        if min_compute_version \u003e\u003d CINDER_V3_ATTACH_MIN_COMPUTE_VERSION:"},{"line_number":4017,"context_line":"            # Attempt a new style volume attachment, but fallback to old-style"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_72f08ddb","line":4014,"range":{"start_line":4010,"start_character":12,"end_line":4014,"end_character":59},"updated":"2018-09-26 14:16:57.000000000","message":"This check isn\u0027t in the correct method. This method is checking for an existing volume being used, which is not what we care about. We need to check the min version when the user is requesting to boot from volume with volume_type specified by source_type is blank/image/snapshot where nova-compute will create the volume using the requested type.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":4007,"context_line":"                    min_compute_version \u003c MIN_COMPUTE_MULTIATTACH):"},{"line_number":4008,"context_line":"                raise exception.MultiattachSupportNotYetAvailable()"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"            # Check to see if the computes have been upgraded to support"},{"line_number":4011,"context_line":"            # booting with specified a volume type."},{"line_number":4012,"context_line":"            if (volume[\u0027volume_type\u0027] and"},{"line_number":4013,"context_line":"                    min_compute_version \u003c VOLUME_TYPE_MIN_COMPUTE_VERSION):"},{"line_number":4014,"context_line":"                raise exception.VolumeTypeNotYetAvailable()"},{"line_number":4015,"context_line":""},{"line_number":4016,"context_line":"        if min_compute_version \u003e\u003d CINDER_V3_ATTACH_MIN_COMPUTE_VERSION:"},{"line_number":4017,"context_line":"            # Attempt a new style volume attachment, but fallback to old-style"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_669bdec7","line":4014,"range":{"start_line":4010,"start_character":12,"end_line":4014,"end_character":59},"in_reply_to":"3f79a3b5_72f08ddb","updated":"2018-09-27 10:14:35.000000000","message":"Yeah, this method is not available. Remove this.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"f717c3ee2ded87db4317a8c0e569b053c4a756c1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"MIN_COMPUTE_MULTIATTACH \u003d 27"},{"line_number":107,"context_line":"MIN_COMPUTE_TRUSTED_CERTS \u003d 31"},{"line_number":108,"context_line":"MIN_COMPUTE_ABORT_QUEUED_LIVE_MIGRATION \u003d 34"},{"line_number":109,"context_line":"VOLUME_TYPE_MIN_COMPUTE_VERSION \u003d 52"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# FIXME(danms): Keep a global cache of the cells we find the"},{"line_number":112,"context_line":"# first time we look. This needs to be refreshed on a timer or"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_0b3b1c39","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":36},"updated":"2018-09-27 02:57:39.000000000","message":"why do we need this? seems there are no changes in compute manager now? this is only used if we have something new done in the compute manager.","commit_id":"d0b632f7a3a82b71990be1f8046b6be14e11ba70"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"MIN_COMPUTE_MULTIATTACH \u003d 27"},{"line_number":107,"context_line":"MIN_COMPUTE_TRUSTED_CERTS \u003d 31"},{"line_number":108,"context_line":"MIN_COMPUTE_ABORT_QUEUED_LIVE_MIGRATION \u003d 34"},{"line_number":109,"context_line":"VOLUME_TYPE_MIN_COMPUTE_VERSION \u003d 52"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# FIXME(danms): Keep a global cache of the cells we find the"},{"line_number":112,"context_line":"# first time we look. This needs to be refreshed on a timer or"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e988286c","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":36},"in_reply_to":"3f79a3b5_0b3b1c39","updated":"2018-09-27 10:14:35.000000000","message":"Remove this change in this patch, you can review this in https://review.openstack.org/#/c/605573/","commit_id":"d0b632f7a3a82b71990be1f8046b6be14e11ba70"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a88fd9a94b99d1a599a9e763e67bf81f3f3b1189","unresolved":false,"context_lines":[{"line_number":4070,"context_line":"            self.volume_api.reserve_volume(context, volume_id)"},{"line_number":4071,"context_line":""},{"line_number":4072,"context_line":"        # TODO (Brin Zhang): Compare min_compute_version and"},{"line_number":4073,"context_line":"        # CINDER_V3_VOLUME_TYPE_MIN_COMPUTE_VERSION"},{"line_number":4074,"context_line":""},{"line_number":4075,"context_line":"    def _attach_volume(self, context, instance, volume, device,"},{"line_number":4076,"context_line":"                       disk_bus, device_type, tag\u003dNone,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_b7e93780","line":4073,"range":{"start_line":4073,"start_character":10,"end_line":4073,"end_character":51},"updated":"2018-09-26 13:47:21.000000000","message":"I want to know which number to select? Anyone have some suggestions?","commit_id":"d0b632f7a3a82b71990be1f8046b6be14e11ba70"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bac9cd8c06135ce7f13c86b5a09afea1b16ba2ef","unresolved":false,"context_lines":[{"line_number":106,"context_line":"MIN_COMPUTE_MULTIATTACH \u003d 27"},{"line_number":107,"context_line":"MIN_COMPUTE_TRUSTED_CERTS \u003d 31"},{"line_number":108,"context_line":"MIN_COMPUTE_ABORT_QUEUED_LIVE_MIGRATION \u003d 34"},{"line_number":109,"context_line":"VOLUME_TYPE_MIN_COMPUTE_VERSION \u003d 52"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# FIXME(danms): Keep a global cache of the cells we find the"},{"line_number":112,"context_line":"# first time we look. This needs to be refreshed on a timer or"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_a9e8e9de","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":36},"updated":"2018-09-27 10:20:37.000000000","message":"Remove this in next patch.","commit_id":"07068934af15ab12ed314a43556694353cc85ef1"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"bac9cd8c06135ce7f13c86b5a09afea1b16ba2ef","unresolved":false,"context_lines":[{"line_number":1453,"context_line":"                    #               all calls to reserve_volume are gone."},{"line_number":1454,"context_line":"                    if \u0027attachment_id\u0027 not in bdm:"},{"line_number":1455,"context_line":"                        bdm.attachment_id \u003d None"},{"line_number":1456,"context_line":""},{"line_number":1457,"context_line":"                except (exception.CinderConnectionFailed,"},{"line_number":1458,"context_line":"                        exception.InvalidVolume,"},{"line_number":1459,"context_line":"                        exception.MultiattachNotSupportedOldMicroversion,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_29b619fb","line":1456,"updated":"2018-09-27 10:20:37.000000000","message":"ditto","commit_id":"07068934af15ab12ed314a43556694353cc85ef1"}],"nova/db/sqlalchemy/migrate_repo/versions/391_add_volume_type_to_bdm_and_snapshots.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6095fb2c977847f8e343a15555ef67d23288ef8a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    shadow_prefix \u003d api._SHADOW_TABLE_PREFIX"},{"line_number":29,"context_line":"    volume_type \u003d Column(\u0027volume_type\u0027, String(36))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    bdm \u003d utils.get_table(migrate_engine, \u0027block_device_mapping\u0027)"},{"line_number":32,"context_line":"    if not hasattr(bdm.c, \u0027volume_type\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_0a684420","line":29,"range":{"start_line":29,"start_character":47,"end_line":29,"end_character":49},"updated":"2018-09-23 22:23:04.000000000","message":"volume type names in cinder can be up to 255 characters:\n\nhttps://github.com/openstack/cinder/blob/5a42ec3631e9e430129c2526191d3273cd72271b/cinder/db/sqlalchemy/models.py#L384\n\nYou\u0027re copying the volumes.volume_type field from cinder, but that\u0027s 36 because it\u0027s referencing a volume type id which is a uuid, but that\u0027s not what nova is going to get.","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"f03aa7ee65cb1d0adda28eb33a2f6ed867eeae43","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    shadow_prefix \u003d api._SHADOW_TABLE_PREFIX"},{"line_number":29,"context_line":"    volume_type \u003d Column(\u0027volume_type\u0027, String(36))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    bdm \u003d utils.get_table(migrate_engine, \u0027block_device_mapping\u0027)"},{"line_number":32,"context_line":"    if not hasattr(bdm.c, \u0027volume_type\u0027):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_65a56903","line":29,"range":{"start_line":29,"start_character":47,"end_line":29,"end_character":49},"in_reply_to":"3f79a3b5_0a684420","updated":"2018-09-24 01:38:50.000000000","message":"I want to use uuid (volume_type) as a parameter to pass, but it seems more appropriate to use name in nova.\nSo change this up to 255 characters, consistent with cinder.","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6095fb2c977847f8e343a15555ef67d23288ef8a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if not hasattr(shadow_bdm.c, \u0027volume_type\u0027):"},{"line_number":38,"context_line":"        shadow_bdm.create_column(volume_type.copy())"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    snapshots \u003d utils.get_table(migrate_engine, \u0027%ssnapshots\u0027 % shadow_prefix)"},{"line_number":41,"context_line":"    if not hasattr(snapshots.c, \u0027volume_type\u0027):"},{"line_number":42,"context_line":"        snapshots.create_column(volume_type.copy())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    shadow_snapshots \u003d utils.get_table(migrate_engine,"},{"line_number":45,"context_line":"                                       \u0027%sshadow_snapshots\u0027 % shadow_prefix)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_2a65004a","line":42,"range":{"start_line":40,"start_character":4,"end_line":42,"end_character":51},"updated":"2018-09-23 22:23:04.000000000","message":"There is no snapshots table in nova - again, you\u0027re copying from cinder but that doesn\u0027t work here.","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9db5dee9362911ce1641010e8fd5f8369d095b23","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if not hasattr(shadow_bdm.c, \u0027volume_type\u0027):"},{"line_number":38,"context_line":"        shadow_bdm.create_column(volume_type.copy())"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    snapshots \u003d utils.get_table(migrate_engine, \u0027%ssnapshots\u0027 % shadow_prefix)"},{"line_number":41,"context_line":"    if not hasattr(snapshots.c, \u0027volume_type\u0027):"},{"line_number":42,"context_line":"        snapshots.create_column(volume_type.copy())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    shadow_snapshots \u003d utils.get_table(migrate_engine,"},{"line_number":45,"context_line":"                                       \u0027%sshadow_snapshots\u0027 % shadow_prefix)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_ea6e282b","line":42,"range":{"start_line":40,"start_character":4,"end_line":42,"end_character":51},"in_reply_to":"3f79a3b5_2a65004a","updated":"2018-09-23 22:25:03.000000000","message":"Oh, well I guess there is, but it\u0027s not used.\n\nhttps://github.com/openstack/nova/blob/792cc425f2dd73dad392a5d0488989e818683047/nova/db/sqlalchemy/models.py#L550","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"f03aa7ee65cb1d0adda28eb33a2f6ed867eeae43","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if not hasattr(shadow_bdm.c, \u0027volume_type\u0027):"},{"line_number":38,"context_line":"        shadow_bdm.create_column(volume_type.copy())"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    snapshots \u003d utils.get_table(migrate_engine, \u0027%ssnapshots\u0027 % shadow_prefix)"},{"line_number":41,"context_line":"    if not hasattr(snapshots.c, \u0027volume_type\u0027):"},{"line_number":42,"context_line":"        snapshots.create_column(volume_type.copy())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    shadow_snapshots \u003d utils.get_table(migrate_engine,"},{"line_number":45,"context_line":"                                       \u0027%sshadow_snapshots\u0027 % shadow_prefix)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_c55ebd12","line":42,"range":{"start_line":40,"start_character":4,"end_line":42,"end_character":51},"in_reply_to":"3f79a3b5_ea6e282b","updated":"2018-09-24 01:38:50.000000000","message":"Yeah, the \"class Snapshot\" will be removed, so this changes is invalid.","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64387877f85520a419cf099e017f9918ff748e96","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        snapshots.create_column(volume_type.copy())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    shadow_snapshots \u003d utils.get_table(migrate_engine,"},{"line_number":45,"context_line":"                                       \u0027%sshadow_snapshots\u0027 % shadow_prefix)"},{"line_number":46,"context_line":"    if not hasattr(snapshots.c, \u0027volume_type\u0027):"},{"line_number":47,"context_line":"        shadow_snapshots.create_column(volume_type.copy())"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_4a571c5c","line":45,"range":{"start_line":45,"start_character":41,"end_line":45,"end_character":58},"updated":"2018-09-23 22:27:59.000000000","message":"http://logs.openstack.org/60/579360/6/check/openstack-tox-py27/9424796/job-output.txt.gz#_2018-09-23_08_26_43_021124","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"f03aa7ee65cb1d0adda28eb33a2f6ed867eeae43","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        snapshots.create_column(volume_type.copy())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    shadow_snapshots \u003d utils.get_table(migrate_engine,"},{"line_number":45,"context_line":"                                       \u0027%sshadow_snapshots\u0027 % shadow_prefix)"},{"line_number":46,"context_line":"    if not hasattr(snapshots.c, \u0027volume_type\u0027):"},{"line_number":47,"context_line":"        shadow_snapshots.create_column(volume_type.copy())"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_859685a0","line":45,"range":{"start_line":45,"start_character":41,"end_line":45,"end_character":58},"in_reply_to":"3f79a3b5_4a571c5c","updated":"2018-09-24 01:38:50.000000000","message":"Remove this.","commit_id":"8ae46235ed56c38653899a3bb6a93ad2079b7629"}],"nova/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class InvalidGetVolumeTypes(InvalidBDM):"},{"line_number":208,"context_line":"    msg_fmt \u003d _(\"Failed to get volume types %(volume_type)s.\")"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class InvalidBDMImage(InvalidBDM):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_72de4d3d","line":208,"range":{"start_line":208,"start_character":42,"end_line":208,"end_character":43},"updated":"2018-09-26 14:16:57.000000000","message":"drop the s\n\n--\n\nAlso, how is this exception different from the one above?","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    code \u003d 409"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"class VolumeTypeNotYetAvailable(NovaException):"},{"line_number":291,"context_line":"    # This exception indicates the deployment is not yet new enough to support"},{"line_number":292,"context_line":"    # volume type, so a 409 HTTPConflict response is generally used"},{"line_number":293,"context_line":"    # for handling this in the API."}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_f2bb3de1","line":290,"range":{"start_line":290,"start_character":6,"end_line":290,"end_character":31},"updated":"2018-09-26 14:16:57.000000000","message":"VolumeTypeSupportNotYetAvailable - also, you\u0027re not handling this in the API handler code so if this is raised it would result in a 500 response to the user.\n\nSee how https://github.com/openstack/nova/blob/ebab3adb2849c17ebb0249277da89d0d8111e591/nova/api/openstack/compute/servers.py#L675 is used. You need to do the same and have a test for it.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"nova/objects/service.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b179c710e7faba36893a23e38ca05fb75a5111e1","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    # ports bound early on the destination host using VIFMigrateData."},{"line_number":148,"context_line":"    {\u0027compute_rpc\u0027: \u00275.0\u0027},"},{"line_number":149,"context_line":"    # Version 36: Indicates that nova-compute supports specifying volume"},{"line_number":150,"context_line":"    # type when booting a server."},{"line_number":151,"context_line":"    {\u0027compute_rpc\u0027: \u00275.0\u0027},"},{"line_number":152,"context_line":")"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f79a3b5_1a3f8f22","line":150,"range":{"start_line":150,"start_character":26,"end_line":150,"end_character":32},"updated":"2018-10-01 16:20:32.000000000","message":"nit: volume-backed server","commit_id":"8eaa650322362f7e7d2e290b817819dc671db045"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"f8638d77a05885a1f97613c69281d4ad079311a6","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    # ports bound early on the destination host using VIFMigrateData."},{"line_number":148,"context_line":"    {\u0027compute_rpc\u0027: \u00275.0\u0027},"},{"line_number":149,"context_line":"    # Version 36: Indicates that nova-compute supports specifying volume"},{"line_number":150,"context_line":"    # type when booting a server."},{"line_number":151,"context_line":"    {\u0027compute_rpc\u0027: \u00275.0\u0027},"},{"line_number":152,"context_line":")"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f79a3b5_37f379e9","line":150,"range":{"start_line":150,"start_character":26,"end_line":150,"end_character":32},"in_reply_to":"3f79a3b5_1a3f8f22","updated":"2018-10-02 01:14:56.000000000","message":"Done","commit_id":"8eaa650322362f7e7d2e290b817819dc671db045"}],"nova/tests/unit/virt/test_block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.volume_api.get_snapshot(self.context,"},{"line_number":852,"context_line":"                                     \u0027fake-snapshot-id-1\u0027).AndReturn(snapshot)"},{"line_number":853,"context_line":"        self.volume_api.create(self.context, 3, \u0027\u0027, \u0027\u0027, snapshot,"},{"line_number":854,"context_line":"                               availability_zone\u003dNone,"},{"line_number":855,"context_line":"                               volume_type\u003dNone).AndReturn(volume)"},{"line_number":856,"context_line":"        wait_func(self.context, \u0027fake-volume-id-2\u0027).AndReturn(None)"},{"line_number":857,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_92ae897f","line":854,"updated":"2018-09-26 14:16:57.000000000","message":"You should have new tests for source_type\u003dblank/image/snapshot which have a volume_type set on the bdm and assert it\u0027s passed through. These tests aren\u0027t really testing any of the new functionality otherwise.\n\nI would also suggest pulling the compute-side changes out into a separate change in the series to keep the changes smaller and more manageable both for yourself and the reviewers. This is ideally how I\u0027d structure the series:\n\n1. db and versioned object changes\n2. compute changes (compute rpc api version bump and virt block device changes)\n3. compute API version for when a volume_type is requested\n4. the actual REST API microversion bump, docs, schema changes, API samples, etc.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.volume_api.get_snapshot(self.context,"},{"line_number":852,"context_line":"                                     \u0027fake-snapshot-id-1\u0027).AndReturn(snapshot)"},{"line_number":853,"context_line":"        self.volume_api.create(self.context, 3, \u0027\u0027, \u0027\u0027, snapshot,"},{"line_number":854,"context_line":"                               availability_zone\u003dNone,"},{"line_number":855,"context_line":"                               volume_type\u003dNone).AndReturn(volume)"},{"line_number":856,"context_line":"        wait_func(self.context, \u0027fake-volume-id-2\u0027).AndReturn(None)"},{"line_number":857,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_66a19ea8","line":854,"in_reply_to":"3f79a3b5_8dcd0e32","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1fe47181ae23de31c7b92fb4a1fe0b03b1d74cf8","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.volume_api.get_snapshot(self.context,"},{"line_number":852,"context_line":"                                     \u0027fake-snapshot-id-1\u0027).AndReturn(snapshot)"},{"line_number":853,"context_line":"        self.volume_api.create(self.context, 3, \u0027\u0027, \u0027\u0027, snapshot,"},{"line_number":854,"context_line":"                               availability_zone\u003dNone,"},{"line_number":855,"context_line":"                               volume_type\u003dNone).AndReturn(volume)"},{"line_number":856,"context_line":"        wait_func(self.context, \u0027fake-volume-id-2\u0027).AndReturn(None)"},{"line_number":857,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_8dcd0e32","line":854,"in_reply_to":"3f79a3b5_92ae897f","updated":"2018-09-26 14:49:08.000000000","message":"\u003e 3. compute API version for when a volume_type is requested\n\nCorrection: \"compute API VALIDATION for when a volume type is requested\"","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        self.volume_api.get_snapshot(self.context,"},{"line_number":852,"context_line":"                                     \u0027fake-snapshot-id-1\u0027).AndReturn(snapshot)"},{"line_number":853,"context_line":"        self.volume_api.create(self.context, 3, \u0027\u0027, \u0027\u0027, snapshot,"},{"line_number":854,"context_line":"                               availability_zone\u003dNone,"},{"line_number":855,"context_line":"                               volume_type\u003dNone).AndReturn(volume)"},{"line_number":856,"context_line":"        wait_func(self.context, \u0027fake-volume-id-2\u0027).AndReturn(None)"},{"line_number":857,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_e6c36e38","line":854,"in_reply_to":"3f79a3b5_92ae897f","updated":"2018-09-27 10:14:35.000000000","message":"Thanks, this makes the whole process very clear, I will update this bp in this way.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fe88abf2b25981c22e4be6091e6319256eb39cc","unresolved":false,"context_lines":[{"line_number":132,"context_line":"         \u0027snapshot_id\u0027: \u0027fake-snapshot-id-1\u0027,"},{"line_number":133,"context_line":"         \u0027volume_id\u0027: \u0027fake-volume-id-2\u0027,"},{"line_number":134,"context_line":"         \u0027boot_index\u0027: -1,"},{"line_number":135,"context_line":"         \u0027volume_type\u0027: \u0027fake-lvm-1\u0027})"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    volsnapshot_driver_bdm \u003d {"},{"line_number":138,"context_line":"        \u0027mount_device\u0027: \u0027/dev/sda2\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_4367fb53","line":135,"updated":"2018-10-05 15:03:04.000000000","message":"Wouldn\u0027t it have been easier to just default to None for all of the existing tests and then add new tests which set the volume_type on the copy of these dict variables? Because now in the existing tests you have to reset this back to None anyway...","commit_id":"559b33d5ff69475d20a5bcb26f6def9e3f9241a7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ef4dc650ce12bec8f59785ff63af5b30a9d1709f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"         \u0027snapshot_id\u0027: \u0027fake-snapshot-id-1\u0027,"},{"line_number":133,"context_line":"         \u0027volume_id\u0027: \u0027fake-volume-id-2\u0027,"},{"line_number":134,"context_line":"         \u0027boot_index\u0027: -1,"},{"line_number":135,"context_line":"         \u0027volume_type\u0027: \u0027fake-lvm-1\u0027})"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    volsnapshot_driver_bdm \u003d {"},{"line_number":138,"context_line":"        \u0027mount_device\u0027: \u0027/dev/sda2\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_c4aa1f83","line":135,"in_reply_to":"3f79a3b5_4367fb53","updated":"2018-10-07 23:51:51.000000000","message":"Yes, if the volume_type\u003dNone is better, I will update it.","commit_id":"559b33d5ff69475d20a5bcb26f6def9e3f9241a7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9485b7939cc47a788cb8e79c33cd80ea6a90126","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("},{"line_number":1385,"context_line":"               test_bdm, no_volume_image, volume,"},{"line_number":1386,"context_line":"               availability_zone\u003d\u0027test-az\u0027)"},{"line_number":1387,"context_line":"        self.mox.ReplayAll()"},{"line_number":1388,"context_line":""},{"line_number":1389,"context_line":"        test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1390,"context_line":"                        self.virt_driver, wait_func)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_b185ca0c","line":1387,"range":{"start_line":1387,"start_character":8,"end_line":1387,"end_character":28},"updated":"2018-10-08 23:02:28.000000000","message":"Hmm, why do we need this? We shouldn\u0027t rely on mox usage, maybe you just need to mock out the volume_api.create method like the test above?","commit_id":"74391aac772e703673798bac4d638d93d41e9e6c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ad90b2fe704577549aaba60590541af33ea5940e","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("},{"line_number":1385,"context_line":"               test_bdm, no_volume_image, volume,"},{"line_number":1386,"context_line":"               availability_zone\u003d\u0027test-az\u0027)"},{"line_number":1387,"context_line":"        self.mox.ReplayAll()"},{"line_number":1388,"context_line":""},{"line_number":1389,"context_line":"        test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1390,"context_line":"                        self.virt_driver, wait_func)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_e62627ba","line":1387,"range":{"start_line":1387,"start_character":8,"end_line":1387,"end_character":28},"in_reply_to":"3f79a3b5_b185ca0c","updated":"2018-10-09 01:10:26.000000000","message":"Sorry, the mox has been deprecated, rewrite this.","commit_id":"74391aac772e703673798bac4d638d93d41e9e6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9485b7939cc47a788cb8e79c33cd80ea6a90126","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("},{"line_number":1420,"context_line":"               test_bdm, no_volume_snapshot, volume,"},{"line_number":1421,"context_line":"               availability_zone\u003d\u0027test-az\u0027)"},{"line_number":1422,"context_line":"        self.mox.ReplayAll()"},{"line_number":1423,"context_line":""},{"line_number":1424,"context_line":"        test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                        self.virt_driver, wait_func)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_d1888622","line":1422,"range":{"start_line":1422,"start_character":8,"end_line":1422,"end_character":28},"updated":"2018-10-08 23:02:28.000000000","message":"same","commit_id":"74391aac772e703673798bac4d638d93d41e9e6c"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ad90b2fe704577549aaba60590541af33ea5940e","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"        instance, expected_conn_info \u003d self._test_volume_attach("},{"line_number":1420,"context_line":"               test_bdm, no_volume_snapshot, volume,"},{"line_number":1421,"context_line":"               availability_zone\u003d\u0027test-az\u0027)"},{"line_number":1422,"context_line":"        self.mox.ReplayAll()"},{"line_number":1423,"context_line":""},{"line_number":1424,"context_line":"        test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                        self.virt_driver, wait_func)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_861df363","line":1422,"range":{"start_line":1422,"start_character":8,"end_line":1422,"end_character":28},"in_reply_to":"3f79a3b5_d1888622","updated":"2018-10-09 01:10:26.000000000","message":"Done","commit_id":"74391aac772e703673798bac4d638d93d41e9e6c"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"58f1fe2b3971cdeb86dc50a28929ab8033fb6d93","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"        self.assertEqual(set([\u0027uuid\u0027, \u0027is_volume\u0027, \u0027B\u0027, \u0027C\u0027, \u0027E\u0027]),"},{"line_number":1328,"context_line":"                         E(bdm)._proxy_as_attr)"},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    def test_blank_attach_volume_cinder_cross_volume_type(self):"},{"line_number":1331,"context_line":"        # Tests that the blank volume created specifies the volume type."},{"line_number":1332,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"},{"line_number":1333,"context_line":"        no_blank_volume \u003d self.volblank_bdm_dict.copy()"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_dc741a9e","line":1330,"range":{"start_line":1330,"start_character":40,"end_line":1330,"end_character":45},"updated":"2018-10-09 03:24:37.000000000","message":"this name doesn\u0027t make sense, maybe change to with_volume_type","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9ab2046ad854d2296d0e34c6885f4780f5f01b2d","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"        self.assertEqual(set([\u0027uuid\u0027, \u0027is_volume\u0027, \u0027B\u0027, \u0027C\u0027, \u0027E\u0027]),"},{"line_number":1328,"context_line":"                         E(bdm)._proxy_as_attr)"},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    def test_blank_attach_volume_cinder_cross_volume_type(self):"},{"line_number":1331,"context_line":"        # Tests that the blank volume created specifies the volume type."},{"line_number":1332,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"},{"line_number":1333,"context_line":"        no_blank_volume \u003d self.volblank_bdm_dict.copy()"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_f726cfb9","line":1330,"range":{"start_line":1330,"start_character":40,"end_line":1330,"end_character":45},"in_reply_to":"3f79a3b5_dc741a9e","updated":"2018-10-09 04:41:07.000000000","message":"Done","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"58f1fe2b3971cdeb86dc50a28929ab8033fb6d93","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"                                                   self.virt_driver)"},{"line_number":1359,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    def test_image_attach_no_volume_cinder_cross_volume_type(self):"},{"line_number":1362,"context_line":"        # Tests that the volume created from the image specifies"},{"line_number":1363,"context_line":"        # the volume type."},{"line_number":1364,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_7c6b86b8","line":1361,"range":{"start_line":1361,"start_character":43,"end_line":1361,"end_character":48},"updated":"2018-10-09 03:24:37.000000000","message":"with","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9ab2046ad854d2296d0e34c6885f4780f5f01b2d","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"                                                   self.virt_driver)"},{"line_number":1359,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    def test_image_attach_no_volume_cinder_cross_volume_type(self):"},{"line_number":1362,"context_line":"        # Tests that the volume created from the image specifies"},{"line_number":1363,"context_line":"        # the volume type."},{"line_number":1364,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_971d1b64","line":1361,"range":{"start_line":1361,"start_character":43,"end_line":1361,"end_character":48},"in_reply_to":"3f79a3b5_7c6b86b8","updated":"2018-10-09 04:41:07.000000000","message":"Done","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"58f1fe2b3971cdeb86dc50a28929ab8033fb6d93","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                                                   self.virt_driver)"},{"line_number":1394,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def test_snapshot_attach_no_volume_cinder_cross_volume_type(self):"},{"line_number":1397,"context_line":"        # Tests that the volume created from the snapshot specifies the"},{"line_number":1398,"context_line":"        # volume type."},{"line_number":1399,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_fc5eb611","line":1396,"range":{"start_line":1396,"start_character":46,"end_line":1396,"end_character":51},"updated":"2018-10-09 03:24:37.000000000","message":"ditto","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"9ab2046ad854d2296d0e34c6885f4780f5f01b2d","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                                                   self.virt_driver)"},{"line_number":1394,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def test_snapshot_attach_no_volume_cinder_cross_volume_type(self):"},{"line_number":1397,"context_line":"        # Tests that the volume created from the snapshot specifies the"},{"line_number":1398,"context_line":"        # volume type."},{"line_number":1399,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_b720579c","line":1396,"range":{"start_line":1396,"start_character":46,"end_line":1396,"end_character":51},"in_reply_to":"3f79a3b5_fc5eb611","updated":"2018-10-09 04:41:07.000000000","message":"Done","commit_id":"e4ac457c8ee382fcb9c59fc12b6ddc45f914b437"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30afd21276f4a0f255b16b32ef61b358c02ff060","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"                                                   self.virt_driver)"},{"line_number":1359,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    def test_image_attach_no_volume_cinder_with_volume_type(self):"},{"line_number":1362,"context_line":"        # Tests that the volume created from the image specifies"},{"line_number":1363,"context_line":"        # the volume type."},{"line_number":1364,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_15cb3973","line":1361,"range":{"start_line":1361,"start_character":26,"end_line":1361,"end_character":35},"updated":"2018-10-09 14:24:59.000000000","message":"nit: I\u0027m not sure what \"no volume\" means here. I guess you\u0027re just copying this from existing tests and maybe it means we\u0027re creating a volume...I\u0027d probably rename as something like test_boot_from_volume_source_image_with_volume_type.","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"3da20e3470c1dd103fe084f982fbe0799374ef58","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"                                                   self.virt_driver)"},{"line_number":1359,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"    def test_image_attach_no_volume_cinder_with_volume_type(self):"},{"line_number":1362,"context_line":"        # Tests that the volume created from the image specifies"},{"line_number":1363,"context_line":"        # the volume type."},{"line_number":1364,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_34f2ec06","line":1361,"range":{"start_line":1361,"start_character":26,"end_line":1361,"end_character":35},"in_reply_to":"3f79a3b5_15cb3973","updated":"2018-10-10 00:09:41.000000000","message":"Done","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30afd21276f4a0f255b16b32ef61b358c02ff060","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                                                   self.virt_driver)"},{"line_number":1394,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def test_snapshot_attach_no_volume_cinder_with_volume_type(self):"},{"line_number":1397,"context_line":"        # Tests that the volume created from the snapshot specifies the"},{"line_number":1398,"context_line":"        # volume type."},{"line_number":1399,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_f5947d43","line":1396,"range":{"start_line":1396,"start_character":29,"end_line":1396,"end_character":38},"updated":"2018-10-09 14:24:59.000000000","message":"same","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"3da20e3470c1dd103fe084f982fbe0799374ef58","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"                                                   self.virt_driver)"},{"line_number":1394,"context_line":"                self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def test_snapshot_attach_no_volume_cinder_with_volume_type(self):"},{"line_number":1397,"context_line":"        # Tests that the volume created from the snapshot specifies the"},{"line_number":1398,"context_line":"        # volume type."},{"line_number":1399,"context_line":"        self.flags(cross_az_attach\u003dFalse, group\u003d\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_f4d31462","line":1396,"range":{"start_line":1396,"start_character":29,"end_line":1396,"end_character":38},"in_reply_to":"3f79a3b5_f5947d43","updated":"2018-10-10 00:09:41.000000000","message":"Done","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30afd21276f4a0f255b16b32ef61b358c02ff060","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                              return_value\u003dvolume),"},{"line_number":1420,"context_line":"            mock.patch.object(self.volume_api, \u0027get_snapshot\u0027,"},{"line_number":1421,"context_line":"                              return_value\u003dsnapshot)) as (vol_create,"},{"line_number":1422,"context_line":"                                                          vol_get_snap):"},{"line_number":1423,"context_line":"            with mock.patch.object(volume_class, \u0027attach\u0027) as vol_attach:"},{"line_number":1424,"context_line":"                test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                                self.virt_driver)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_95b3c9ec","line":1422,"range":{"start_line":1422,"start_character":58,"end_line":1422,"end_character":70},"updated":"2018-10-09 14:24:59.000000000","message":"Should probably assert this is called.","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"3da20e3470c1dd103fe084f982fbe0799374ef58","unresolved":false,"context_lines":[{"line_number":1419,"context_line":"                              return_value\u003dvolume),"},{"line_number":1420,"context_line":"            mock.patch.object(self.volume_api, \u0027get_snapshot\u0027,"},{"line_number":1421,"context_line":"                              return_value\u003dsnapshot)) as (vol_create,"},{"line_number":1422,"context_line":"                                                          vol_get_snap):"},{"line_number":1423,"context_line":"            with mock.patch.object(volume_class, \u0027attach\u0027) as vol_attach:"},{"line_number":1424,"context_line":"                test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                                self.virt_driver)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_745f04e4","line":1422,"range":{"start_line":1422,"start_character":58,"end_line":1422,"end_character":70},"in_reply_to":"3f79a3b5_95b3c9ec","updated":"2018-10-10 00:09:41.000000000","message":"Done","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30afd21276f4a0f255b16b32ef61b358c02ff060","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"            mock.patch.object(self.volume_api, \u0027get_snapshot\u0027,"},{"line_number":1421,"context_line":"                              return_value\u003dsnapshot)) as (vol_create,"},{"line_number":1422,"context_line":"                                                          vol_get_snap):"},{"line_number":1423,"context_line":"            with mock.patch.object(volume_class, \u0027attach\u0027) as vol_attach:"},{"line_number":1424,"context_line":"                test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                                self.virt_driver)"},{"line_number":1426,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_159ed954","line":1423,"range":{"start_line":1423,"start_character":12,"end_line":1423,"end_character":16},"updated":"2018-10-09 14:24:59.000000000","message":"It\u0027s weird to nest this under the context above, just include this in the with test.nested context above.","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"3da20e3470c1dd103fe084f982fbe0799374ef58","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"            mock.patch.object(self.volume_api, \u0027get_snapshot\u0027,"},{"line_number":1421,"context_line":"                              return_value\u003dsnapshot)) as (vol_create,"},{"line_number":1422,"context_line":"                                                          vol_get_snap):"},{"line_number":1423,"context_line":"            with mock.patch.object(volume_class, \u0027attach\u0027) as vol_attach:"},{"line_number":1424,"context_line":"                test_bdm.attach(self.context, instance, self.volume_api,"},{"line_number":1425,"context_line":"                                self.virt_driver)"},{"line_number":1426,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_1456d0cf","line":1423,"range":{"start_line":1423,"start_character":12,"end_line":1423,"end_character":16},"in_reply_to":"3f79a3b5_159ed954","updated":"2018-10-10 00:09:41.000000000","message":"Done","commit_id":"99d018109accd4999a72f678678b337a257112bf"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a5daef39a73ee04959c84219a253972be15e9737","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        no_volume_image \u003d self.volimage_bdm_dict.copy()"},{"line_number":1366,"context_line":"        no_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":1367,"context_line":"        no_volume_image[\u0027volume_type\u0027] \u003d \u0027fake-lvm-1\u0027"},{"line_number":1368,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volimage\u0027]("},{"line_number":1369,"context_line":"                fake_block_device.fake_bdm_object("},{"line_number":1370,"context_line":"                        self.context, no_volume_image))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3f79a3b5_f0b52e7e","line":1368,"range":{"start_line":1368,"start_character":8,"end_line":1368,"end_character":16},"updated":"2018-10-11 16:59:52.000000000","message":"Hmm, do we have a test where volume_type is not set? Also, I presume that calling create with volume_type\u003dNone is basically what we are doing today implicitly (and thus okay), right?","commit_id":"619058df93577206c9c13b613743c67f85205c91"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4260859f5c098b6a3e6a0b67b6440ba7c48acdbf","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        no_volume_image \u003d self.volimage_bdm_dict.copy()"},{"line_number":1366,"context_line":"        no_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":1367,"context_line":"        no_volume_image[\u0027volume_type\u0027] \u003d \u0027fake-lvm-1\u0027"},{"line_number":1368,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volimage\u0027]("},{"line_number":1369,"context_line":"                fake_block_device.fake_bdm_object("},{"line_number":1370,"context_line":"                        self.context, no_volume_image))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3f79a3b5_3dbb7e75","line":1368,"range":{"start_line":1368,"start_character":8,"end_line":1368,"end_character":16},"in_reply_to":"3f79a3b5_1db482f0","updated":"2018-10-11 18:38:44.000000000","message":"Sorry, what I meant was coming from a BDM object with that value unset (like if received from an older service) do we get None properly in whatever the test_bdm structure is.","commit_id":"619058df93577206c9c13b613743c67f85205c91"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"05aaf8787bf00587e81918d65a0591fa2060faa9","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        no_volume_image \u003d self.volimage_bdm_dict.copy()"},{"line_number":1366,"context_line":"        no_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":1367,"context_line":"        no_volume_image[\u0027volume_type\u0027] \u003d \u0027fake-lvm-1\u0027"},{"line_number":1368,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volimage\u0027]("},{"line_number":1369,"context_line":"                fake_block_device.fake_bdm_object("},{"line_number":1370,"context_line":"                        self.context, no_volume_image))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3f79a3b5_e0447d1b","line":1368,"range":{"start_line":1368,"start_character":8,"end_line":1368,"end_character":16},"in_reply_to":"3f79a3b5_3dbb7e75","updated":"2018-10-11 18:58:36.000000000","message":"I guess I don\u0027t see any tests where the test bdm has volume_type unset, and the attach code doesn\u0027t check for that, it just accesses self.volume_type.","commit_id":"619058df93577206c9c13b613743c67f85205c91"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef47869edefc4860f0332235554c0347718a4680","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        no_volume_image \u003d self.volimage_bdm_dict.copy()"},{"line_number":1366,"context_line":"        no_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":1367,"context_line":"        no_volume_image[\u0027volume_type\u0027] \u003d \u0027fake-lvm-1\u0027"},{"line_number":1368,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volimage\u0027]("},{"line_number":1369,"context_line":"                fake_block_device.fake_bdm_object("},{"line_number":1370,"context_line":"                        self.context, no_volume_image))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3f79a3b5_1db482f0","line":1368,"range":{"start_line":1368,"start_character":8,"end_line":1368,"end_character":16},"in_reply_to":"3f79a3b5_f0b52e7e","updated":"2018-10-11 18:21:18.000000000","message":"\u003e Hmm, do we have a test where volume_type is not set?\n\nAll of the existing tests in here are using volume_type\u003dNone because of the defaults above.\n\n\u003e Also, I presume that calling create with volume_type\u003dNone is basically what we are doing today implicitly (and thus okay), right?\n\nPassing None is OK, the API allows it; I asked the same earlier:\n\nhttps://review.openstack.org/#/c/579360/20/nova/virt/block_device.py@713","commit_id":"619058df93577206c9c13b613743c67f85205c91"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7b556c050ebf10a3f56cfe30cc832cc34877074","unresolved":false,"context_lines":[{"line_number":1420,"context_line":"            mock.patch.object(self.volume_api, \u0027get_snapshot\u0027,"},{"line_number":1421,"context_line":"                              return_value\u003dsnapshot),"},{"line_number":1422,"context_line":"            mock.patch.object(volume_class, \u0027attach\u0027)) as (vol_create,"},{"line_number":1423,"context_line":"                                                           vol_get_snap,"},{"line_number":1424,"context_line":"                                                           vol_attach):"},{"line_number":1425,"context_line":""},{"line_number":1426,"context_line":"            test_bdm.attach(self.context, instance, self.volume_api,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f79a3b5_50598926","line":1423,"range":{"start_line":1423,"start_character":59,"end_line":1423,"end_character":71},"updated":"2018-10-11 12:38:17.000000000","message":"nit: assert this is called","commit_id":"619058df93577206c9c13b613743c67f85205c91"}],"nova/virt/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":760,"context_line":"        if not self.volume_id:"},{"line_number":761,"context_line":"            vol_name \u003d instance.uuid + \u0027-blank-vol\u0027"},{"line_number":762,"context_line":"            av_zone \u003d _get_volume_create_az_value(instance)"},{"line_number":763,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, vol_name, \u0027\u0027,"},{"line_number":764,"context_line":"                                    availability_zone\u003dav_zone)"},{"line_number":765,"context_line":"            if wait_func:"},{"line_number":766,"context_line":"                self._call_wait_func(context, wait_func, volume_api, vol[\u0027id\u0027])"},{"line_number":767,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_d2864117","line":764,"range":{"start_line":763,"start_character":12,"end_line":764,"end_character":62},"updated":"2018-09-26 14:16:57.000000000","message":"You missed source_type\u003dblank.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":760,"context_line":"        if not self.volume_id:"},{"line_number":761,"context_line":"            vol_name \u003d instance.uuid + \u0027-blank-vol\u0027"},{"line_number":762,"context_line":"            av_zone \u003d _get_volume_create_az_value(instance)"},{"line_number":763,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, vol_name, \u0027\u0027,"},{"line_number":764,"context_line":"                                    availability_zone\u003dav_zone)"},{"line_number":765,"context_line":"            if wait_func:"},{"line_number":766,"context_line":"                self._call_wait_func(context, wait_func, volume_api, vol[\u0027id\u0027])"},{"line_number":767,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_260f26e1","line":764,"range":{"start_line":763,"start_character":12,"end_line":764,"end_character":62},"in_reply_to":"3f79a3b5_d2864117","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8fe88abf2b25981c22e4be6091e6319256eb39cc","unresolved":false,"context_lines":[{"line_number":710,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":711,"context_line":"                                               self.snapshot_id)"},{"line_number":712,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, \u0027\u0027, \u0027\u0027,"},{"line_number":713,"context_line":"                                    snapshot, volume_type\u003dself.volume_type,"},{"line_number":714,"context_line":"                                    availability_zone\u003dav_zone)"},{"line_number":715,"context_line":"            if wait_func:"},{"line_number":716,"context_line":"                self._call_wait_func(context, wait_func, volume_api, vol[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_c3c1cbff","line":713,"range":{"start_line":713,"start_character":46,"end_line":713,"end_character":74},"updated":"2018-10-05 15:03:04.000000000","message":"What happens if you pass None to the actual POST /volumes API? Does cinderclient not send the variable if the value is None, or does the REST API filter it out?\n\n(later)\n\nI guess it\u0027s OK to pass None:\n\nhttps://github.com/openstack/cinder/blob/99d8e13940df01a4da524de961228aefa971ca29/cinder/api/schemas/volumes.py#L45\n\nhttps://github.com/openstack/cinder/blob/99d8e13940df01a4da524de961228aefa971ca29/cinder/api/v3/volumes.py#L275","commit_id":"559b33d5ff69475d20a5bcb26f6def9e3f9241a7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ef4dc650ce12bec8f59785ff63af5b30a9d1709f","unresolved":false,"context_lines":[{"line_number":710,"context_line":"            snapshot \u003d volume_api.get_snapshot(context,"},{"line_number":711,"context_line":"                                               self.snapshot_id)"},{"line_number":712,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, \u0027\u0027, \u0027\u0027,"},{"line_number":713,"context_line":"                                    snapshot, volume_type\u003dself.volume_type,"},{"line_number":714,"context_line":"                                    availability_zone\u003dav_zone)"},{"line_number":715,"context_line":"            if wait_func:"},{"line_number":716,"context_line":"                self._call_wait_func(context, wait_func, volume_api, vol[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f79a3b5_848c273a","line":713,"range":{"start_line":713,"start_character":46,"end_line":713,"end_character":74},"in_reply_to":"3f79a3b5_c3c1cbff","updated":"2018-10-07 23:51:51.000000000","message":"Yeah, if ``volume_type`` is None, the REST API can filter it out in Cinder.","commit_id":"559b33d5ff69475d20a5bcb26f6def9e3f9241a7"}],"nova/volume/cinder.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":347,"context_line":"    return d"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def _untranslate_volume_type_view(context, volume_type):"},{"line_number":351,"context_line":"    \"\"\"Maps keys for volume type view.\"\"\""},{"line_number":352,"context_line":"    v \u003d {}"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_d21081ae","line":350,"range":{"start_line":350,"start_character":34,"end_line":350,"end_character":41},"updated":"2018-09-26 14:16:57.000000000","message":"This context parameter isn\u0027t needed.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":347,"context_line":"    return d"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def _untranslate_volume_type_view(context, volume_type):"},{"line_number":351,"context_line":"    \"\"\"Maps keys for volume type view.\"\"\""},{"line_number":352,"context_line":"    v \u003d {}"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_838e2c77","line":350,"range":{"start_line":350,"start_character":34,"end_line":350,"end_character":41},"in_reply_to":"3f79a3b5_d21081ae","updated":"2018-09-27 10:14:35.000000000","message":"Done","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    v[\u0027id\u0027] \u003d volume_type.id"},{"line_number":355,"context_line":"    v[\u0027name\u0027] \u003d volume_type.name"},{"line_number":356,"context_line":"    v[\u0027is_public\u0027] \u003d volume_type.is_public"},{"line_number":357,"context_line":"    v[\u0027description\u0027] \u003d volume_type.description"},{"line_number":358,"context_line":"    v[\u0027extra_specs\u0027] \u003d volume_type.extra_specs"},{"line_number":359,"context_line":"    v[\u0027qos_specs_id\u0027] \u003d volume_type.qos_specs_id"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    return v"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_72364d52","line":359,"range":{"start_line":356,"start_character":4,"end_line":359,"end_character":48},"updated":"2018-09-26 14:16:57.000000000","message":"We don\u0027t care about anything other than the id/name right? I don\u0027t think there is much point in trying to map everything from the Cinder REST API response to an internal representation. In fact, I\u0027m not really sure why this method is needed at all - isn\u0027t the volume_type object from cinderclient able to have it\u0027s fields accessed as attributes or dict entries?","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1ab338bb8bbab27423fe9e21461b18d735ca815e","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    v[\u0027id\u0027] \u003d volume_type.id"},{"line_number":355,"context_line":"    v[\u0027name\u0027] \u003d volume_type.name"},{"line_number":356,"context_line":"    v[\u0027is_public\u0027] \u003d volume_type.is_public"},{"line_number":357,"context_line":"    v[\u0027description\u0027] \u003d volume_type.description"},{"line_number":358,"context_line":"    v[\u0027extra_specs\u0027] \u003d volume_type.extra_specs"},{"line_number":359,"context_line":"    v[\u0027qos_specs_id\u0027] \u003d volume_type.qos_specs_id"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    return v"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_033e9c8a","line":359,"range":{"start_line":356,"start_character":4,"end_line":359,"end_character":48},"in_reply_to":"3f79a3b5_72364d52","updated":"2018-09-27 10:14:35.000000000","message":"Remove this, at least not currently available.","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}],"releasenotes/notes/boot-instance-specific-storage-backend-c34ee0a871efec3b.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6cbf47e07b0c4771e440fd9bc295035d7931c98","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Microversion 2.67 adds the optional parameter ``volume_type`` to"},{"line_number":4,"context_line":"    block_device_mapping_v2, which can be used to specify ``volume_type``"},{"line_number":5,"context_line":"    when booting a server."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f79a3b5_121ef9ba","line":3,"updated":"2018-09-26 14:16:57.000000000","message":"Need more details on this like restrictions about upgrades and in which scenarios it\u0027s not valid (source_type, destination_type, etc).","commit_id":"72606ec9e3a3a35e0def8c4ed2c7525b16c74889"}]}
