)]}'
{"nova/tests/unit/virt/libvirt/test_host.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"6db95e996ad092910ef8de50698fe2c8a8230ebb","unresolved":false,"context_lines":[{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def test_get_cpu_stats(self):"},{"line_number":824,"context_line":"        with mock.patch.object(host.Host, \"get_connection\") as mock_conn:"},{"line_number":825,"context_line":"            mock_conn().getCPUStats.return_value \u003d {}"},{"line_number":826,"context_line":"            stats \u003d self.host.get_cpu_stats()"},{"line_number":827,"context_line":"            self.assertIn(\u0027frequency\u0027, stats)"},{"line_number":828,"context_line":"            mock_conn().getCPUStats.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_84bc8b6d","line":825,"updated":"2015-04-28 12:42:41.000000000","message":"Actually, we shouldn\u0027t need to mock this out at all. This entire test suite is setup to use fakelibvirt, and there\u0027s a fixed return value for getCPUStats with fake libvirt, that you can just test against here.","commit_id":"49316ba59f5b176ffef0b4b08709326994ec92fa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd58b3d269ab9180ee92f73dc1256cb66746dc5b","unresolved":false,"context_lines":[{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def test_get_cpu_stats(self):"},{"line_number":824,"context_line":"        with mock.patch.object(host.Host, \"get_connection\") as mock_conn:"},{"line_number":825,"context_line":"            mock_conn().getCPUStats.return_value \u003d {}"},{"line_number":826,"context_line":"            stats \u003d self.host.get_cpu_stats()"},{"line_number":827,"context_line":"            self.assertIn(\u0027frequency\u0027, stats)"},{"line_number":828,"context_line":"            mock_conn().getCPUStats.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_9a74e6fd","line":825,"in_reply_to":"7ad32947_24401756","updated":"2015-04-28 13:18:27.000000000","message":"OK I get it, I will do.","commit_id":"49316ba59f5b176ffef0b4b08709326994ec92fa"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ac9391e55c4214eaf28deacb723693ba9f756a0e","unresolved":false,"context_lines":[{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def test_get_cpu_stats(self):"},{"line_number":824,"context_line":"        with mock.patch.object(host.Host, \"get_connection\") as mock_conn:"},{"line_number":825,"context_line":"            mock_conn().getCPUStats.return_value \u003d {}"},{"line_number":826,"context_line":"            stats \u003d self.host.get_cpu_stats()"},{"line_number":827,"context_line":"            self.assertIn(\u0027frequency\u0027, stats)"},{"line_number":828,"context_line":"            mock_conn().getCPUStats.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_24401756","line":825,"in_reply_to":"7ad32947_84bc8b6d","updated":"2015-04-28 12:45:11.000000000","message":"Or alternatively, annotate the method with  @mock.patch.object(fakelibvirt.virConnect, \"getCPUStats\") instead of using a nested context.","commit_id":"49316ba59f5b176ffef0b4b08709326994ec92fa"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a9605f0f6c1933e5e423498edb30f5b628214466","unresolved":false,"context_lines":[{"line_number":6180,"context_line":""},{"line_number":6181,"context_line":"    def get_host_cpu_stats(self):"},{"line_number":6182,"context_line":"        \"\"\"Return the current CPU state of the host.\"\"\""},{"line_number":6183,"context_line":"        stats \u003d self._host.get_cpu_stats()[3]"},{"line_number":6184,"context_line":"        # getInfo() returns various information about the host node"},{"line_number":6185,"context_line":"        # No. 3 is the expected CPU frequency."},{"line_number":6186,"context_line":"        stats[\"frequency\"] \u003d self._host.get_hardware_info()[3]"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab921fb_f1c86624","line":6183,"updated":"2015-04-24 13:01:44.000000000","message":"I don\u0027t think you meant to add the [3]  suffix here.","commit_id":"4ea72e1cc463fa9ebd673732b04fb1e015a90892"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a9605f0f6c1933e5e423498edb30f5b628214466","unresolved":false,"context_lines":[{"line_number":6183,"context_line":"        stats \u003d self._host.get_cpu_stats()[3]"},{"line_number":6184,"context_line":"        # getInfo() returns various information about the host node"},{"line_number":6185,"context_line":"        # No. 3 is the expected CPU frequency."},{"line_number":6186,"context_line":"        stats[\"frequency\"] \u003d self._host.get_hardware_info()[3]"},{"line_number":6187,"context_line":"        return stats"},{"line_number":6188,"context_line":""},{"line_number":6189,"context_line":"    def get_host_uptime(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab921fb_91a36a4f","line":6186,"updated":"2015-04-24 13:01:44.000000000","message":"Lets make the Host.get_cpu_stats() method add the \u0027frequency\u0027 field, so this method in driver.py can go away entirely - things can just directly call the host.get_cpu_stats() method","commit_id":"4ea72e1cc463fa9ebd673732b04fb1e015a90892"}],"nova/virt/libvirt/host.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"a9605f0f6c1933e5e423498edb30f5b628214466","unresolved":false,"context_lines":[{"line_number":877,"context_line":""},{"line_number":878,"context_line":"    def get_cpu_stats(self):"},{"line_number":879,"context_line":"        \"\"\"Returns the current CPU state of the host.\"\"\""},{"line_number":880,"context_line":"        return self._conn.getCPUStats(libvirt.VIR_NODE_CPU_STATS_ALL_CPUS, 0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab921fb_31e7feb1","line":880,"updated":"2015-04-24 13:01:44.000000000","message":"Lets have a test case added for this in test_host.py","commit_id":"4ea72e1cc463fa9ebd673732b04fb1e015a90892"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"3eb940c8a159e64e4470b959dc2b1a2a18a7e85c","unresolved":false,"context_lines":[{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    def get_cpu_frequency(self):"},{"line_number":933,"context_line":"        \"\"\"Returns cpu frequency of the host.\"\"\""},{"line_number":934,"context_line":"        return self._get_hardware_info()[3]"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"    def get_cpu_stats(self):"},{"line_number":937,"context_line":"        \"\"\"Returns the current CPU state of the host with frequency.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9abe1de1_ba110d60","line":934,"updated":"2015-04-27 09:10:46.000000000","message":"I think I\u0027d just inline this into  get_cpu_stats(), since I don\u0027t expect anything will ever need to call get_cpu_frequency directly","commit_id":"cfe06f59d2b39f71eba521dc37e521e824c37eef"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5899bd139fc7c8f4daf68ccf209cd823b9ecf846","unresolved":false,"context_lines":[{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    def get_cpu_frequency(self):"},{"line_number":933,"context_line":"        \"\"\"Returns cpu frequency of the host.\"\"\""},{"line_number":934,"context_line":"        return self._get_hardware_info()[3]"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"    def get_cpu_stats(self):"},{"line_number":937,"context_line":"        \"\"\"Returns the current CPU state of the host with frequency.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9abe1de1_763ee9b9","line":934,"in_reply_to":"9abe1de1_ba110d60","updated":"2015-04-27 12:13:48.000000000","message":"Done","commit_id":"cfe06f59d2b39f71eba521dc37e521e824c37eef"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3cd95467fa9c47042bad14c05303a8804521645e","unresolved":false,"context_lines":[{"line_number":932,"context_line":"    def get_cpu_stats(self):"},{"line_number":933,"context_line":"        \"\"\"Returns the current CPU state of the host with frequency.\"\"\""},{"line_number":934,"context_line":"        stats \u003d self.get_connection().getCPUStats("},{"line_number":935,"context_line":"            libvirt.VIR_NODE_CPU_STATS_ALL_CPUS, 0)"},{"line_number":936,"context_line":"        stats[\"frequency\"] \u003d self._get_hardware_info()[3]"},{"line_number":937,"context_line":"        return stats"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_f7965393","line":935,"updated":"2015-04-28 12:49:49.000000000","message":"Pathetic nit but can you please add the comment:\n\n        # getInfo() returns various information about the host node\n        # No. 3 is the expected CPU frequency.","commit_id":"49316ba59f5b176ffef0b4b08709326994ec92fa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd58b3d269ab9180ee92f73dc1256cb66746dc5b","unresolved":false,"context_lines":[{"line_number":932,"context_line":"    def get_cpu_stats(self):"},{"line_number":933,"context_line":"        \"\"\"Returns the current CPU state of the host with frequency.\"\"\""},{"line_number":934,"context_line":"        stats \u003d self.get_connection().getCPUStats("},{"line_number":935,"context_line":"            libvirt.VIR_NODE_CPU_STATS_ALL_CPUS, 0)"},{"line_number":936,"context_line":"        stats[\"frequency\"] \u003d self._get_hardware_info()[3]"},{"line_number":937,"context_line":"        return stats"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_ba4e82bf","line":935,"in_reply_to":"7ad32947_f7965393","updated":"2015-04-28 13:18:27.000000000","message":"Sure I will do.","commit_id":"49316ba59f5b176ffef0b4b08709326994ec92fa"}]}
