)]}'
{"nova/tests/virt/vmwareapi/test_vm_util.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        vmdk_adapter_type \u003d vm_util.get_vmdk_adapter_type(\"dummyAdapter\")"},{"line_number":313,"context_line":"        self.assertEqual(\"dummyAdapter\", vmdk_adapter_type)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_allocate_controller_key_and_unit_number_ide(self):"},{"line_number":316,"context_line":"        disk1 \u003d fake.VirtualDisk()"},{"line_number":317,"context_line":"        disk1.controllerKey \u003d 200"},{"line_number":318,"context_line":"        disk1.unitNumber \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXtw%3D","line":315,"updated":"2014-01-14 14:47:00.000000000","message":"can you create a test showing what error happens when instead of \u0027ide\u0027 someone sends \u0027badkeyword\u0027 ? That should produce a sensible programmer identifiable error.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        vmdk_adapter_type \u003d vm_util.get_vmdk_adapter_type(\"dummyAdapter\")"},{"line_number":313,"context_line":"        self.assertEqual(\"dummyAdapter\", vmdk_adapter_type)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_allocate_controller_key_and_unit_number_ide(self):"},{"line_number":316,"context_line":"        disk1 \u003d fake.VirtualDisk()"},{"line_number":317,"context_line":"        disk1.controllerKey \u003d 200"},{"line_number":318,"context_line":"        disk1.unitNumber \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTVM%3D","line":315,"in_reply_to":"AAAAUH%2F%2FXtw%3D","updated":"2014-01-15 09:52:08.000000000","message":"We\u0027ll get an error from the backend. I haven\u0027t seen input validation anywhere in the driver. Please provide an example if I am missing something.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"977e8422b325741a10c64f5b9ed900082598b3f6","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        disk2.controllerKey \u003d 200"},{"line_number":321,"context_line":"        disk2.unitNumber \u003d 1"},{"line_number":322,"context_line":"        devices \u003d [disk1, disk2]"},{"line_number":323,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":324,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(None, devices,"},{"line_number":325,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":326,"context_line":"        self.assertEqual(201, controller_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXnQ%3D","line":323,"updated":"2014-01-14 15:18:11.000000000","message":"can we please write this without the \\","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        disk2.controllerKey \u003d 200"},{"line_number":321,"context_line":"        disk2.unitNumber \u003d 1"},{"line_number":322,"context_line":"        devices \u003d [disk1, disk2]"},{"line_number":323,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":324,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(None, devices,"},{"line_number":325,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":326,"context_line":"        self.assertEqual(201, controller_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTVo%3D","line":323,"in_reply_to":"AAAAUH%2F%2FXnQ%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"977e8422b325741a10c64f5b9ed900082598b3f6","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        disk.controllerKey \u003d 200"},{"line_number":333,"context_line":"        disk.unitNumber \u003d 0"},{"line_number":334,"context_line":"        factory \u003d fake.FakeFactory()"},{"line_number":335,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":336,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(factory, [disk],"},{"line_number":337,"context_line":"                                                              \u0027lsiLogic\u0027)"},{"line_number":338,"context_line":"        self.assertEqual(-101, controller_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXnM%3D","line":335,"updated":"2014-01-14 15:18:11.000000000","message":"ditto","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        disk.controllerKey \u003d 200"},{"line_number":333,"context_line":"        disk.unitNumber \u003d 0"},{"line_number":334,"context_line":"        factory \u003d fake.FakeFactory()"},{"line_number":335,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":336,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(factory, [disk],"},{"line_number":337,"context_line":"                                                              \u0027lsiLogic\u0027)"},{"line_number":338,"context_line":"        self.assertEqual(-101, controller_key)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTVk%3D","line":335,"in_reply_to":"AAAAUH%2F%2FXnM%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # by default there are two IDE controllers with keys 200 and 201 that can"},{"line_number":330,"context_line":"    # hold at most two devices; check if we can find a free slot there"},{"line_number":331,"context_line":"    if adapter_type \u003d\u003d \u0027ide\u0027:"},{"line_number":332,"context_line":"        for controller_key in [200, 201]:"},{"line_number":333,"context_line":"            for unit_number in [0, 1]:"},{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXvo%3D","line":331,"updated":"2014-01-14 14:47:00.000000000","message":"hard coding of \u0027ide\u0027 here makes me pause again. I\u0027m not sure if this is worth backing off into a constant. You have documented that this driver assumes IDE based CDROM though so that\u0027s good. We should probably document that assumption officially for administrators to be aware of.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        for controller_key in [200, 201]:"},{"line_number":333,"context_line":"            for unit_number in [0, 1]:"},{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"},{"line_number":335,"context_line":"                    return (controller_key, unit_number, None)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":338,"context_line":"    controller_key \u003d -101"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXuc%3D","line":335,"updated":"2014-01-14 14:47:00.000000000","message":"I don\u0027t like this level of nesting but I do love that you have managed to actually filter the controllers.\n\nI tend to prefer seeing data-structures or objects over anonymous lists of return values A collections.namedtuple or simple object here would be easier to read later. This is just a preference though depending on the scale of the impact to other code.\n\nCould you back this off into a separate testable method? Could you demonstrate the situations in which it works and the ones where it fails?","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        for controller_key in [200, 201]:"},{"line_number":333,"context_line":"            for unit_number in [0, 1]:"},{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"},{"line_number":335,"context_line":"                    return (controller_key, unit_number, None)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":338,"context_line":"    controller_key \u003d -101"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTV4%3D","line":335,"in_reply_to":"AAAAUH%2F%2FXuc%3D","updated":"2014-01-15 09:52:08.000000000","message":"I prefer to hold on creating new structures until we have other usages of this.\nI have added more unit tests that exercise the function as is.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"},{"line_number":335,"context_line":"                    return (controller_key, unit_number, None)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":338,"context_line":"    controller_key \u003d -101"},{"line_number":339,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":340,"context_line":"                                             adapter_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXuQ%3D","line":337,"updated":"2014-01-14 14:47:00.000000000","message":"from 337 to 341 feels like a method.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"977e8422b325741a10c64f5b9ed900082598b3f6","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    controller_key \u003d -101"},{"line_number":339,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":340,"context_line":"                                             adapter_type)"},{"line_number":341,"context_line":"    return controller_key, 0, controller_spec"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"def get_rdm_disk(hardware_devices, uuid):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXlU%3D","line":341,"updated":"2014-01-14 15:18:11.000000000","message":"should this not be the unit_number? if not do we need to return something here?","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    controller_key \u003d -101"},{"line_number":339,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":340,"context_line":"                                             adapter_type)"},{"line_number":341,"context_line":"    return controller_key, 0, controller_spec"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"def get_rdm_disk(hardware_devices, uuid):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTW4%3D","line":341,"in_reply_to":"AAAAUH%2F%2FXlU%3D","updated":"2014-01-15 09:52:08.000000000","message":"Hm, I don\u0027t quite understand your comment. The last return statement is the case when new controller should be created and controller_key,unit_number\u003d-101,0 in that case.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9046,"name":"Maithem","email":"munshedm@vmware.com","username":"Maithem"},"change_message_id":"1346d581d08da6516fd1c931a6f994cab77c135f","unresolved":false,"context_lines":[{"line_number":230,"context_line":"def get_cdrom_attach_config_spec(client_factory,"},{"line_number":231,"context_line":"                                 datastore,"},{"line_number":232,"context_line":"                                 file_path,"},{"line_number":233,"context_line":"                                 controller_key,"},{"line_number":234,"context_line":"                                 cdrom_unit_number):"},{"line_number":235,"context_line":"    \"\"\"Builds and returns the cdrom attach config spec.\"\"\""},{"line_number":236,"context_line":"    config_spec \u003d client_factory.create(\u0027ns0:VirtualMachineConfigSpec\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FPdw%3D","line":233,"updated":"2014-01-16 00:51:45.000000000","message":"Is this parameter used?","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"11d57d9f11abc13b24770c7c6ddb311d71cbbe10","unresolved":false,"context_lines":[{"line_number":230,"context_line":"def get_cdrom_attach_config_spec(client_factory,"},{"line_number":231,"context_line":"                                 datastore,"},{"line_number":232,"context_line":"                                 file_path,"},{"line_number":233,"context_line":"                                 controller_key,"},{"line_number":234,"context_line":"                                 cdrom_unit_number):"},{"line_number":235,"context_line":"    \"\"\"Builds and returns the cdrom attach config spec.\"\"\""},{"line_number":236,"context_line":"    config_spec \u003d client_factory.create(\u0027ns0:VirtualMachineConfigSpec\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FOFM%3D","line":233,"in_reply_to":"AAAAUH%2F%2FPdw%3D","updated":"2014-01-16 09:13:05.000000000","message":"Yes, it is passed to create_virtual_cdrom_spec() below","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9046,"name":"Maithem","email":"munshedm@vmware.com","username":"Maithem"},"change_message_id":"1346d581d08da6516fd1c931a6f994cab77c135f","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # by default there are two IDE controllers with keys 200 and 201 that can"},{"line_number":330,"context_line":"    # hold at most two devices; check if we can find a free slot there"},{"line_number":331,"context_line":"    if adapter_type \u003d\u003d \u0027ide\u0027:"},{"line_number":332,"context_line":"        for controller_key in [200, 201]:"},{"line_number":333,"context_line":"            for unit_number in [0, 1]:"},{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FPas%3D","line":331,"updated":"2014-01-16 00:51:45.000000000","message":"What if the adapter type is a scsi and a scsi controller already exists. This function should be able to allocate key/unit_numbers on a scsi controller (not only ide controllers)","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"11d57d9f11abc13b24770c7c6ddb311d71cbbe10","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # by default there are two IDE controllers with keys 200 and 201 that can"},{"line_number":330,"context_line":"    # hold at most two devices; check if we can find a free slot there"},{"line_number":331,"context_line":"    if adapter_type \u003d\u003d \u0027ide\u0027:"},{"line_number":332,"context_line":"        for controller_key in [200, 201]:"},{"line_number":333,"context_line":"            for unit_number in [0, 1]:"},{"line_number":334,"context_line":"                if not (controller_key, unit_number) in taken:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FOD8%3D","line":331,"in_reply_to":"AAAAUH%2F%2FPas%3D","updated":"2014-01-16 09:13:05.000000000","message":"The current behavior is to create a new controller for non-IDE disks. I don\u0027t want to change the current functionality but simply to refactor the code and make it more flexible and maintainable (this is what bug 1259981 is about).\nThe good news is that after my changes you can easily modify this function to find an existing SCSI controller and attach to it for the case of hot adding.","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9046,"name":"Maithem","email":"munshedm@vmware.com","username":"Maithem"},"change_message_id":"1346d581d08da6516fd1c931a6f994cab77c135f","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":338,"context_line":"    controller_key \u003d -101"},{"line_number":339,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":340,"context_line":"                                             adapter_type)"},{"line_number":341,"context_line":"    return controller_key, 0, controller_spec"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FPac%3D","line":340,"updated":"2014-01-16 00:51:45.000000000","message":"Because of the way things are currently structure the controller spec shouldn\u0027t be created within this function. \n\nReason:\nWe are dealing with two types of VMs; VMs that have a scsi controller and VMs that have an ide controller. My patch will create a scsi controller for VMs that have an ide controller (to support hot adding). Therefore, you will be guaranteed to always have have a scsi controller.","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"11d57d9f11abc13b24770c7c6ddb311d71cbbe10","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":338,"context_line":"    controller_key \u003d -101"},{"line_number":339,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":340,"context_line":"                                             adapter_type)"},{"line_number":341,"context_line":"    return controller_key, 0, controller_spec"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FN8M%3D","line":340,"in_reply_to":"AAAAUH%2F%2FPac%3D","updated":"2014-01-16 09:13:05.000000000","message":"I would argue that this is the exact place where controllers should be created. High-level functions don\u0027t have to bother with keys and unit numbers when there is a need to attach a new disk.\nIf you need to add a SCSI controller for hot adding when the VM is being created, that\u0027s fine. But later when you try to attach a volume this function should be able to find the correct controller and unit number.","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":7693,"name":"Sidharth Surana","email":"ssurana@vmware.com","username":"ssurana"},"change_message_id":"ee811272af871f36802e374ac790bee439f106b3","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        ide_keys \u003d [dev.key for dev in devices"},{"line_number":341,"context_line":"                    if dev.__class__.__name__ \u003d\u003d \"VirtualIDEController\"]"},{"line_number":342,"context_line":"        ret \u003d _find_controller_slot(ide_keys, taken, 2)"},{"line_number":343,"context_line":"    elif adapter_type \u003d\u003d \u0027lsiLogic\u0027:"},{"line_number":344,"context_line":"        scsi_keys \u003d [dev.key for dev in devices"},{"line_number":345,"context_line":"                     if dev.__class__.__name__ \u003d\u003d \"VirtualLsiLogicController\"]"},{"line_number":346,"context_line":"        ret \u003d _find_controller_slot(scsi_keys, taken, 48)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2FqGw%3D","line":343,"updated":"2014-02-11 18:50:36.000000000","message":"I think we need to add the case for \"lsiLogicsas\" adapter_type as well as it seems we do create a \"VirtualLsiLogicSASController\" type controller","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"790bbfd679d63be488edfc4c51cc266443fe6cf7","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        ide_keys \u003d [dev.key for dev in devices"},{"line_number":341,"context_line":"                    if dev.__class__.__name__ \u003d\u003d \"VirtualIDEController\"]"},{"line_number":342,"context_line":"        ret \u003d _find_controller_slot(ide_keys, taken, 2)"},{"line_number":343,"context_line":"    elif adapter_type \u003d\u003d \u0027lsiLogic\u0027:"},{"line_number":344,"context_line":"        scsi_keys \u003d [dev.key for dev in devices"},{"line_number":345,"context_line":"                     if dev.__class__.__name__ \u003d\u003d \"VirtualLsiLogicController\"]"},{"line_number":346,"context_line":"        ret \u003d _find_controller_slot(scsi_keys, taken, 48)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2Fi0s%3D","line":343,"in_reply_to":"AAAAUX%2F%2FqGw%3D","updated":"2014-02-12 13:50:11.000000000","message":"Done","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":7693,"name":"Sidharth Surana","email":"ssurana@vmware.com","username":"ssurana"},"change_message_id":"ee811272af871f36802e374ac790bee439f106b3","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    elif adapter_type \u003d\u003d \u0027lsiLogic\u0027:"},{"line_number":344,"context_line":"        scsi_keys \u003d [dev.key for dev in devices"},{"line_number":345,"context_line":"                     if dev.__class__.__name__ \u003d\u003d \"VirtualLsiLogicController\"]"},{"line_number":346,"context_line":"        ret \u003d _find_controller_slot(scsi_keys, taken, 48)"},{"line_number":347,"context_line":"    if ret:"},{"line_number":348,"context_line":"        return ret[0], ret[1], None"},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2Fpks%3D","line":346,"updated":"2014-02-11 18:50:36.000000000","message":"There are 2 problems with this:\n* For all the SCSI controllers (lsiLogic, busLogic, etc.) the controller also utilizes one of the slot itself. This slot# is exposed in the form of \"scsiCtlrUnitNumber\" property of the VirtualSCSIController, so this needs to be excluded as well.\n\n* For a gives SCSI controller there are in total 16 slots (0-15) out of which one of it is used by the SCSI controller itself. Thus the number 48 is wrong and it should be 16, since any slot# greater that 16 is invalid.","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"790bbfd679d63be488edfc4c51cc266443fe6cf7","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    elif adapter_type \u003d\u003d \u0027lsiLogic\u0027:"},{"line_number":344,"context_line":"        scsi_keys \u003d [dev.key for dev in devices"},{"line_number":345,"context_line":"                     if dev.__class__.__name__ \u003d\u003d \"VirtualLsiLogicController\"]"},{"line_number":346,"context_line":"        ret \u003d _find_controller_slot(scsi_keys, taken, 48)"},{"line_number":347,"context_line":"    if ret:"},{"line_number":348,"context_line":"        return ret[0], ret[1], None"},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2Fi0o%3D","line":346,"in_reply_to":"AAAAUX%2F%2Fpks%3D","updated":"2014-02-12 13:50:11.000000000","message":"Done","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":7693,"name":"Sidharth Surana","email":"ssurana@vmware.com","username":"ssurana"},"change_message_id":"ee811272af871f36802e374ac790bee439f106b3","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        return ret[0], ret[1], None"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":351,"context_line":"    controller_key \u003d -101"},{"line_number":352,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":353,"context_line":"                                             adapter_type)"},{"line_number":354,"context_line":"    return controller_key, 0, controller_spec"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2FqAo%3D","line":351,"updated":"2014-02-11 18:50:36.000000000","message":"This will not be an issue if we are attaching a single device per vm-reconfigure operation, which I believe is the case today, but I think we should be forward looking to support multiple devices getting added in the same reconfigure task. In the former case following scenario will create problems: \n* If we are adding/attaching multiple disks in the same vm-reconfigure task. And say there are multiple disks of the same type (e.g. lsiLogic), and the say the LsiLogic controller was not originally present in the VM. Thus in that case  the final configspec will contain multiple LsiLogic controllers being added with the same key (-101) and all the LsiLogic devices trying to get the 0 slot. The slot# will be a problem even if the controller existed before.\n\nThe suggestion here is that when deciding the slot# for a device, we should look at what exists in the VM plus the devices we are adding/changing in the reconfigure device spec to avoid devices claiming the same slot on the same controller.","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"790bbfd679d63be488edfc4c51cc266443fe6cf7","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        return ret[0], ret[1], None"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    # create new controller with the specified type and return its spec"},{"line_number":351,"context_line":"    controller_key \u003d -101"},{"line_number":352,"context_line":"    controller_spec \u003d create_controller_spec(client_factory, controller_key,"},{"line_number":353,"context_line":"                                             adapter_type)"},{"line_number":354,"context_line":"    return controller_key, 0, controller_spec"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2FiuY%3D","line":351,"in_reply_to":"AAAAUX%2F%2FqAo%3D","updated":"2014-02-12 13:50:11.000000000","message":"I know that we don\u0027t support attaching several devices at once but we can\u0027t address everything in a single patch. My intent was to refactor the code and enable further improvements like the one that you describe. Let\u0027s do that in a separate change set.","commit_id":"66decb3e1094d841825d36305877a76633e64749"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":536,"context_line":"                    vm_ref, instance,"},{"line_number":537,"context_line":"                    data_store_ref,"},{"line_number":538,"context_line":"                    uploaded_iso_path,"},{"line_number":539,"context_line":"                    1 if adapter_type in [\u0027ide\u0027] else 0)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        else:"},{"line_number":542,"context_line":"            # Attach the root disk to the VM."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXyg%3D","side":"PARENT","line":539,"updated":"2014-01-14 14:47:00.000000000","message":"okay, that is pretty odd there.","commit_id":"a62542c2973c9a361f6be2372dfce6b58e2af89b"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        devices \u003d self._session._call_method(vim_util,"},{"line_number":601,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":602,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":603,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":604,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":605,"context_line":"                                                              devices, \u0027ide\u0027)"},{"line_number":606,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXyU%3D","line":603,"updated":"2014-01-14 14:47:00.000000000","message":"use of \\ is frowned upon","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        devices \u003d self._session._call_method(vim_util,"},{"line_number":601,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":602,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":603,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":604,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":605,"context_line":"                                                              devices, \u0027ide\u0027)"},{"line_number":606,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTaQ%3D","line":603,"in_reply_to":"AAAAUH%2F%2FXyU%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":603,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":604,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":605,"context_line":"                                                              devices, \u0027ide\u0027)"},{"line_number":606,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":607,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":608,"context_line":"                                    controller_key, unit_number)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXxs%3D","line":605,"updated":"2014-01-14 14:47:00.000000000","message":"hard coded \u0027ide\u0027 here: have we declared CDROM can *never* be scsi or USB? What if we change our minds? Should this be a constant at the top of the file?","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":603,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":604,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":605,"context_line":"                                                              devices, \u0027ide\u0027)"},{"line_number":606,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":607,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":608,"context_line":"                                    controller_key, unit_number)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTYI%3D","line":605,"in_reply_to":"AAAAUH%2F%2FXxs%3D","updated":"2014-01-15 09:52:08.000000000","message":"This patch preserve the current functionality which is to always attach CDROMs to an IDE controller. I guess we can use other types of controllers as well, which would be quite easy after my refactoring.\nAs for the constant - I haven\u0027t seen such practice in the VMW driver but I can move it at the top of the file if you insist.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":696,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":697,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":698,"context_line":"            vmdk_file_path_before_snapshot, adapter_type, disk_type \\"},{"line_number":699,"context_line":"                \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":700,"context_line":"            datastore_name \u003d vm_util.split_datastore_path("},{"line_number":701,"context_line":"                                        vmdk_file_path_before_snapshot)[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXxc%3D","line":698,"updated":"2014-01-14 14:47:00.000000000","message":"blah blah blah \\ makes core-reviewers frown","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":695,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":696,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":697,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":698,"context_line":"            vmdk_file_path_before_snapshot, adapter_type, disk_type \\"},{"line_number":699,"context_line":"                \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":700,"context_line":"            datastore_name \u003d vm_util.split_datastore_path("},{"line_number":701,"context_line":"                                        vmdk_file_path_before_snapshot)[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTYE%3D","line":698,"in_reply_to":"AAAAUH%2F%2FXxc%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":1039,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":1040,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":1041,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":1042,"context_line":"        vmdk_path, adapter_type, disk_type \\"},{"line_number":1043,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":1044,"context_line":"        rescue_vm_ref \u003d vm_util.get_vm_ref_from_uuid(self._session,"},{"line_number":1045,"context_line":"                                                     r_instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXxY%3D","line":1042,"updated":"2014-01-14 14:47:00.000000000","message":"more \\ makes core reviewers hesitate","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":1039,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":1040,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":1041,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":1042,"context_line":"        vmdk_path, adapter_type, disk_type \\"},{"line_number":1043,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":1044,"context_line":"        rescue_vm_ref \u003d vm_util.get_vm_ref_from_uuid(self._session,"},{"line_number":1045,"context_line":"                                                     r_instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTX8%3D","line":1042,"in_reply_to":"AAAAUH%2F%2FXxY%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7693,"name":"Sidharth Surana","email":"ssurana@vmware.com","username":"ssurana"},"change_message_id":"ee811272af871f36802e374ac790bee439f106b3","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                              client_factory,"},{"line_number":658,"context_line":"                                                              devices,"},{"line_number":659,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":660,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":661,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":662,"context_line":"                                    controller_key, unit_number)"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2Fp2M%3D","line":660,"updated":"2014-02-11 18:50:36.000000000","message":"Missing the check to see if the controller requires to be created in the form of \"controller_spec\" and add that to the config spec before re-configuring the VM","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"2f2bfdcb0bde033034ca7aae86ced23835fe845a","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                              client_factory,"},{"line_number":658,"context_line":"                                                              devices,"},{"line_number":659,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":660,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":661,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":662,"context_line":"                                    controller_key, unit_number)"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2FbQA%3D","line":660,"in_reply_to":"AAAAUX%2F%2FgC8%3D","updated":"2014-02-13 09:45:32.000000000","message":"OK, I got your point. Done.","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":7693,"name":"Sidharth Surana","email":"ssurana@vmware.com","username":"ssurana"},"change_message_id":"031f34e5c7a6a58cb1f87c3bf0a98be6f4192518","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                              client_factory,"},{"line_number":658,"context_line":"                                                              devices,"},{"line_number":659,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":660,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":661,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":662,"context_line":"                                    controller_key, unit_number)"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2FgC8%3D","line":660,"in_reply_to":"AAAAUX%2F%2Fi00%3D","updated":"2014-02-12 18:45:48.000000000","message":"I don\u0027t mean to change any default behaviors, but rather more to be consistent across our code in the way we make use of the controller_spec. For e.g. how we use it in the volumeops \nAlso, the reason not to use the check is based on the default behavior we have today for the devices present in the VM in vSphere. Since, we don\u0027t have control over that it might be good if we just put that check here to safeguard us from any changes to the default devices.","commit_id":"66decb3e1094d841825d36305877a76633e64749"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"790bbfd679d63be488edfc4c51cc266443fe6cf7","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                              client_factory,"},{"line_number":658,"context_line":"                                                              devices,"},{"line_number":659,"context_line":"                                                              \u0027ide\u0027)"},{"line_number":660,"context_line":"        vmdk_attach_config_spec \u003d vm_util.get_cdrom_attach_config_spec("},{"line_number":661,"context_line":"                                    client_factory, datastore, file_path,"},{"line_number":662,"context_line":"                                    controller_key, unit_number)"},{"line_number":663,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2Fi00%3D","line":660,"in_reply_to":"AAAAUX%2F%2Fp2M%3D","updated":"2014-02-12 13:50:11.000000000","message":"We are attaching CDROMs to the default IDE controllers created on the VM. If we need to change this behavior, then I prefer to do it in another patch.","commit_id":"66decb3e1094d841825d36305877a76633e64749"}],"nova/virt/vmwareapi/volume_util.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class StorageError(Exception):"},{"line_number":31,"context_line":"    \"\"\"To raise errors related to Volume commands.\"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def __init__(self, message\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXys%3D","line":30,"updated":"2014-01-14 14:47:00.000000000","message":"TODO: move this to error_util.py","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"}],"nova/virt/vmwareapi/volumeops.py":[{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        devices \u003d self._session._call_method(vim_util,"},{"line_number":57,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":58,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":59,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":60,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":61,"context_line":"                                                              devices,"},{"line_number":62,"context_line":"                                                              adapter_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FX6o%3D","line":59,"updated":"2014-01-14 14:47:00.000000000","message":"-1 The use of \u0027\\\u0027 is frowned upon.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        devices \u003d self._session._call_method(vim_util,"},{"line_number":57,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":58,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":59,"context_line":"        controller_key, unit_number, controller_spec \\"},{"line_number":60,"context_line":"            \u003d vm_util.allocate_controller_key_and_unit_number(client_factory,"},{"line_number":61,"context_line":"                                                              devices,"},{"line_number":62,"context_line":"                                                              adapter_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTa0%3D","line":59,"in_reply_to":"AAAAUH%2F%2FX6o%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                    disk_size, linked_clone, controller_key,"},{"line_number":67,"context_line":"                                    unit_number, device_name)"},{"line_number":68,"context_line":"        if controller_spec:"},{"line_number":69,"context_line":"            vmdk_attach_config_spec.deviceChange.insert(0, controller_spec)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        LOG.debug(_(\"Reconfiguring VM instance %(instance_name)s to attach \""},{"line_number":72,"context_line":"                    \"disk %(vmdk_path)s or device %(device_name)s with type \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FX58%3D","line":69,"updated":"2014-01-14 14:47:00.000000000","message":"I dislike this \u00270\u0027 here. Why is this always 0?","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                    disk_size, linked_clone, controller_key,"},{"line_number":67,"context_line":"                                    unit_number, device_name)"},{"line_number":68,"context_line":"        if controller_spec:"},{"line_number":69,"context_line":"            vmdk_attach_config_spec.deviceChange.insert(0, controller_spec)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        LOG.debug(_(\"Reconfiguring VM instance %(instance_name)s to attach \""},{"line_number":72,"context_line":"                    \"disk %(vmdk_path)s or device %(device_name)s with type \""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTag%3D","line":69,"in_reply_to":"AAAAUH%2F%2FX58%3D","updated":"2014-01-15 09:52:08.000000000","message":"Because fakes assumed that vmdk spec is at position 1. I fixed that.","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                                                \u0027get_dynamic_property\u0027,"},{"line_number":216,"context_line":"                                                vm_ref, \u0027VirtualMachine\u0027,"},{"line_number":217,"context_line":"                                                \u0027config.hardware.device\u0027)"},{"line_number":218,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":219,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hw_devices)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        # Attach the disk to virtual machine instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXzQ%3D","line":218,"updated":"2014-01-14 14:47:00.000000000","message":"again \\ is frowned upon","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                                                \u0027get_dynamic_property\u0027,"},{"line_number":216,"context_line":"                                                vm_ref, \u0027VirtualMachine\u0027,"},{"line_number":217,"context_line":"                                                \u0027config.hardware.device\u0027)"},{"line_number":218,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":219,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hw_devices)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        # Attach the disk to virtual machine instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTac%3D","line":218,"in_reply_to":"AAAAUH%2F%2FXzQ%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":252,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":253,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":254,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":255,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXzE%3D","line":254,"updated":"2014-01-14 14:47:00.000000000","message":"and again \\ is frowned upon","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":252,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":253,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":254,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":255,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hardware_devices)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTaY%3D","line":254,"in_reply_to":"AAAAUH%2F%2FXzE%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"ca9ef3199ab35bc1731c8fe6dff6327edf2082a2","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                                \u0027get_dynamic_property\u0027,"},{"line_number":362,"context_line":"                                                volume_ref, \u0027VirtualMachine\u0027,"},{"line_number":363,"context_line":"                                                \u0027config.hardware.device\u0027)"},{"line_number":364,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":365,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hw_devices)"},{"line_number":366,"context_line":"        # Attach the current volume to the volume_ref"},{"line_number":367,"context_line":"        self.attach_disk_to_vm(volume_ref, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FXzI%3D","line":364,"updated":"2014-01-14 14:47:00.000000000","message":"and again","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae61d67cc87d147575a86f8a9b27099ec27e9408","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                                                \u0027get_dynamic_property\u0027,"},{"line_number":362,"context_line":"                                                volume_ref, \u0027VirtualMachine\u0027,"},{"line_number":363,"context_line":"                                                \u0027config.hardware.device\u0027)"},{"line_number":364,"context_line":"        vmdk_file_path, adapter_type, disk_type \\"},{"line_number":365,"context_line":"            \u003d vm_util.get_vmdk_path_and_adapter_type(hw_devices)"},{"line_number":366,"context_line":"        # Attach the current volume to the volume_ref"},{"line_number":367,"context_line":"        self.attach_disk_to_vm(volume_ref, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FTaU%3D","line":364,"in_reply_to":"AAAAUH%2F%2FXzI%3D","updated":"2014-01-15 09:52:08.000000000","message":"Done","commit_id":"9fcd4d5518d7ca289c4ee3b7d4486c43ad939ecf"},{"author":{"_account_id":9046,"name":"Maithem","email":"munshedm@vmware.com","username":"Maithem"},"change_message_id":"1346d581d08da6516fd1c931a6f994cab77c135f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":58,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":59,"context_line":"        (controller_key, unit_number,"},{"line_number":60,"context_line":"         controller_spec) \u003d vm_util.allocate_controller_key_and_unit_number("},{"line_number":61,"context_line":"                                                              client_factory,"},{"line_number":62,"context_line":"                                                              devices,"},{"line_number":63,"context_line":"                                                              adapter_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FPaM%3D","line":60,"updated":"2014-01-16 00:51:45.000000000","message":"This will break the hot adding capability for VMs that have a scsi controller.\n\nTry this:\n1. glance image-create --name\u003d\"dos\" --disk-format\u003dvmdk --container-format\u003dbare --is-public\u003dtrue --property vmware_adaptertype\u003d\"lsiLogic\" --property vmware_disktype\u003d\"sparse\" \u003c nostalgia-disk1.vmdk\n\n2. Create a VM with the above image\n3. Create a Volume\n4. Try to attach volume to VM\n\nSince you are returning a unity number for a \"newly created controller\" and not the existing one, there will be an attempt to attach the volume in the same slot of the primary disk, which will cause an error.","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"11d57d9f11abc13b24770c7c6ddb311d71cbbe10","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                                    \"get_dynamic_property\", vm_ref,"},{"line_number":58,"context_line":"                                    \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":59,"context_line":"        (controller_key, unit_number,"},{"line_number":60,"context_line":"         controller_spec) \u003d vm_util.allocate_controller_key_and_unit_number("},{"line_number":61,"context_line":"                                                              client_factory,"},{"line_number":62,"context_line":"                                                              devices,"},{"line_number":63,"context_line":"                                                              adapter_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FOFg%3D","line":60,"in_reply_to":"AAAAUH%2F%2FPaM%3D","updated":"2014-01-16 09:13:05.000000000","message":"This method will attach the disk to an adapter with the specified adapter_type. The current behavior is to always create a new controller for non-IDE disks. If this is not the case for hot adding then we can simply fix allocate_controller_key_and_unit_number to find an existing SCSI controller and attach to it. The whole point of this patch is to have a single place where allocation of controller and unit number happens, so we can easily add new features.","commit_id":"16e7be0361a7357476425504d15ea1b4af767584"}]}
