)]}'
{"cinder/tests/test_pure.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8129359b875898d91f2e7d7d30b0f05c21c21740","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                                     self.driver.unmanage,"},{"line_number":570,"context_line":"                                     VOLUME)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"    def test_unmange_with_deleted_volume(self):"},{"line_number":573,"context_line":"        vol_name \u003d VOLUME[\u0027name\u0027] + \"-cinder\""},{"line_number":574,"context_line":"        unmanaged_vol_name \u003d vol_name + \"-unmanaged\""},{"line_number":575,"context_line":"        self.array.rename_volume.side_effect \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_39382fd4","line":572,"updated":"2014-12-29 06:00:12.000000000","message":"typo: unmange -\u003e unmanage","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                                     self.driver.unmanage,"},{"line_number":570,"context_line":"                                     VOLUME)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"    def test_unmange_with_deleted_volume(self):"},{"line_number":573,"context_line":"        vol_name \u003d VOLUME[\u0027name\u0027] + \"-cinder\""},{"line_number":574,"context_line":"        unmanaged_vol_name \u003d vol_name + \"-unmanaged\""},{"line_number":575,"context_line":"        self.array.rename_volume.side_effect \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1c93565d","line":572,"in_reply_to":"3a961159_39382fd4","updated":"2014-12-29 21:39:40.000000000","message":"Done","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"}],"cinder/volume/drivers/pure.py":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                volume_exists \u003d True"},{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1f7193e0","line":360,"updated":"2014-12-29 10:28:17.000000000","message":"I think you can replace \u0027\\\u0027 to parentheses.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                volume_exists \u003d True"},{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3c90124e","line":360,"in_reply_to":"3a961159_1f7193e0","updated":"2014-12-29 21:39:40.000000000","message":"Done","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8129359b875898d91f2e7d7d30b0f05c21c21740","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1616e055","line":361,"updated":"2014-12-29 06:00:12.000000000","message":"Can you make \"Volume does not exist\" a constant? This is also used later.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_4a119b52","line":361,"updated":"2014-12-29 10:28:17.000000000","message":"I think it is not a good practices to decide status by match of string message. Another question is that, does \"Volume does not exist\" always indicates volume is not managed?","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_bc924249","line":361,"in_reply_to":"3a961159_1616e055","updated":"2014-12-29 21:39:40.000000000","message":"Good catch, forgot to update this after adding those in the consistency group changeset","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        except exception.PureAPIException as err:"},{"line_number":359,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":360,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":361,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":362,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":363,"context_line":"                    volume_exists \u003d False"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3c9e5255","line":361,"in_reply_to":"3a961159_4a119b52","updated":"2014-12-29 21:39:40.000000000","message":"For now this is the only way for us to distinguish between various 400 errors with the REST API. \n\nThe \"Volume does not exist\" error message indicates that the volume does not exist on the array at all, so it cannot be managed by cinder.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        connected_hosts \u003d self._array.list_volume_hosts(ref_vol_name)"},{"line_number":382,"context_line":"        if len(connected_hosts) \u003e 0:"},{"line_number":383,"context_line":"            raise exception.ManageExistingInvalidReference("},{"line_number":384,"context_line":"                existing_ref\u003dexisting_ref,"},{"line_number":385,"context_line":"                reason\u003d_(\"PureISCSIDriver manage_existing cannot manage a \""},{"line_number":386,"context_line":"                         \"volume connected to hosts. Please disconnect the \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_2a728fad","line":383,"updated":"2014-12-29 10:28:17.000000000","message":"think ManageExistingInvalidReferenceI is not the proper exception name to use here. It is related to invalid reference, but connected_hosts say it is not invalid.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        connected_hosts \u003d self._array.list_volume_hosts(ref_vol_name)"},{"line_number":382,"context_line":"        if len(connected_hosts) \u003e 0:"},{"line_number":383,"context_line":"            raise exception.ManageExistingInvalidReference("},{"line_number":384,"context_line":"                existing_ref\u003dexisting_ref,"},{"line_number":385,"context_line":"                reason\u003d_(\"PureISCSIDriver manage_existing cannot manage a \""},{"line_number":386,"context_line":"                         \"volume connected to hosts. Please disconnect the \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_82db607c","line":383,"in_reply_to":"3a961159_2a728fad","updated":"2014-12-29 21:39:40.000000000","message":"Hmm yea, I wasn\u0027t sure on this one. The reference did point to an existing volume, but it wasn\u0027t valid because it has connected hosts. This lead to my thinking that it is an invalid reference. On the other hand it could be said it was a valid reference because it did point to an existing volume, the key was OK, but due to an internal restriction on our part is didn\u0027t work and throws an error.\n\nDo you have a suggested exception? If not invalid reference I was thinking to go with PureDriverException.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"145ce345b7f91d29009d9fe00a4c097217ee214a","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        connected_hosts \u003d self._array.list_volume_hosts(ref_vol_name)"},{"line_number":382,"context_line":"        if len(connected_hosts) \u003e 0:"},{"line_number":383,"context_line":"            raise exception.ManageExistingInvalidReference("},{"line_number":384,"context_line":"                existing_ref\u003dexisting_ref,"},{"line_number":385,"context_line":"                reason\u003d_(\"PureISCSIDriver manage_existing cannot manage a \""},{"line_number":386,"context_line":"                         \"volume connected to hosts. Please disconnect the \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_382490ae","line":383,"in_reply_to":"3a961159_82db607c","updated":"2015-01-11 15:12:47.000000000","message":"That\u0027s reasonable. Thanks, Patrick!","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                 {\"ref_name\": ref_vol_name, \"new_name\": new_vol_name})"},{"line_number":392,"context_line":"        self._array.rename_volume(ref_vol_name, new_vol_name)"},{"line_number":393,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing.\")"},{"line_number":394,"context_line":"        return None"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def manage_existing_get_size(self, volume, existing_ref):"},{"line_number":397,"context_line":"        \"\"\"Return size of volume to be managed by manage_existing."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_ea29678a","line":394,"updated":"2014-12-29 10:28:17.000000000","message":"I don\u0027t think we need a \u0027return None\u0027 here.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                 {\"ref_name\": ref_vol_name, \"new_name\": new_vol_name})"},{"line_number":392,"context_line":"        self._array.rename_volume(ref_vol_name, new_vol_name)"},{"line_number":393,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing.\")"},{"line_number":394,"context_line":"        return None"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def manage_existing_get_size(self, volume, existing_ref):"},{"line_number":397,"context_line":"        \"\"\"Return size of volume to be managed by manage_existing."}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_dcb46e84","line":394,"in_reply_to":"3a961159_ea29678a","updated":"2014-12-29 21:39:40.000000000","message":"I opted to make it more explicit that we are not returning a model_update, imo it makes the usage less confusing as seen here: https://github.com/openstack/cinder/blob/master/cinder/volume/flows/manager/manage_existing.py#L76","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            self._array.rename_volume(vol_name, unmanaged_vol_name)"},{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_bf16bf56","line":428,"updated":"2014-12-29 10:28:17.000000000","message":"Same as above.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            self._array.rename_volume(vol_name, unmanaged_vol_name)"},{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_dc338e60","line":428,"in_reply_to":"3a961159_bf16bf56","updated":"2014-12-29 21:39:40.000000000","message":"Done","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e415c23b325fbbcc42ac6bf63155b0c5351c6a4e","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""},{"line_number":432,"context_line":"                                 \"the volume, error message: %s\"), err.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1f16f355","line":429,"updated":"2014-12-29 10:28:17.000000000","message":"Same as above.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8129359b875898d91f2e7d7d30b0f05c21c21740","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""},{"line_number":432,"context_line":"                                 \"the volume, error message: %s\"), err.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d902cb08","line":429,"updated":"2014-12-29 06:00:12.000000000","message":"See previous comment.","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""},{"line_number":432,"context_line":"                                 \"the volume, error message: %s\"), err.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1c3d162d","line":429,"in_reply_to":"3a961159_1f16f355","updated":"2014-12-29 21:39:40.000000000","message":"Done","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"c2d832bea35ec86fa5c543f85f59ccc4ff95fde4","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        except exception.PureAPIException as err:"},{"line_number":427,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":428,"context_line":"                if err.kwargs[\"code\"] \u003d\u003d 400 and \\"},{"line_number":429,"context_line":"                        \"Volume does not exist\" in err.msg:"},{"line_number":430,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":431,"context_line":"                    LOG.warn(_LW(\"Volume unmanage was unable to rename \""},{"line_number":432,"context_line":"                                 \"the volume, error message: %s\"), err.msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fc384a3f","line":429,"in_reply_to":"3a961159_d902cb08","updated":"2014-12-29 21:39:40.000000000","message":"Done","commit_id":"9904c3cad8896140e0b614c65771b5dc9584843f"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"3bde5ccbf3782e094d1e44804597b1f54e43a5aa","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        except exception.PureAPIException as err:"},{"line_number":499,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_f8020808","line":501,"updated":"2014-12-30 12:55:14.000000000","message":"Thanks, Patrick. Good catch to remove the \u0027Volume\u0027 word. There are both \u0027Volume does not exist\u0027 and \u0027volume does not exist\u0027 in cinder message. @Xing, is it reasonable to add a TODO here? I still think string match is not a safe way and may pose bug in future.","commit_id":"aa949f0e644e9be2c1b416286330c820c538997e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"ca6bac0e6d5bcae473dbdf756444a0a421939e89","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        except exception.PureAPIException as err:"},{"line_number":499,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b63a3ec2","line":501,"in_reply_to":"3a961159_760b7624","updated":"2014-12-31 10:11:47.000000000","message":"Submitted bug: https://bugs.launchpad.net/cinder/+bug/1406739","commit_id":"aa949f0e644e9be2c1b416286330c820c538997e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"2370bcb9a3c15a9b8a2eb2d8b4ee946ab96d59cd","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        except exception.PureAPIException as err:"},{"line_number":499,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_760b7624","line":501,"in_reply_to":"3a961159_9f2d5c00","updated":"2014-12-31 10:11:27.000000000","message":"Thank you very much, Xing! That\u0027s very reasonable. For now it should not block the patch. Maybe I could submit a blueprint or bug fix to improve that someday :-)","commit_id":"aa949f0e644e9be2c1b416286330c820c538997e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"4953a422c2a59ef3c271965d5660fb6a2b40f7a3","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        except exception.PureAPIException as err:"},{"line_number":499,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_9f2d5c00","line":501,"in_reply_to":"3a961159_f8020808","updated":"2014-12-31 05:58:08.000000000","message":"Hi Accela, string match is not perfect, but this also depends on the underlying API. If the API doesn\u0027t return a unique error code that can be used here, the driver can\u0027t really invent a new error code. So I think this is fine. If in the future, the API does return a unique error code, of course the driver should be changed to use it.","commit_id":"aa949f0e644e9be2c1b416286330c820c538997e"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"3bde5ccbf3782e094d1e44804597b1f54e43a5aa","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                 {\"ref_name\": ref_vol_name, \"new_name\": new_vol_name})"},{"line_number":532,"context_line":"        self._array.rename_volume(ref_vol_name, new_vol_name)"},{"line_number":533,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing.\")"},{"line_number":534,"context_line":"        return None"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def manage_existing_get_size(self, volume, existing_ref):"},{"line_number":537,"context_line":"        \"\"\"Return size of volume to be managed by manage_existing."}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5866bcef","line":534,"updated":"2014-12-30 12:55:14.000000000","message":"Maybe you could add comment here to make your concerns clearer?","commit_id":"aa949f0e644e9be2c1b416286330c820c538997e"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"884e4459472386969f8e6a95bbc1d2a522ffb5a6","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        if not volume_exists:"},{"line_number":506,"context_line":"            raise exception.ManageExistingInvalidReference("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_f3f8bb7d","line":503,"updated":"2015-01-08 19:04:35.000000000","message":"volume_exists is already False","commit_id":"1c09296244daac5173b5584b58c67b718b94c8b1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"40195c8ae3e9f10008f9c7529157a95704053fe0","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                if (err.kwargs[\"code\"] \u003d\u003d 400 and"},{"line_number":501,"context_line":"                        ERR_MSG_NOT_EXIST in err.msg):"},{"line_number":502,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":503,"context_line":"                    volume_exists \u003d False"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"        if not volume_exists:"},{"line_number":506,"context_line":"            raise exception.ManageExistingInvalidReference("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_6e05c478","line":503,"in_reply_to":"3a961159_f3f8bb7d","updated":"2015-01-08 19:59:36.000000000","message":"Fixed","commit_id":"1c09296244daac5173b5584b58c67b718b94c8b1"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"884e4459472386969f8e6a95bbc1d2a522ffb5a6","unresolved":false,"context_lines":[{"line_number":544,"context_line":""},{"line_number":545,"context_line":"        ref_vol_name \u003d existing_ref[\u0027name\u0027]"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        volume_info \u003d self._array.volume_info(ref_vol_name)"},{"line_number":548,"context_line":"        size \u003d math.ceil(float(volume_info[\"size\"]) / units.Gi)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing_get_size.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_b3e473e0","line":547,"updated":"2015-01-08 19:04:35.000000000","message":"I\u0027m a bit confused on this line of code: we\u0027ve got a similar code in line #495 but with try-except-handling. Should we move it to a separate method?","commit_id":"1c09296244daac5173b5584b58c67b718b94c8b1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"40195c8ae3e9f10008f9c7529157a95704053fe0","unresolved":false,"context_lines":[{"line_number":544,"context_line":""},{"line_number":545,"context_line":"        ref_vol_name \u003d existing_ref[\u0027name\u0027]"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        volume_info \u003d self._array.volume_info(ref_vol_name)"},{"line_number":548,"context_line":"        size \u003d math.ceil(float(volume_info[\"size\"]) / units.Gi)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing_get_size.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_2e465cc0","line":547,"in_reply_to":"3a961159_b3e473e0","updated":"2015-01-08 19:59:36.000000000","message":"Yea, this part is a little weird. The easiest way for us to check if a volume exists is to do a GET request with the volume name. This is used to validate if a existing_ref is valid, and overloaded a little bit because that is also the same way to retrieve volume information (in this case the size). \n\nI\u0027ll change the validate method to just return the info so we can avoid calling the same rest api twice.","commit_id":"1c09296244daac5173b5584b58c67b718b94c8b1"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"a6e78d1e0bd29b44706ecd3ef97d1b3964149331","unresolved":false,"context_lines":[{"line_number":535,"context_line":"                 {\"ref_name\": ref_vol_name, \"new_name\": new_vol_name})"},{"line_number":536,"context_line":"        self._array.rename_volume(ref_vol_name, new_vol_name)"},{"line_number":537,"context_line":"        LOG.debug(\"Leave PureISCSIDriver.manage_existing.\")"},{"line_number":538,"context_line":"        return None"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    def manage_existing_get_size(self, volume, existing_ref):"},{"line_number":541,"context_line":"        \"\"\"Return size of volume to be managed by manage_existing."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_db848a0d","line":538,"updated":"2015-01-11 15:18:06.000000000","message":"I still think it would be better to add a comment line to make your concerns clearer.","commit_id":"83a75f22cc3eb49ab66a7aad8819f6f286ec91e9"}]}
