)]}'
{"neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except IOError:"},{"line_number":121,"context_line":"            LOG.warning(\"Error reading sriov_numvfs file for device %s.\""},{"line_number":122,"context_line":"                \"Probably not supported by this device\","},{"line_number":123,"context_line":"                dev_name)"},{"line_number":124,"context_line":"            return -1"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_69cc41bc","line":123,"updated":"2019-06-05 13:40:57.000000000","message":"Can you indent these two lines further like others in this file?\n\nAlso, either add a space after the period on first line, or just change to a comma like \"... for device %s, probably...\"","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except IOError:"},{"line_number":121,"context_line":"            LOG.warning(\"Error reading sriov_numvfs file for device %s.\""},{"line_number":122,"context_line":"                \"Probably not supported by this device\","},{"line_number":123,"context_line":"                dev_name)"},{"line_number":124,"context_line":"            return -1"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_048d6c7a","line":123,"in_reply_to":"9fb8cfa7_69cc41bc","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            # giving such devices one more chance to initialize"},{"line_number":430,"context_line":"            if dev_name not in self.skipped_devices:"},{"line_number":431,"context_line":"                LOG.info(\"Device %s has 0 VFs configured. Skipping \""},{"line_number":432,"context_line":"                \"for now to let the device initialize\", dev_name)"},{"line_number":433,"context_line":"                self.skipped_devices.add(dev_name)"},{"line_number":434,"context_line":"                return"},{"line_number":435,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_a960f9a6","line":432,"updated":"2019-06-05 13:40:57.000000000","message":"Same indentation comment","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            # giving such devices one more chance to initialize"},{"line_number":430,"context_line":"            if dev_name not in self.skipped_devices:"},{"line_number":431,"context_line":"                LOG.info(\"Device %s has 0 VFs configured. Skipping \""},{"line_number":432,"context_line":"                \"for now to let the device initialize\", dev_name)"},{"line_number":433,"context_line":"                self.skipped_devices.add(dev_name)"},{"line_number":434,"context_line":"                return"},{"line_number":435,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_64f3080c","line":432,"in_reply_to":"9fb8cfa7_a960f9a6","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            if dev_name not in self.skipped_devices:"},{"line_number":431,"context_line":"                LOG.info(\"Device %s has 0 VFs configured. Skipping \""},{"line_number":432,"context_line":"                \"for now to let the device initialize\", dev_name)"},{"line_number":433,"context_line":"                self.skipped_devices.add(dev_name)"},{"line_number":434,"context_line":"                return"},{"line_number":435,"context_line":"            else:"},{"line_number":436,"context_line":"                # looks like device indeed has 0 VFs configured"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_49905d4f","line":433,"updated":"2019-06-05 13:40:57.000000000","message":"nit: put before log?","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            if dev_name not in self.skipped_devices:"},{"line_number":431,"context_line":"                LOG.info(\"Device %s has 0 VFs configured. Skipping \""},{"line_number":432,"context_line":"                \"for now to let the device initialize\", dev_name)"},{"line_number":433,"context_line":"                self.skipped_devices.add(dev_name)"},{"line_number":434,"context_line":"                return"},{"line_number":435,"context_line":"            else:"},{"line_number":436,"context_line":"                # looks like device indeed has 0 VFs configured"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_84f63cf9","line":433,"in_reply_to":"9fb8cfa7_49905d4f","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            else:"},{"line_number":436,"context_line":"                # looks like device indeed has 0 VFs configured"},{"line_number":437,"context_line":"                # it is probably used just as direct-physical"},{"line_number":438,"context_line":"                LOG.info(\"Device %s has 0 VFs configured\", dev_name)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_e9da7115","line":438,"updated":"2019-06-05 13:40:57.000000000","message":"So in this case is nothing going to happen in the loop at L448?  We\u0027re just falling through to get to the discard() call?\n\nJust thinking if this can be re-organized a little.","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            else:"},{"line_number":436,"context_line":"                # looks like device indeed has 0 VFs configured"},{"line_number":437,"context_line":"                # it is probably used just as direct-physical"},{"line_number":438,"context_line":"                LOG.info(\"Device %s has 0 VFs configured\", dev_name)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_a4bca0dc","line":438,"in_reply_to":"9fb8cfa7_e9da7115","updated":"2019-06-05 14:20:34.000000000","message":"Right, the device will be added with 0 VFs, but capable to serve as direct-physical. The loop at #449 will be skipped but embedded_switch will be appended to self.emb_switches_map at #448, so it\u0027s not only discard call.","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                LOG.info(\"Device %s has 0 VFs configured\", dev_name)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_496ffd91","line":441,"updated":"2019-06-05 13:40:57.000000000","message":"don\u0027t need ()","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                LOG.info(\"Device %s has 0 VFs configured\", dev_name)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_44cb6471","line":441,"in_reply_to":"9fb8cfa7_496ffd91","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"},{"line_number":445,"context_line":"            self.skipped_devices.add(dev_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_89e095fc","line":442,"updated":"2019-06-05 13:40:57.000000000","message":"missing trailing space","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        numvfs_cur \u003d len(embedded_switch.scanned_pci_list)"},{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"},{"line_number":445,"context_line":"            self.skipped_devices.add(dev_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_c4a434bc","line":442,"in_reply_to":"9fb8cfa7_89e095fc","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fddafae1efad5ab954dc6323fb1f478bd1cc5234","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"},{"line_number":445,"context_line":"            self.skipped_devices.add(dev_name)"},{"line_number":446,"context_line":"            return"},{"line_number":447,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_a906b985","line":444,"updated":"2019-06-05 13:40:57.000000000","message":"Same indentation comment, and bonus points if you can use a dict for the arguments :)","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"0b5f0aa8d1e412add5d80913e8b2c2c50ba83b4f","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        if (numvfs \u003e\u003d 0 and numvfs \u003e numvfs_cur):"},{"line_number":442,"context_line":"            LOG.info(\"Not all VFs were initialized on device %s:\""},{"line_number":443,"context_line":"                \"expected - %s, actual - %s. Skipping.\","},{"line_number":444,"context_line":"                dev_name, numvfs, numvfs_cur)"},{"line_number":445,"context_line":"            self.skipped_devices.add(dev_name)"},{"line_number":446,"context_line":"            return"},{"line_number":447,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_84ae3c96","line":444,"in_reply_to":"9fb8cfa7_a906b985","updated":"2019-06-05 14:20:34.000000000","message":"Done","commit_id":"f1b6e75aefb88170c47cfce93a523bef18e59cf5"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"368f2e16756b68ac5731413bdb79d3621159bf4d","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except IOError:"},{"line_number":121,"context_line":"            LOG.warning(\"Error reading sriov_numvfs file for device %s, \""},{"line_number":122,"context_line":"                        \"probably not supported by this device\", dev_name)"},{"line_number":123,"context_line":"            return -1"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class EmbSwitch(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_03a9bddd","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":21},"updated":"2019-06-07 06:34:24.000000000","message":"personally I don\u0027t like the error handling with -1, it is like in C :-)\nIt seems more pythonic to reraise IOError, as nothing is done on the caller side with -1, only the 0 and \u003e\u003d0 are checked in _create_emb_switch.\n\nIf others has no objection I can live with it.","commit_id":"c148c6df468b3ee1a274f191fb4317aef2e4b225"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"25057f6c71549f8c15556521d4074b253e174061","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except IOError:"},{"line_number":121,"context_line":"            LOG.warning(\"Error reading sriov_numvfs file for device %s, \""},{"line_number":122,"context_line":"                        \"probably not supported by this device\", dev_name)"},{"line_number":123,"context_line":"            return -1"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class EmbSwitch(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_e3cca9bd","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":21},"in_reply_to":"9fb8cfa7_03a9bddd","updated":"2019-06-07 06:42:50.000000000","message":"reraise won\u0027t work as we actually want to add such devices. We can only check for initialized VFs if device supports this, otherwise just add, that\u0027s why we don\u0027t particularly check for -1.","commit_id":"c148c6df468b3ee1a274f191fb4317aef2e4b225"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b3e763968f8268534610f9b6bfb133a497dd6a4a","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except IOError:"},{"line_number":121,"context_line":"            LOG.warning(\"Error reading sriov_numvfs file for device %s, \""},{"line_number":122,"context_line":"                        \"probably not supported by this device\", dev_name)"},{"line_number":123,"context_line":"            return -1"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"class EmbSwitch(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_e3cfc4ad","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":21},"in_reply_to":"9fb8cfa7_e3cca9bd","updated":"2019-06-07 12:38:24.000000000","message":"ok","commit_id":"c148c6df468b3ee1a274f191fb4317aef2e4b225"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_eswitch_manager.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"368f2e16756b68ac5731413bdb79d3621159bf4d","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            self.eswitch_mgr._create_emb_switch(physnet, \u0027dev1\u0027, [])"},{"line_number":400,"context_line":"            self.assertIn(physnet, self.eswitch_mgr.emb_switches_map)"},{"line_number":401,"context_line":"            self.assertEqual(set(), self.eswitch_mgr.skipped_devices)"},{"line_number":402,"context_line":"            self.assertIn(\u00270000:04:00.1\u0027, self.eswitch_mgr.pci_slot_map)"},{"line_number":403,"context_line":"            self.assertIn(\u00270000:04:00.2\u0027, self.eswitch_mgr.pci_slot_map)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_create_emb_switch_zero_vfs(self):"},{"line_number":406,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_c3aac5d0","line":403,"range":{"start_line":402,"start_character":12,"end_line":403,"end_character":72},"updated":"2019-06-07 06:34:24.000000000","message":"to avoid duplication and side effects of it:\nassertIn(DEVICES[0][0],....)\nassertIn(DEVICES[1][0], ...)","commit_id":"c148c6df468b3ee1a274f191fb4317aef2e4b225"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"25057f6c71549f8c15556521d4074b253e174061","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            self.eswitch_mgr._create_emb_switch(physnet, \u0027dev1\u0027, [])"},{"line_number":400,"context_line":"            self.assertIn(physnet, self.eswitch_mgr.emb_switches_map)"},{"line_number":401,"context_line":"            self.assertEqual(set(), self.eswitch_mgr.skipped_devices)"},{"line_number":402,"context_line":"            self.assertIn(\u00270000:04:00.1\u0027, self.eswitch_mgr.pci_slot_map)"},{"line_number":403,"context_line":"            self.assertIn(\u00270000:04:00.2\u0027, self.eswitch_mgr.pci_slot_map)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_create_emb_switch_zero_vfs(self):"},{"line_number":406,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_a3c6b199","line":403,"range":{"start_line":402,"start_character":12,"end_line":403,"end_character":72},"in_reply_to":"9fb8cfa7_c3aac5d0","updated":"2019-06-07 06:42:50.000000000","message":"Fair point, I\u0027ll change if have to re-spin, thanks","commit_id":"c148c6df468b3ee1a274f191fb4317aef2e4b225"}]}
