)]}'
{"novaclient/tests/unit/v2/test_volumes.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f79bf629202252c89ed6f8a02b49773a299a123c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.assertIsInstance(v, volumes.Volume)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_get_server_volume_with_exception(self):"},{"line_number":57,"context_line":"        self.assertRaises(TypeError, "},{"line_number":58,"context_line":"                          self.cs.volumes.get_server_volume,"},{"line_number":59,"context_line":"                          \"1234\")"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_90fab772","line":57,"updated":"2017-07-15 15:15:21.000000000","message":"Trailing whitespace here is going to fail PEP8 checking.","commit_id":"6e73ba884290f4829b06729354606285ca24f1f8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f79bf629202252c89ed6f8a02b49773a299a123c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.assertRaises(TypeError, "},{"line_number":62,"context_line":"                          self.cs.volumes.get_server_volume,"},{"line_number":63,"context_line":"                          \"1234\","},{"line_number":64,"context_line":"                          \"volume_id\u003d123\","},{"line_number":65,"context_line":"                          \"attachment_id\u003d123\")"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_list_server_volumes(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_70f5db82","line":64,"updated":"2017-07-15 15:15:21.000000000","message":"This isn\u0027t how you pass keyword arguments in assertRaises().  You probably want:\n\n    self.assertRaises(TypeError,\n                      self.cs.volumes.get_server_volume,\n                      \"1234\",\n                      volume_id\u003d\"123\",\n                      attachment_id\u003d\"123\")","commit_id":"6e73ba884290f4829b06729354606285ca24f1f8"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"7c3fcc8f671c8b6bd309b53a7b2aec7e6c09a295","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.assertRaises(TypeError, "},{"line_number":62,"context_line":"                          self.cs.volumes.get_server_volume,"},{"line_number":63,"context_line":"                          \"1234\","},{"line_number":64,"context_line":"                          \"volume_id\u003d123\","},{"line_number":65,"context_line":"                          \"attachment_id\u003d123\")"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_list_server_volumes(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_139c71be","line":64,"in_reply_to":"1f1a1f67_70f5db82","updated":"2017-07-15 16:33:17.000000000","message":"ok i change it","commit_id":"6e73ba884290f4829b06729354606285ca24f1f8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f79bf629202252c89ed6f8a02b49773a299a123c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                          self.cs.volumes.get_server_volume,"},{"line_number":63,"context_line":"                          \"1234\","},{"line_number":64,"context_line":"                          \"volume_id\u003d123\","},{"line_number":65,"context_line":"                          \"attachment_id\u003d123\")"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_list_server_volumes(self):"},{"line_number":68,"context_line":"        vl \u003d self.cs.volumes.get_server_volumes(1234)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_30ef63b1","line":65,"updated":"2017-07-15 15:15:21.000000000","message":"I would also expect tests on the other method you modified, not to mention tests verifying that the warning is properly emitted.","commit_id":"6e73ba884290f4829b06729354606285ca24f1f8"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"7c3fcc8f671c8b6bd309b53a7b2aec7e6c09a295","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                          self.cs.volumes.get_server_volume,"},{"line_number":63,"context_line":"                          \"1234\","},{"line_number":64,"context_line":"                          \"volume_id\u003d123\","},{"line_number":65,"context_line":"                          \"attachment_id\u003d123\")"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_list_server_volumes(self):"},{"line_number":68,"context_line":"        vl \u003d self.cs.volumes.get_server_volumes(1234)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_93c6419a","line":65,"in_reply_to":"1f1a1f67_30ef63b1","updated":"2017-07-15 16:33:17.000000000","message":"i am sorry to left,i will add it","commit_id":"6e73ba884290f4829b06729354606285ca24f1f8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8710a4c3a3f4191cff8fd8e53398f6758190e7b4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from novaclient import api_versions"},{"line_number":18,"context_line":"from novaclient.tests.unit import utils"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f1a1f67_46f8e479","line":15,"updated":"2017-07-16 14:17:18.000000000","message":"nit: put a blank line before the import to separate it from the copyright header.","commit_id":"f9b5a58580465ff98ddf7ea7516869fec820b6d0"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"824da5f496fdcefa5f142e586467400da6bace86","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from novaclient import api_versions"},{"line_number":18,"context_line":"from novaclient.tests.unit import utils"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f1a1f67_09455d43","line":15,"in_reply_to":"1f1a1f67_46f8e479","updated":"2017-07-16 15:35:25.000000000","message":"ok thank you","commit_id":"f9b5a58580465ff98ddf7ea7516869fec820b6d0"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"0707cdfadfc1130a6971c63d4015959653f4c2b7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    @mock.patch(\u0027warnings.warn\u0027)"},{"line_number":72,"context_line":"    def test_get_server_volume_with_warn(self, mock_warn):"},{"line_number":73,"context_line":"        self.cs.volumes.get_server_volume(1234,"},{"line_number":74,"context_line":"                                          volume_id\u003dNone,"},{"line_number":75,"context_line":"                                          attachment_id\u003d\"Work\")"},{"line_number":76,"context_line":"        mock_warn.assert_called_once()"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1f1a1f67_5d878bb6","line":74,"range":{"start_line":74,"start_character":42,"end_line":74,"end_character":56},"updated":"2017-07-17 04:40:11.000000000","message":"There is no need to pass volume_id here as it\u0027s default value is None only. But to be specific and easy to understand this is ok.","commit_id":"baa23254ec4cedf21a03c7417553edddbba5cacd"}],"novaclient/v2/volumes.py":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"fa2cdfafa87ead1e111571a95f25180f1de041f7","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        :param attachment_id: The ID of the attachment"},{"line_number":83,"context_line":"        :rtype: :class:`Volume`"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        return self._get(\"/servers/%s/os-volume_attachments/%s\" % (server_id,"},{"line_number":86,"context_line":"                         attachment_id,), \"volumeAttachment\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def get_server_volumes(self, server_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_5544c646","side":"PARENT","line":85,"range":{"start_line":85,"start_character":25,"end_line":85,"end_character":63},"updated":"2017-07-06 04:18:53.000000000","message":"I think this is right as defined in api-ref document.\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dshow-a-detail-of-a-volume-attachment-detail#show-a-detail-of-a-volume-attachment\n\nIt should be attachment_id only.","commit_id":"da5b5631435b3d1eeaae45f5399ba565552b566e"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"dead3f3fa266357e7bdba2279df7cd77eecdd16d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        :param attachment_id: The ID of the attachment"},{"line_number":83,"context_line":"        :rtype: :class:`Volume`"},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        return self._get(\"/servers/%s/os-volume_attachments/%s\" % (server_id,"},{"line_number":86,"context_line":"                         attachment_id,), \"volumeAttachment\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def get_server_volumes(self, server_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_60b94213","side":"PARENT","line":85,"range":{"start_line":85,"start_character":25,"end_line":85,"end_character":63},"in_reply_to":"3f1d235d_5544c646","updated":"2017-07-06 05:09:45.000000000","message":"the nova sevice is volume id,the code as follow：\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/volumes.py\n\ni think the doc is wrong....","commit_id":"da5b5631435b3d1eeaae45f5399ba565552b566e"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"2fbed860884e3cf4c0d1becee3f2946e1376f210","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_edd53b1d","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"updated":"2017-07-06 12:32:48.000000000","message":"We cannot do it in such way, it is backward incompatible in case of usage of keyword arguments.\n\nThe right way will be to add one more argument and print warning message in case of usage old one. Something like:\n\n    def get_server_volume(self, server_id, volume_id\u003dNone, attachment_id\u003dNone):\n        if attachment_id is not None and volume_id is not None:\n            raise TypeError(\"You cannot specify both \u0027volume_id\u0027 and \u0027attachment_id\u0027 arguments.\")\n        elif attachment_id is not None:\n             self.client.logger.warning(\"\u0027attachment_id\u0027 argument of \u0027volumes.get_server_volume\u0027 method is deprecated in favor of volume_id.\")\n             volume_id \u003d attachment_id\n\n        if volume_id is None:\n            raise TypeError(\"volume_id is required argument.\")","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"6aefc5d27edfb63aaa5701cb3a822087a574d7d1","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_ee9b7ac6","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"1f1a1f67_28c2c586","updated":"2017-07-14 01:01:54.000000000","message":"ok thank for you reviewer.\ni will change it Andrey\u0027s example","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"cc983e68d62f0a7cf2d348fa5174e2ebb3d43d57","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_28c2c586","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"1f1a1f67_45cf2c7f","updated":"2017-07-12 15:28:12.000000000","message":"quick search with codesearch.openstack.org found at least one usage of keyword argumens:\n\nhttps://github.com/openstack/fuel-ostf/blob/master/fuel_health/nmanager.py#L1453-L1454\n\nThis code will be broken due to your change","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"eba100cb1106d2e5dd67005676a24404dbde3e15","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_8b34014c","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_797cedb4","updated":"2017-07-11 01:43:12.000000000","message":"But I still have a question, so compatible writing is not redundant? Nova-api only supports the parameter volume_id. The client call should be passed in volume-id. And did not find the need to be compatible with the realization of this place","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d3e29dd368588ba638b75db08313a97fe40930be","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_9a831057","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_8b34014c","updated":"2017-07-11 15:02:51.000000000","message":"Yes, properly done backwards compatibility introduces duplication, which should be scheduled to be removed in about 2 cycles or so.  Remember, the \"novaclient\" package is used in two modes: 1. as a command line tool, which must retain backwards compatibility for scripts written by system administrators; and 2. as a library, which must retain backwards compatibility for code written by other programmers.  If you\u0027ll note, by the way, Andrey\u0027s code includes the emission of warning messages to alert library consumers that they need to change the name of the argument they\u0027re using.\n\nYes, the nova REST API may use the name \"volume_id\" instead of \"attachment_id\", but people have likely already written code using novaclient, and may be using the keyword argument \"attachment_id\" when calling this routine; as library writers, we have to be careful to not capriciously change the interface without at least warning them that the change is coming.\n\nIncidentally, that reminds me that it would also be a good idea to include a release note documenting the change.  You can find some example notes under /releasenotes/notes, and you should read up on the \"reno\" tool regarding how to create one.","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"f35b4101e8dd3f5122aee223fda6ccbc18c23d2f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_45cf2c7f","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_92f3e6e7","updated":"2017-07-12 15:10:27.000000000","message":"Sorry, but you\u0027ve missed something.  Python allows keyword arguments; someone could be making the call:\n\n    vol.get_server_volume(serv_id, volume_id\u003dvol_id)\n\nThis could be for any number of reasons, including precomputing arguments in a dictionary.  When evaluating backwards compatibility, we have to keep that in mind, which is why Andrey\u0027s suggested solution is structured the way that it is.","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"329c13fa5b554a6ddc8dcb9c8ff468d75b228223","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_92f3e6e7","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_9a831057","updated":"2017-07-12 01:22:06.000000000","message":"Thank you for your explanation.\nThis is only changing the name of the parameter of the interface, the type and number of parameters \nof the interface have not changed, and should not affect the call to the upper level.(command and library).Moreover, this interface is not a common interface, which is rarely used by ordinary users and has not been found so far.If this parameter name is changed, then the user will use volume_id directly, without using attachment_id.. I don\u0027t think the change of the name of the parameter is compatible with \nthe compatibility.","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"82eda278483f2451aa29785c7bf36d976f47f43d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_797cedb4","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_a167354d","updated":"2017-07-10 15:00:24.000000000","message":"We\u0027re not suggesting that the existing parameter name is correct.  The problem we\u0027re highlighting is that the change you\u0027re making is not backwards compatible in its current form.  Andrey\u0027s code sketch above shows you how to do this parameter rename in a backwards compatible way, so that we don\u0027t disrupt current consumers of the novaclient library.","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"fd1c125c88f3afa37abb505c0f7e8298062f124f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            (server_id, src_volid,),"},{"line_number":74,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_server_volume(self, server_id, volume_id):"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        Get the volume identified by the volume ID, that is attached to"},{"line_number":79,"context_line":"        the given server ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_a167354d","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":52},"in_reply_to":"3f1d235d_edd53b1d","updated":"2017-07-07 00:59:19.000000000","message":"Now, VolumeAttachmentController doesn\u0027t handle the incoming argument attachment_id, so I think the parameter here should be volume_ID,not attachment_id.\nthe nova-api  code as follow\n\nnova/api/opentack/compute/volumes.py\nclass VolumeAttachmentController(wsgi.Controller):\n.......\n    @extensions.expected_errors(404)\n    def show(self, req, server_id, id):\n        \"\"\"Return data about the given volume attachment.\"\"\"\n        context \u003d req.environ[\u0027nova.context\u0027]\n        context.can(va_policies.POLICY_ROOT % \u0027show\u0027)\n\n        volume_id \u003d id    -------------\u003e volume id\n        instance \u003d common.get_instance(self.compute_api, context, server_id)\n\n        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid(\n                context, instance.uuid)\n\n        if not bdms:\n            msg \u003d _(\"Instance %s is not attached.\") % server_id\n            raise exc.HTTPNotFound(explanation\u003dmsg)\n\n        assigned_mountpoint \u003d None\n\n        for bdm in bdms:\n            if bdm.volume_id \u003d\u003d volume_id:\n                assigned_mountpoint \u003d bdm.device_name\n                break\n\n        if assigned_mountpoint is None:\n            msg \u003d _(\"volume_id not found: %s\") % volume_id\n            raise exc.HTTPNotFound(explanation\u003dmsg)\n\n        return {\u0027volumeAttachment\u0027: _translate_attachment_detail_view(\n            volume_id,\n            instance.uuid,\n            assigned_mountpoint)}","commit_id":"aa8693065aa1540e1cfc0999fa87a8bba03f391d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"2fff5a73a7519c8cc23243b1937395a367ba0985","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        if attachment_id is not None and volume_id is not None:"},{"line_number":87,"context_line":"            raise TypeError(\"You cannot specify both volume_id\\"},{"line_number":88,"context_line":"                            and attachment_id arguments.\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        elif attachment_id is not None:"},{"line_number":91,"context_line":"            self.client.logger.warning(\"attachment_id argument\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_080d7736","line":88,"updated":"2017-07-14 14:03:38.000000000","message":"Let\u0027s eliminate the backslash continuations.  Use implicit string appending instead.  Also, note that, as written, this will omit interword spaces.  Try this:\n\n    raise TypeError(\"You cannot specify woth volume_id \"\n                    \"and attachment_id arguments.\")","commit_id":"aed7df3cf0040e16f82048dd00b03d8d5efe2036"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"8710a4c3a3f4191cff8fd8e53398f6758190e7b4","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from novaclient import api_versions"},{"line_number":21,"context_line":"from novaclient import base"},{"line_number":22,"context_line":"import warnings"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Volume(base.Resource):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f1a1f67_e62c9003","line":22,"updated":"2017-07-16 14:17:18.000000000","message":"The warnings module is a standard library module and needs to be before the novaclient imports, separated from them by a blank line.","commit_id":"f9b5a58580465ff98ddf7ea7516869fec820b6d0"},{"author":{"_account_id":21135,"name":"zhangdaolong","email":"zhangdaolong@fiberhome.com","username":"zhangdaolong"},"change_message_id":"824da5f496fdcefa5f142e586467400da6bace86","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from novaclient import api_versions"},{"line_number":21,"context_line":"from novaclient import base"},{"line_number":22,"context_line":"import warnings"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class Volume(base.Resource):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f1a1f67_09b31d4f","line":22,"in_reply_to":"1f1a1f67_e62c9003","updated":"2017-07-16 15:35:25.000000000","message":"ok thank you","commit_id":"f9b5a58580465ff98ddf7ea7516869fec820b6d0"}]}
