)]}'
{"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"00462984bf7d4518083b59f271a2a799cef2791b","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                # a root image via Glance"},{"line_number":504,"context_line":"                type_ \u003d \u0027root\u0027"},{"line_number":505,"context_line":"            else:"},{"line_number":506,"context_line":"                # Otherwise, juse mount_device as `type_` so that we have easy"},{"line_number":507,"context_line":"                # access to it in _attach_disks to create the VBD"},{"line_number":508,"context_line":"                type_ \u003d bdm[\u0027mount_device\u0027]"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSrY%3D","line":506,"updated":"2013-01-30 00:47:48.000000000","message":"s/juse/use/","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"32b1ee31103803a4970a19801fe36da835fbed69","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                # a root image via Glance"},{"line_number":504,"context_line":"                type_ \u003d \u0027root\u0027"},{"line_number":505,"context_line":"            else:"},{"line_number":506,"context_line":"                # Otherwise, juse mount_device as `type_` so that we have easy"},{"line_number":507,"context_line":"                # access to it in _attach_disks to create the VBD"},{"line_number":508,"context_line":"                type_ \u003d bdm[\u0027mount_device\u0027]"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSlw%3D","line":506,"in_reply_to":"AAAAM3%2F%2FSrY%3D","updated":"2013-01-30 01:33:11.000000000","message":"Good find.","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"00462984bf7d4518083b59f271a2a799cef2791b","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        for type_, vdi_info in vdis.items():"},{"line_number":539,"context_line":"            # Additional block-devices for boot use their device-name as the"},{"line_number":540,"context_line":"            # type."},{"line_number":541,"context_line":"            if not type_.startswith(\u0027/dev\u0027):"},{"line_number":542,"context_line":"                continue"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            # Convert device name to userdevice number, e.g. /dev/xvdb -\u003e 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FStQ%3D","line":541,"updated":"2013-01-30 00:47:48.000000000","message":"Is there a way to categorize these more specifically, and move the check into the block_device module similar to is_ephemeral?","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"32b1ee31103803a4970a19801fe36da835fbed69","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        for type_, vdi_info in vdis.items():"},{"line_number":539,"context_line":"            # Additional block-devices for boot use their device-name as the"},{"line_number":540,"context_line":"            # type."},{"line_number":541,"context_line":"            if not type_.startswith(\u0027/dev\u0027):"},{"line_number":542,"context_line":"                continue"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            # Convert device name to userdevice number, e.g. /dev/xvdb -\u003e 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSoM%3D","line":541,"in_reply_to":"AAAAM3%2F%2FStQ%3D","updated":"2013-01-30 01:33:11.000000000","message":"This code is a bit of a hack, so I wouldn\u0027t want this ugliness leaking into the global \u0027block_device` module :-)\n\nThe idea of using `type_` to hold the device_name (e.g. \u0027/dev/xvdb\u0027), in addition to the virtual_name (e.g. `root`, `swap`) is hopefully just a temporary work-around until I can get around to cleaning up the interaction of  `_create_disks` and `_attach_disks`.","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"00462984bf7d4518083b59f271a2a799cef2791b","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                continue"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            # Convert device name to userdevice number, e.g. /dev/xvdb -\u003e 1"},{"line_number":545,"context_line":"            userdevice \u003d ord(block_device.strip_prefix(type_)) - ord(\u0027a\u0027)"},{"line_number":546,"context_line":"            vm_utils.create_vbd(self._session, vm_ref, vdi_info[\u0027ref\u0027],"},{"line_number":547,"context_line":"                                userdevice, bootable\u003dFalse,"},{"line_number":548,"context_line":"                                osvol\u003dvdi_info.get(\u0027osvol\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSs0%3D","line":545,"updated":"2013-01-30 00:47:48.000000000","message":"Would this be a useful utility method in the block_device module?\n\nAlso, I\u0027m having trouble quantifying it but this line and the 4 above it make me uneasy.  I think it\u0027s because there are a lot of assumptions that I, being unfamiliar with the intricacies of block devices, am not sure how fragile they are.  Will a block device always start with \u0027/dev\u0027, and will the suffix always be a lowercase character?  Even if those hold true it would make me feel better if those details were hidden away in the block_device module or something similar so that if they changed it wouldn\u0027t need to be known here.  I don\u0027t think this code necessarily needs to change, just voicing an opinion.","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"32b1ee31103803a4970a19801fe36da835fbed69","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                continue"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"            # Convert device name to userdevice number, e.g. /dev/xvdb -\u003e 1"},{"line_number":545,"context_line":"            userdevice \u003d ord(block_device.strip_prefix(type_)) - ord(\u0027a\u0027)"},{"line_number":546,"context_line":"            vm_utils.create_vbd(self._session, vm_ref, vdi_info[\u0027ref\u0027],"},{"line_number":547,"context_line":"                                userdevice, bootable\u003dFalse,"},{"line_number":548,"context_line":"                                osvol\u003dvdi_info.get(\u0027osvol\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSmQ%3D","line":545,"in_reply_to":"AAAAM3%2F%2FSs0%3D","updated":"2013-01-30 01:33:11.000000000","message":"\u003e Would this be a useful utility method in the block_device module?\n\nPossibly but I think that XenServer maybe the only driver to pass in a userdevice index number, in which case, it\u0027s probably fine for this to remain an implementation detail.\n\n\u003e Also, I\u0027m having trouble quantifying it but this line and the 4 above it make me uneasy. I think it\u0027s because there are a lot of assumptions that I, being unfamiliar with the intricacies of block devices, am not sure how fragile they are.\n\nI agree that there\u0027s a bit of a code-smell here; this is definitely a hack in order to avoid having to make sweeping changes to the way _create_disks and _attach_disks work together. Ultimately, I think both of those can be changed to dramatically simplify the code, but that will be a pretty big effort.\n\n\u003e Will a block device always start with \u0027/dev\u0027, and will the suffix always be a lowercase character?\n\nI believe that\u0027s the contract for block_device_info to have a device_name, like /dev/xvda, etc.\n\n\u003e Even if those hold true it would make me feel better if those details were hidden away in the block_device module or something similar so that if they changed it wouldn\u0027t need to be known here.\n\nI\u0027d agree except for the fact that this code, as it stands right now, is definitely a xenapi-specific hack, so I\u0027d like to keep it as transparent and in-your-face as possible until it gets cleaned-up. (I\u0027d worry that squirreling it away in block_device we might forget about it).","commit_id":"fa99da9812c0cf75f9dc18a92ae42480b1ff4c03"}]}
