)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a897fe6f5dab97dae2b0ca2c6cae9bf5d54aa9d4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"When detach_interface nova uses \u003cinterface\u003e XML generated"},{"line_number":8,"context_line":"from scatch, which is missing the PCI device information that"},{"line_number":9,"context_line":"libvirt would use to uniquely identify devices."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"In case instance has mutiple interfaces with same MAC address."},{"line_number":12,"context_line":"Libvirt will failed with below error message:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a8ec9b2_b98f68cb","line":9,"updated":"2016-09-19 15:13:05.000000000","message":"The first line needs to be shorter and followed by a blank line. Please see guidelines at\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"f98afd367b72552052314d457436e5466f60a286"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"56acd4818fabb35255080fb27e21a6ea0ab9cf0c","unresolved":false,"context_lines":[{"line_number":16240,"context_line":"                                      expected_flags):"},{"line_number":16241,"context_line":"        instance \u003d self._create_instance()"},{"line_number":16242,"context_line":"        network_info \u003d _fake_network_info(self, 1)"},{"line_number":16243,"context_line":"        domain \u003d FakeVirtDomain(fake_xml \u003d \"\"\""},{"line_number":16244,"context_line":"                \u003cdomain type\u003d\u0027kvm\u0027\u003e"},{"line_number":16245,"context_line":"                    \u003cdevices\u003e"},{"line_number":16246,"context_line":"                        \u003cinterface type\u003d\u0027bridge\u0027\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a629dbe_6399c9c3","line":16243,"updated":"2016-11-11 19:29:53.000000000","message":"pep8 would tell you to not have spaces around the \u003d sign above, but meh. :)","commit_id":"2eda35cdd2a28cb905ff16aad9692ea89ab065af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7aae2a8c84aa71aee42c9fb9b58d2d6ced4f8ce9","unresolved":false,"context_lines":[{"line_number":16404,"context_line":"            \u003c/interface\u003e\"\"\", expected_flags)"},{"line_number":16405,"context_line":"        self.mox.ReplayAll()"},{"line_number":16406,"context_line":"        self.drvr.detach_interface(instance, network_info[0])"},{"line_number":16407,"context_line":"        self.mox.VerifyAll()"},{"line_number":16408,"context_line":""},{"line_number":16409,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.utils.write_to_file\u0027)"},{"line_number":16410,"context_line":"    # NOTE(mdbooth): The following 4 mocks are required to execute"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_b86d719a","line":16407,"updated":"2016-11-16 02:28:15.000000000","message":"Excellent work on this test. Exactly what I was looking for, thank you.","commit_id":"cfe0c978eccd15cd75a43297a53901bed65288f6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3401a066806347f0d061e7a829157a31365ee6a7","unresolved":false,"context_lines":[{"line_number":16549,"context_line":"        # mock out that get_interface_by_cfg doesn\u0027t find the interface"},{"line_number":16550,"context_line":"        guest.get_interface_by_cfg \u003d mock.Mock(return_value\u003dNone)"},{"line_number":16551,"context_line":"        self.drvr.detach_interface(self.context, instance, vif)"},{"line_number":16552,"context_line":"        # an error shouldn\u0027t be logged, but a warning should be logged"},{"line_number":16553,"context_line":"        self.assertFalse(mock_log.error.called)"},{"line_number":16554,"context_line":"        self.assertFalse(mock_log.warning.called)"},{"line_number":16555,"context_line":"        self.assertEqual(1, mock_log.debug.call_count)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_69b94879","line":16552,"range":{"start_line":16552,"start_character":46,"end_line":16552,"end_character":53},"updated":"2016-11-30 20:46:16.000000000","message":"this is also wrong now","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6ae8c6a30363c074250d2c2752589d457125c3a","unresolved":false,"context_lines":[{"line_number":16480,"context_line":"                mox.IsA(objects.Flavor),"},{"line_number":16481,"context_line":"                CONF.libvirt.virt_type,"},{"line_number":16482,"context_line":"                self.drvr._host).AndReturn(expected)"},{"line_number":16483,"context_line":"            domain.detachDeviceFlags(\"\"\""},{"line_number":16484,"context_line":"                \u003cinterface type\u003d\u0027bridge\u0027\u003e"},{"line_number":16485,"context_line":"                  \u003cmac address\u003d\u002752:54:00:f6:35:8f\u0027/\u003e"},{"line_number":16486,"context_line":"                  \u003cmodel type\u003d\u0027virtio\u0027/\u003e"},{"line_number":16487,"context_line":"                  \u003csource bridge\u003d\u0027br0\u0027/\u003e"},{"line_number":16488,"context_line":"                  \u003ctarget dev\u003d\u0027tap12345678\u0027/\u003e"},{"line_number":16489,"context_line":"                  \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027"},{"line_number":16490,"context_line":"                   slot\u003d\u00270x03\u0027 function\u003d\u00270x0\u0027/\u003e"},{"line_number":16491,"context_line":"                \u003c/interface\u003e\"\"\", expected_flags)"},{"line_number":16492,"context_line":""},{"line_number":16493,"context_line":"        self.mox.ReplayAll()"},{"line_number":16494,"context_line":"        if method \u003d\u003d \u0027attach_interface\u0027:"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa31d9ce_a4301e09","line":16491,"range":{"start_line":16483,"start_character":37,"end_line":16491,"end_character":31},"updated":"2017-02-10 00:22:05.000000000","message":"I just realized this is broken because we don\u0027t stub out domain.detachDeviceFlags so this isn\u0027t actually asserted, and the fake domain just has a pass on the detachDeviceFlags method.\n\nSee: https://review.openstack.org/431778","commit_id":"a5c38cc861f052b89bc1ce182f68784c493c723e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6ae8c6a30363c074250d2c2752589d457125c3a","unresolved":false,"context_lines":[{"line_number":16604,"context_line":"                self.drvr._host).AndReturn(expected)"},{"line_number":16605,"context_line":"        expected_flags \u003d (fakelibvirt.VIR_DOMAIN_AFFECT_CONFIG |"},{"line_number":16606,"context_line":"                          fakelibvirt.VIR_DOMAIN_AFFECT_LIVE)"},{"line_number":16607,"context_line":"        domain.detachDeviceFlags(\"\"\""},{"line_number":16608,"context_line":"            \u003cinterface type\u003d\u0027bridge\u0027\u003e"},{"line_number":16609,"context_line":"                \u003cmac address\u003d\u002752:54:00:f6:35:8f\u0027/\u003e"},{"line_number":16610,"context_line":"                \u003cmodel type\u003d\u0027virtio\u0027/\u003e"},{"line_number":16611,"context_line":"                \u003csource bridge\u003d\u0027br0\u0027/\u003e"},{"line_number":16612,"context_line":"                \u003ctarget dev\u003d\u0027tap12345678\u0027/\u003e"},{"line_number":16613,"context_line":"                \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027"},{"line_number":16614,"context_line":"                 slot\u003d\u00270x03\u0027 function\u003d\u00270x0\u0027/\u003e"},{"line_number":16615,"context_line":"            \u003c/interface\u003e\"\"\", expected_flags)"},{"line_number":16616,"context_line":"        self.mox.ReplayAll()"},{"line_number":16617,"context_line":"        self.drvr.detach_interface(self.context, instance, network_info[0])"},{"line_number":16618,"context_line":"        self.mox.VerifyAll()"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa31d9ce_e43a16e7","line":16615,"range":{"start_line":16607,"start_character":8,"end_line":16615,"end_character":44},"updated":"2017-02-10 00:22:05.000000000","message":"This is also broken.","commit_id":"a5c38cc861f052b89bc1ce182f68784c493c723e"}],"nova/tests/unit/virt/libvirt/test_guest.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"10a77894f903bdfe3e6dd5bee456b912630a48fc","unresolved":false,"context_lines":[{"line_number":444,"context_line":"              \u003c/interface\u003e\"\"\")"},{"line_number":445,"context_line":"        self.assertIsNotNone("},{"line_number":446,"context_line":"            self.guest.get_interface_by_cfg(cfg))"},{"line_number":447,"context_line":"        self.assertIsNone(self.guest.get_interface_by_cfg(None))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"    def test_get_info(self):"},{"line_number":450,"context_line":"        self.domain.info.return_value \u003d (1, 2, 3, 4, 5)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_32417e0c","line":447,"updated":"2016-11-30 19:28:39.000000000","message":"to keep the unit test surface area as small and isolated as possible, you probably should have put the unit test of finding a specific interface in a set of interfaces all having the same MAC address in this test file, not the test_driver.py file.\n\nJust FYI for future... That would have allowed you to have much smaller unit tests without a bunch of mox\u0027d mocking out like you have in the test_driver.py test.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f76ed179f4ac4d10f329ba255c660680cbc732c9","unresolved":false,"context_lines":[{"line_number":1152,"context_line":"    def format_address(self):"},{"line_number":1153,"context_line":"        return None"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"    def format_dom(self):"},{"line_number":1156,"context_line":"        dev \u003d super(LibvirtConfigGuestDeviceAddressDrive, self).format_dom()"},{"line_number":1157,"context_line":"        dev.set(\u0027type\u0027, self.type)"},{"line_number":1158,"context_line":"        dev.set(\u0027controller\u0027, self.controller)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_72d136fb","line":1155,"updated":"2016-11-30 19:38:55.000000000","message":"Where is this tested?","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4529f6d689fca3f17aaa5c9f19f9c20ee020cd76","unresolved":false,"context_lines":[{"line_number":1152,"context_line":"    def format_address(self):"},{"line_number":1153,"context_line":"        return None"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"    def format_dom(self):"},{"line_number":1156,"context_line":"        dev \u003d super(LibvirtConfigGuestDeviceAddressDrive, self).format_dom()"},{"line_number":1157,"context_line":"        dev.set(\u0027type\u0027, self.type)"},{"line_number":1158,"context_line":"        dev.set(\u0027controller\u0027, self.controller)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_a63c6fc0","line":1155,"in_reply_to":"5a74a57a_72d136fb","updated":"2016-11-30 19:54:43.000000000","message":"I\u0027m not even sure why you\u0027re adding this to this class, it doesn\u0027t seem used by the fix here.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8eaa59ebe94d12e026e386db6668f813fbc26f59","unresolved":false,"context_lines":[{"line_number":1152,"context_line":"    def format_address(self):"},{"line_number":1153,"context_line":"        return None"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"    def format_dom(self):"},{"line_number":1156,"context_line":"        dev \u003d super(LibvirtConfigGuestDeviceAddressDrive, self).format_dom()"},{"line_number":1157,"context_line":"        dev.set(\u0027type\u0027, self.type)"},{"line_number":1158,"context_line":"        dev.set(\u0027controller\u0027, self.controller)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_e6b90717","line":1155,"in_reply_to":"5a74a57a_a63c6fc0","updated":"2016-11-30 19:57:13.000000000","message":"This doesn\u0027t look needed at all, I ran tox -re cover on this change and this code isn\u0027t tested at all.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d57a8cb67eea3afc3d2ef113107eaade050d35d4","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1328,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1329,"context_line":"                return"},{"line_number":1330,"context_line":" "},{"line_number":1331,"context_line":"            state \u003d guest.get_power_state(self._host)"},{"line_number":1332,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1333,"context_line":"            guest.detach_device(interface, persistent\u003dTrue, live\u003dlive)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_b4a92d7e","line":1330,"updated":"2016-09-19 15:20:37.000000000","message":"Need to fix this whitespace.","commit_id":"f98afd367b72552052314d457436e5466f60a286"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"97238a839ae2480531730610b00c2fbbdfccb744","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1328,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1329,"context_line":"                return"},{"line_number":1330,"context_line":" "},{"line_number":1331,"context_line":"            state \u003d guest.get_power_state(self._host)"},{"line_number":1332,"context_line":"            live \u003d state in (power_state.RUNNING, power_state.PAUSED)"},{"line_number":1333,"context_line":"            guest.detach_device(interface, persistent\u003dTrue, live\u003dlive)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_0a0e38e5","line":1330,"in_reply_to":"7a8ec9b2_b4a92d7e","updated":"2016-09-19 15:52:47.000000000","message":"Fixed","commit_id":"f98afd367b72552052314d457436e5466f60a286"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"4900eccf7572afe0814646f66b1f1766d51c3fb9","unresolved":false,"context_lines":[{"line_number":1314,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":1315,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"        devname \u003d self.vif_driver.get_vif_devname(vif)"},{"line_number":1318,"context_line":"        interface \u003d guest.get_interface(devname)"},{"line_number":1319,"context_line":"        try:"},{"line_number":1320,"context_line":"            self.vif_driver.unplug(instance, vif)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_39671bb8","line":1317,"updated":"2016-10-03 09:16:18.000000000","message":"This isn\u0027t going to work. Not all VIF types use the result of get_vif_devname to set target_dev attribute, and not all VIF types even have a target_dev.","commit_id":"bc5d9dfce39d302bc939aff1fe3f3748642e774b"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"d3ceffd062de326241cab36db9f0fe37bb354249","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1351,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed  because \u0027"},{"line_number":1352,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1353,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"    def _create_snapshot_metadata(self, image_meta, instance,"},{"line_number":1356,"context_line":"                                  img_fmt, snp_name):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a95cdbc_1f005565","side":"PARENT","line":1353,"updated":"2016-10-10 16:29:42.000000000","message":"Removing this code from the exception handler doesn\u0027t seem valid to me. IIUC, the scenario this code was dealing with was that \u0027driver.detach_interface\u0027 can be called multiple times, and so the second time the \u0027guest.detach_device\u0027 call may fail.\n\nYou\u0027ve avoided the race /some/ of the time by calling guest.get_interface_by_cfg upfront. Een if that shows that the interface exists initially, there is no guarantee that it will still exist by the time you get to \u0027guest.detach_device\u0027.  The guest.detach_device call is merely an asynchronous request to the guest - if the guest is slow, the device might not disappear frmo the XML until some time later.","commit_id":"27955dd459ddea7aaff244fca9db89f47c41dffe"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"ae4395d5dcffdb3a4eef43d9ba102f1a3eed8649","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1351,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed  because \u0027"},{"line_number":1352,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1353,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1354,"context_line":""},{"line_number":1355,"context_line":"    def _create_snapshot_metadata(self, image_meta, instance,"},{"line_number":1356,"context_line":"                                  img_fmt, snp_name):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa6399be_da097adf","side":"PARENT","line":1353,"in_reply_to":"1a95cdbc_1f005565","updated":"2016-10-11 01:44:40.000000000","message":"You are right. This part should be recovered.","commit_id":"27955dd459ddea7aaff244fca9db89f47c41dffe"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7aae2a8c84aa71aee42c9fb9b58d2d6ced4f8ce9","unresolved":false,"context_lines":[{"line_number":1328,"context_line":"            if not interface:"},{"line_number":1329,"context_line":"                mac \u003d vif.get(\u0027address\u0027)"},{"line_number":1330,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1331,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1332,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1333,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1334,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_98e35505","line":1331,"updated":"2016-11-16 02:28:15.000000000","message":"would be better to have this as DEBUG level and not WARNING. WARNING level really should be for something that an admin needs to look into fixing, and this isn\u0027t one of those situations.","commit_id":"cfe0c978eccd15cd75a43297a53901bed65288f6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bbcdab3e15d05ae163b4db48a0143f628dee3588","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"            if not interface:"},{"line_number":1365,"context_line":"                mac \u003d vif.get(\u0027address\u0027)"},{"line_number":1366,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1367,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1368,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1369,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1370,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_3e5b0689","line":1367,"updated":"2016-11-16 06:17:00.000000000","message":"I meant this one should be DEBUG and the one below should be WARNING :)","commit_id":"65c66ad415c408888d4cb5860a398213e383868e"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"b1c652a1445167234714afc307e3d131658d7c68","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"            if not interface:"},{"line_number":1365,"context_line":"                mac \u003d vif.get(\u0027address\u0027)"},{"line_number":1366,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1367,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1368,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1369,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1370,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a77a97e_79a918df","line":1367,"in_reply_to":"7a77a97e_3e5b0689","updated":"2016-11-16 06:33:03.000000000","message":"fixed, orz...","commit_id":"65c66ad415c408888d4cb5860a398213e383868e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a80560a47b00629823e60249cdb76a89e31a1526","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"            if not interface:"},{"line_number":1382,"context_line":"                mac \u003d vif.get(\u0027address\u0027)"},{"line_number":1383,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1384,"context_line":"                LOG.debug(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1385,"context_line":"                              \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1386,"context_line":"                          {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1387,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_f249c68f","line":1384,"range":{"start_line":1384,"start_character":26,"end_line":1384,"end_character":29},"updated":"2016-11-30 19:47:48.000000000","message":"This isn\u0027t correct if you\u0027re logging at debug level. -1 for this.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a80560a47b00629823e60249cdb76a89e31a1526","unresolved":false,"context_lines":[{"line_number":1392,"context_line":"        except libvirt.libvirtError as ex:"},{"line_number":1393,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":1394,"context_line":"            if error_code \u003d\u003d libvirt.VIR_ERR_NO_DOMAIN:"},{"line_number":1395,"context_line":"                LOG.warning(_LW(\u0027During detach_interface, \u0027"},{"line_number":1396,"context_line":"                                \u0027instance disappeared.\u0027),"},{"line_number":1397,"context_line":"                            instance\u003dinstance)"},{"line_number":1398,"context_line":"            else:"},{"line_number":1399,"context_line":"                # NOTE(mriedem): When deleting an instance and using Neutron,"},{"line_number":1400,"context_line":"                # we can be racing against Neutron deleting the port and"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_12bf2261","line":1397,"range":{"start_line":1395,"start_character":16,"end_line":1397,"end_character":46},"updated":"2016-11-30 19:47:48.000000000","message":"nit: this is unrelated and didn\u0027t need to change in this patch.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a80560a47b00629823e60249cdb76a89e31a1526","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                # detach the interface, so we might have failed because the"},{"line_number":1403,"context_line":"                # network device no longer exists. Libvirt will fail with"},{"line_number":1404,"context_line":"                # \"operation failed: no matching network device was found\""},{"line_number":1405,"context_line":"                # which unfortunately does not have a unique error code so we"},{"line_number":1406,"context_line":"                # need to look up the interface by MAC and if it\u0027s not found"},{"line_number":1407,"context_line":"                # then we can just log it as a warning rather than tracing an"},{"line_number":1408,"context_line":"                # error."},{"line_number":1409,"context_line":"                mac \u003d vif.get(\u0027address\u0027)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_92ab321e","line":1406,"range":{"start_line":1405,"start_character":72,"end_line":1406,"end_character":54},"updated":"2016-11-30 19:47:48.000000000","message":"nit: this isn\u0027t really what we\u0027re doing anymore","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"10a77894f903bdfe3e6dd5bee456b912630a48fc","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"                             instance_uuid\u003dinstance.uuid)"},{"line_number":1416,"context_line":""},{"line_number":1417,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1418,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1419,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1420,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1421,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_525a7a2b","line":1418,"updated":"2016-11-30 19:28:39.000000000","message":"try to keep style/format-only changes like this one (and lines 1415, 1395-1397) to separate patches. Otherwise, it\u0027s difficult for reviewers who have to go line-by-line to see which line changes are relevant to the patch functionality itself.\n\nJust FYI for the future...","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a80560a47b00629823e60249cdb76a89e31a1526","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"                             instance_uuid\u003dinstance.uuid)"},{"line_number":1416,"context_line":""},{"line_number":1417,"context_line":"                # The interface is gone so just log it as a warning."},{"line_number":1418,"context_line":"                LOG.warning(_LW(\u0027Detaching interface %(mac)s failed because \u0027"},{"line_number":1419,"context_line":"                                \u0027the device is no longer found on the guest.\u0027),"},{"line_number":1420,"context_line":"                            {\u0027mac\u0027: mac}, instance\u003dinstance)"},{"line_number":1421,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_b2aaee17","line":1418,"in_reply_to":"5a74a57a_525a7a2b","updated":"2016-11-30 19:47:48.000000000","message":"Yes, same above.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"}],"nova/virt/libvirt/guest.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a897fe6f5dab97dae2b0ca2c6cae9bf5d54aa9d4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        if node is not None:"},{"line_number":247,"context_line":"            interface \u003d vconfig.LibvirtConfigGuestInterface()"},{"line_number":248,"context_line":"            interface.parse_dom(node)"},{"line_number":249,"context_line":"            return interface"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_vcpus_info(self):"},{"line_number":252,"context_line":"        \"\"\"Returns virtual cpus information of guest."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_141f415c","line":249,"updated":"2016-09-19 15:13:05.000000000","message":"Please put this code back in the way it was before - it should not be using etree.fromstring at all. You should match \u0027device\u0027 against a property on the parsed LibvirtConfigGuestInstance object, not match before parsing.","commit_id":"f98afd367b72552052314d457436e5466f60a286"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"97238a839ae2480531730610b00c2fbbdfccb744","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        if node is not None:"},{"line_number":247,"context_line":"            interface \u003d vconfig.LibvirtConfigGuestInterface()"},{"line_number":248,"context_line":"            interface.parse_dom(node)"},{"line_number":249,"context_line":"            return interface"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def get_vcpus_info(self):"},{"line_number":252,"context_line":"        \"\"\"Returns virtual cpus information of guest."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_0a7b987c","line":249,"in_reply_to":"7a8ec9b2_141f415c","updated":"2016-09-19 15:52:47.000000000","message":"Yeah. It\u0027s awkward to use etree.fromstring. Fixed. Thanks Daniel.","commit_id":"f98afd367b72552052314d457436e5466f60a286"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"56acd4818fabb35255080fb27e21a6ea0ab9cf0c","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                # NOTE(leehom) LibvirtConfigGuestInterface get from domain and"},{"line_number":244,"context_line":"                # LibvirtConfigGuestInterface generated by"},{"line_number":245,"context_line":"                # nova.virt.libvirt.vif.get_config must identical."},{"line_number":246,"context_line":"                if interface.mac_addr \u003d\u003d cfg.mac_addr and \\"},{"line_number":247,"context_line":"                   interface.net_type \u003d\u003d cfg.net_type and \\"},{"line_number":248,"context_line":"                   interface.source_dev \u003d\u003d cfg.source_dev and \\"},{"line_number":249,"context_line":"                   interface.target_dev \u003d\u003d cfg.target_dev and \\"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a629dbe_63d1c922","line":246,"updated":"2016-11-11 19:29:53.000000000","message":"Generally, we prefer to use parens instead of \\ line continuations, so this would be:\n\n if (interface.max_addr \u003d\u003d cfg.mac_addr and\n         interface.net_type \u003d\u003d cfg.net_type and\n         ...):\n\nPlease change to use the parens since the alignment that you\u0027ve made here is on 3 spaces for some reason. Use the indentation I use above (8 spaces for the statements on the lines following the \"if (\" line.","commit_id":"2eda35cdd2a28cb905ff16aad9692ea89ab065af"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4529f6d689fca3f17aaa5c9f19f9c20ee020cd76","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class Guest(object):"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def __init__(self, domain):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        global libvirt"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_b2066e1e","side":"PARENT","line":81,"updated":"2016-11-30 19:54:43.000000000","message":"undo this unrelated change","commit_id":"8b9f9cc8e2e186713defa71bd2eb1f9e5c724421"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4529f6d689fca3f17aaa5c9f19f9c20ee020cd76","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        LibvirtConfigGuestInterface generated"},{"line_number":231,"context_line":"        by nova.virt.libvirt.vif.get_config."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        :param device: device name of the guest interface."},{"line_number":234,"context_line":"        :type cfg: LibvirtConfigGuestInterface object"},{"line_number":235,"context_line":"        :returns: nova.virt.libvirt.config.LibvirtConfigGuestInterface instance"},{"line_number":236,"context_line":"            if found, else None"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_06ffe301","line":233,"range":{"start_line":233,"start_character":8,"end_line":233,"end_character":58},"updated":"2016-11-30 19:54:43.000000000","message":"This is wrong, device isn\u0027t passed in, cfg is.","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4529f6d689fca3f17aaa5c9f19f9c20ee020cd76","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            for interface in interfaces:"},{"line_number":243,"context_line":"                # NOTE(leehom) LibvirtConfigGuestInterface get from domain and"},{"line_number":244,"context_line":"                # LibvirtConfigGuestInterface generated by"},{"line_number":245,"context_line":"                # nova.virt.libvirt.vif.get_config must identical."},{"line_number":246,"context_line":"                if (interface.mac_addr \u003d\u003d cfg.mac_addr and"},{"line_number":247,"context_line":"                        interface.net_type \u003d\u003d cfg.net_type and"},{"line_number":248,"context_line":"                        interface.source_dev \u003d\u003d cfg.source_dev and"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_4620fb9b","line":245,"range":{"start_line":245,"start_character":51,"end_line":245,"end_character":55},"updated":"2016-11-30 19:54:43.000000000","message":"nit: must be","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8e15fc99331e8a0679eb774575006c462b743c06","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                        interface.net_type \u003d\u003d cfg.net_type and"},{"line_number":248,"context_line":"                        interface.source_dev \u003d\u003d cfg.source_dev and"},{"line_number":249,"context_line":"                        interface.target_dev \u003d\u003d cfg.target_dev and"},{"line_number":250,"context_line":"                        interface.vhostuser_path \u003d\u003d cfg.vhostuser_path):"},{"line_number":251,"context_line":"                    return interface"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def get_vcpus_info(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_867cd321","line":250,"range":{"start_line":250,"start_character":24,"end_line":250,"end_character":70},"updated":"2016-11-30 20:01:43.000000000","message":"I\u0027m not really sure why we care about this, does it make a difference if you\u0027re using vhostuser?","commit_id":"1cd08ae0c8bb97d01c4b55b120d79e24b6e6590f"}]}
