)]}'
{"nova/compute/api.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4a47464d7a74b0a2b289faf3dbce19469d61c3f3","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"            if bdm[\u0027volume_id\u0027]:"},{"line_number":2157,"context_line":"                volume \u003d self.volume_api.get(context, bdm[\u0027volume_id\u0027])"},{"line_number":2158,"context_line":"                self.volume_api.check_attached(context, volume,"},{"line_number":2159,"context_line":"                        instance\u003dinstance)"},{"line_number":2160,"context_line":"        # TODO(ndipanov): This check can be generalized as a decorator to"},{"line_number":2161,"context_line":"        # check for valid combinations of src and dests - for now check"},{"line_number":2162,"context_line":"        # if it\u0027s booted from volume only"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F6e4%3D","line":2159,"updated":"2013-04-11 19:27:43.000000000","message":"Here we could check the value returned from \u0027check_attached\u0027 (or \u0027check_in_use\u0027 if it is refactored) and raise the exception accordingly if it return True/False.","commit_id":"08ff87dc0425284274ae62793a6f1c5ecbed54b9"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"deeddb18e33148eaacc62aedb9fb9fd82ed5e93f","unresolved":false,"context_lines":[{"line_number":2156,"context_line":"            if bdm[\u0027volume_id\u0027]:"},{"line_number":2157,"context_line":"                volume \u003d self.volume_api.get(context, bdm[\u0027volume_id\u0027])"},{"line_number":2158,"context_line":"                self.volume_api.check_attached(context, volume,"},{"line_number":2159,"context_line":"                        instance\u003dinstance)"},{"line_number":2160,"context_line":"        # TODO(ndipanov): This check can be generalized as a decorator to"},{"line_number":2161,"context_line":"        # check for valid combinations of src and dests - for now check"},{"line_number":2162,"context_line":"        # if it\u0027s booted from volume only"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F2UE%3D","line":2159,"in_reply_to":"AAAAOn%2F%2F6e4%3D","updated":"2013-04-17 22:20:48.000000000","message":"I agree with both changes you are proposing here, but this bug is targeted for back-port and there is already precedent for this pattern.  So I think these changes should be a separate patch.","commit_id":"08ff87dc0425284274ae62793a6f1c5ecbed54b9"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"deeddb18e33148eaacc62aedb9fb9fd82ed5e93f","unresolved":false,"context_lines":[{"line_number":2318,"context_line":"        device \u003d self.compute_rpcapi.reserve_block_device_name("},{"line_number":2319,"context_line":"            context, device\u003ddevice, instance\u003dinstance, volume_id\u003dvolume_id)"},{"line_number":2320,"context_line":"        try:"},{"line_number":2321,"context_line":"            volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2322,"context_line":"            self.volume_api.check_attach(context, volume, instance\u003dinstance)"},{"line_number":2323,"context_line":"            self.volume_api.reserve_volume(context, volume)"},{"line_number":2324,"context_line":"            self.compute_rpcapi.attach_volume(context, instance\u003dinstance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F2UI%3D","line":2321,"updated":"2013-04-17 22:20:48.000000000","message":"precedent","commit_id":"08ff87dc0425284274ae62793a6f1c5ecbed54b9"}],"nova/volume/cinder.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4a47464d7a74b0a2b289faf3dbce19469d61c3f3","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        return rval"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def check_attached(self, context, volume, instance):"},{"line_number":205,"context_line":"        \"\"\"Return true if volume successfully is attached to instance.\"\"\""},{"line_number":206,"context_line":"        if volume[\u0027status\u0027] !\u003d \"in-use\":"},{"line_number":207,"context_line":"            msg \u003d _(\"status must be \u0027in-use\u0027\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F6hk%3D","line":204,"updated":"2013-04-11 19:27:43.000000000","message":"Wondering if this method should be renamed to \u0027check_in_use\u0027 since it looks like that is what you want. It seems kind of confusing when compared to the method directly below \u0027check_attach\u0027. \n\nThis method will also never return True. The only cases here will be raising an exception or returning None. Given the naming of the method would it make sense to: \n\nif volume[\u0027status\u0027] !\u003d \"in-use\": \n    return False\nelse:\n    return True\n\nand update the documentation given the case.","commit_id":"08ff87dc0425284274ae62793a6f1c5ecbed54b9"}]}
