)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b2f973df3bc11a45c5bf896ed47bac6986306943","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a retype requires migrating a volume the check on the volume"},{"line_number":10,"context_line":"manager will always consider that there\u0027s no need to migrate so it will"},{"line_number":11,"context_line":"not try to migrate the volume but retype it instead, so in drivers like"},{"line_number":12,"context_line":"the LVM it will falsely report success."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch fixes the check to detect if the volume is is our own"},{"line_number":15,"context_line":"backend."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a3c09a3_a6c22132","line":12,"range":{"start_line":11,"start_character":53,"end_line":12,"end_character":8},"updated":"2017-01-17 18:52:19.000000000","message":"... so in drivers that implement \u0027retype\u0027 (like the LVM)...","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fe31a2e5d094eabbc0033e698e62b4cf939e0cf4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a retype requires migrating a volume the check on the volume"},{"line_number":10,"context_line":"manager will always consider that there\u0027s no need to migrate so it will"},{"line_number":11,"context_line":"not try to migrate the volume but retype it instead, so in drivers like"},{"line_number":12,"context_line":"the LVM it will falsely report success."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch fixes the check to detect if the volume is is our own"},{"line_number":15,"context_line":"backend."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a3c09a3_ce48ffce","line":12,"range":{"start_line":11,"start_character":53,"end_line":12,"end_character":8},"in_reply_to":"7a3c09a3_a6c22132","updated":"2017-01-18 11:43:48.000000000","message":"Done","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b2f973df3bc11a45c5bf896ed47bac6986306943","unresolved":false,"context_lines":[{"line_number":11,"context_line":"not try to migrate the volume but retype it instead, so in drivers like"},{"line_number":12,"context_line":"the LVM it will falsely report success."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch fixes the check to detect if the volume is is our own"},{"line_number":15,"context_line":"backend."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-bug: #1652802"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a3c09a3_c6bf2da8","line":14,"range":{"start_line":14,"start_character":54,"end_line":14,"end_character":56},"updated":"2017-01-17 18:52:19.000000000","message":"in","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fe31a2e5d094eabbc0033e698e62b4cf939e0cf4","unresolved":false,"context_lines":[{"line_number":11,"context_line":"not try to migrate the volume but retype it instead, so in drivers like"},{"line_number":12,"context_line":"the LVM it will falsely report success."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch fixes the check to detect if the volume is is our own"},{"line_number":15,"context_line":"backend."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-bug: #1652802"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a3c09a3_ee43fbac","line":14,"range":{"start_line":14,"start_character":54,"end_line":14,"end_character":56},"in_reply_to":"7a3c09a3_c6bf2da8","updated":"2017-01-18 11:43:48.000000000","message":"Done","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"}],"cinder/volume/manager.py":[{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"b2f973df3bc11a45c5bf896ed47bac6986306943","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"        LOG.info(_LI(\"Extend volume completed successfully.\"),"},{"line_number":2207,"context_line":"                 resource\u003dvolume)"},{"line_number":2208,"context_line":""},{"line_number":2209,"context_line":"    def _is_our_backend(self, host, cluster_name):"},{"line_number":2210,"context_line":"        return ((not cluster_name and"},{"line_number":2211,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.host, host)) or"},{"line_number":2212,"context_line":"                (cluster_name and"},{"line_number":2213,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.cluster_name,"},{"line_number":2214,"context_line":"                                                cluster_name)))"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"    def retype(self, context, volume, new_type_id, host,"},{"line_number":2217,"context_line":"               migration_policy\u003d\u0027never\u0027, reservations\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_c6f72d57","line":2214,"range":{"start_line":2209,"start_character":0,"end_line":2214,"end_character":63},"updated":"2017-01-17 18:52:19.000000000","message":"I think that creating a function only to this snip of code make things hard to follow as we have to jump from place to place.","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fe31a2e5d094eabbc0033e698e62b4cf939e0cf4","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"        LOG.info(_LI(\"Extend volume completed successfully.\"),"},{"line_number":2207,"context_line":"                 resource\u003dvolume)"},{"line_number":2208,"context_line":""},{"line_number":2209,"context_line":"    def _is_our_backend(self, host, cluster_name):"},{"line_number":2210,"context_line":"        return ((not cluster_name and"},{"line_number":2211,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.host, host)) or"},{"line_number":2212,"context_line":"                (cluster_name and"},{"line_number":2213,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.cluster_name,"},{"line_number":2214,"context_line":"                                                cluster_name)))"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"    def retype(self, context, volume, new_type_id, host,"},{"line_number":2217,"context_line":"               migration_policy\u003d\u0027never\u0027, reservations\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_0ee047cc","line":2214,"range":{"start_line":2209,"start_character":0,"end_line":2214,"end_character":63},"in_reply_to":"7a3c09a3_23efdc1e","updated":"2017-01-18 11:43:48.000000000","message":"That would mean that you either pass the driver to the method (which wouldn\u0027t be good coding) or you pass the driver\u0027s host and cluster_name, which would decrease the readability of the call in the if method.","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fe31a2e5d094eabbc0033e698e62b4cf939e0cf4","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"        LOG.info(_LI(\"Extend volume completed successfully.\"),"},{"line_number":2207,"context_line":"                 resource\u003dvolume)"},{"line_number":2208,"context_line":""},{"line_number":2209,"context_line":"    def _is_our_backend(self, host, cluster_name):"},{"line_number":2210,"context_line":"        return ((not cluster_name and"},{"line_number":2211,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.host, host)) or"},{"line_number":2212,"context_line":"                (cluster_name and"},{"line_number":2213,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.cluster_name,"},{"line_number":2214,"context_line":"                                                cluster_name)))"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"    def retype(self, context, volume, new_type_id, host,"},{"line_number":2217,"context_line":"               migration_policy\u003d\u0027never\u0027, reservations\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_2e950332","line":2214,"range":{"start_line":2209,"start_character":0,"end_line":2214,"end_character":63},"in_reply_to":"7a3c09a3_c6f72d57","updated":"2017-01-18 11:43:48.000000000","message":"I disagree, that kind of thinking is what got us to methods with more than 170 LOC in the first place (and it will keep getting worse).  We don\u0027t need to use the code twice to be able to abstract them to a method.\n\nIf you read the if clause in retype now it is much easier to follow than it was before, and you can actually read it with a quick glance (unlike what I had written before): it\u0027s not retyped, has the same encryption as is in our backend.","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c2c65a41595102b106f8065bbb4cff2edec0200b","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"        LOG.info(_LI(\"Extend volume completed successfully.\"),"},{"line_number":2207,"context_line":"                 resource\u003dvolume)"},{"line_number":2208,"context_line":""},{"line_number":2209,"context_line":"    def _is_our_backend(self, host, cluster_name):"},{"line_number":2210,"context_line":"        return ((not cluster_name and"},{"line_number":2211,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.host, host)) or"},{"line_number":2212,"context_line":"                (cluster_name and"},{"line_number":2213,"context_line":"                 vol_utils.hosts_are_equivalent(self.driver.cluster_name,"},{"line_number":2214,"context_line":"                                                cluster_name)))"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"    def retype(self, context, volume, new_type_id, host,"},{"line_number":2217,"context_line":"               migration_policy\u003d\u0027never\u0027, reservations\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a3c09a3_23efdc1e","line":2214,"range":{"start_line":2209,"start_character":0,"end_line":2214,"end_character":63},"in_reply_to":"7a3c09a3_c6f72d57","updated":"2017-01-18 11:20:55.000000000","message":"It may be useful to move this to volume_utils maybe?","commit_id":"fdc4d3dcf474ea02da183351925516cbd29ab538"}]}
