)]}'
{"nova/compute/api.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"af689349fce9b7d1a3936e3ab61c6db6a473cd5b","unresolved":false,"context_lines":[{"line_number":3666,"context_line":"                                                         hypervisor_match)"},{"line_number":3667,"context_line":""},{"line_number":3668,"context_line":"    def compute_node_statistics(self, context):"},{"line_number":3669,"context_line":"        return {key: int(value) for key, value in"},{"line_number":3670,"context_line":"                self.db.compute_node_statistics(context)}"},{"line_number":3671,"context_line":""},{"line_number":3672,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_eb227200","line":3669,"range":{"start_line":3669,"start_character":21,"end_line":3669,"end_character":31},"updated":"2016-03-02 17:11:33.000000000","message":"Since \u0027value\u0027 can be None, this should probably be:\n\n   int(value or 0)","commit_id":"0517797afcfbd3a16e12e022d3ff32fb1e752ec4"},{"author":{"_account_id":10327,"name":"Feng Xi Yan","email":"yanfengxi@cn.ibm.com","username":"yanfengxi"},"change_message_id":"71ebc58a0f2ad36acff390988c041706d2848524","unresolved":false,"context_lines":[{"line_number":3666,"context_line":"                                                         hypervisor_match)"},{"line_number":3667,"context_line":""},{"line_number":3668,"context_line":"    def compute_node_statistics(self, context):"},{"line_number":3669,"context_line":"        return {key: int(value) for key, value in"},{"line_number":3670,"context_line":"                self.db.compute_node_statistics(context).items()}"},{"line_number":3671,"context_line":""},{"line_number":3672,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_dc675fe7","line":3669,"updated":"2016-03-03 03:44:04.000000000","message":"I think this will python2.6 and 2.7\n\nYou should add unit test for this change.","commit_id":"130ca1d5b2917cecb86d28c76002a6499b9f3fab"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4bcb2567c5051c7196385186e5f20c9be1762a0a","unresolved":false,"context_lines":[{"line_number":3666,"context_line":"                                                         hypervisor_match)"},{"line_number":3667,"context_line":""},{"line_number":3668,"context_line":"    def compute_node_statistics(self, context):"},{"line_number":3669,"context_line":"        return {key: int(value) for key, value in"},{"line_number":3670,"context_line":"                self.db.compute_node_statistics(context).items()}"},{"line_number":3671,"context_line":""},{"line_number":3672,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_72b6b83e","line":3669,"in_reply_to":"7af24918_1ecd1e85","updated":"2016-03-28 17:07:37.000000000","message":"Getting this:\n\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions [req-5b333ad0-b307-4097-9dbd-f133266ee66e tempest-HypervisorAdminTestJSON-924001785 tempest-HypervisorAdminTestJSON-1035878903] Unexpected exception in API method\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions Traceback (most recent call last):\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions   File \"/opt/stack/nova/nova/api/openstack/extensions.py\", line 478, in wrapped\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions   File \"/opt/stack/nova/nova/api/openstack/compute/hypervisors.py\", line 180, in statistics\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions     stats \u003d self.host_api.compute_node_statistics(context)\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions   File \"/opt/stack/nova/nova/compute/api.py\", line 3732, in compute_node_statistics\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions     self.db.compute_node_statistics(context).items()}\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions   File \"/opt/stack/nova/nova/compute/api.py\", line 3731, in \u003cdictcomp\u003e\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions     return {key: int(value) for key, value in\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions TypeError: int() argument must be a string or a number, not \u0027NoneType\u0027\n2016-03-28 14:56:47.592 3655 ERROR nova.api.openstack.extensions","commit_id":"130ca1d5b2917cecb86d28c76002a6499b9f3fab"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"a05bb9d1cb43a0663543384b9e17f9fb8e72313f","unresolved":false,"context_lines":[{"line_number":3666,"context_line":"                                                         hypervisor_match)"},{"line_number":3667,"context_line":""},{"line_number":3668,"context_line":"    def compute_node_statistics(self, context):"},{"line_number":3669,"context_line":"        return {key: int(value) for key, value in"},{"line_number":3670,"context_line":"                self.db.compute_node_statistics(context).items()}"},{"line_number":3671,"context_line":""},{"line_number":3672,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_1ecd1e85","line":3669,"in_reply_to":"7af24918_dc675fe7","updated":"2016-03-03 13:55:19.000000000","message":"Not sure what you want tested. Python 2.6 is not supported.","commit_id":"130ca1d5b2917cecb86d28c76002a6499b9f3fab"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7477e778c5d82f50799209c52e4d21414f2b7f67","unresolved":false,"context_lines":[{"line_number":746,"context_line":"    results \u003d conn.execute(select).fetchall()"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    # Callers expect dict-like objects, not SQLAlchemy RowProxy objects..."},{"line_number":749,"context_line":"    results \u003d [dict(r) for r in results]"},{"line_number":750,"context_line":"    conn.close()"},{"line_number":751,"context_line":"    return results"},{"line_number":752,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_fdd9a784","line":749,"updated":"2016-03-02 14:57:23.000000000","message":"This isn\u0027t dictifying deep enough, which is what is giving us the json serialization error in the tests.","commit_id":"ed3e04ffd9e45fbca5014a3b4f7db16016cb32b3"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b95239c66f8452f345aa5fe727558b66ae68a9f2","unresolved":false,"context_lines":[{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    inner_sel \u003d sa.alias(_compute_node_select(context), name\u003d\u0027inner_sel\u0027)"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":"    # NOTE(jaypipes): PostgreSQL doesn\u0027t have IFNULL(). It has COALESCE()"},{"line_number":908,"context_line":"    ifnull \u003d sql.func.ifnull"},{"line_number":909,"context_line":"    if engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":910,"context_line":"        ifnull \u003d sql.func.coalesce"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba0121b8_c3e86013","line":907,"updated":"2016-03-29 17:03:04.000000000","message":"Since you\u0027re willing to accept coalesce when using postgresql, why not just use coalesce() for any engine? mysql and sqlite both happy with it.","commit_id":"ff2c20b4a51f2f4e56a561c52527bde0e81c842f"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"37ebde1cea0def2752f136ace7f8cadfb0d95959","unresolved":false,"context_lines":[{"line_number":7733,"context_line":"        db.compute_node_create(self.ctxt, compute_node_dict)"},{"line_number":7734,"context_line":"        stats \u003d db.compute_node_statistics(self.ctxt)"},{"line_number":7735,"context_line":""},{"line_number":7736,"context_line":"        # These numbers asserted below come from adding up the"},{"line_number":7737,"context_line":"        # compute node inventory of the self.item thing and the"},{"line_number":7738,"context_line":"        # node we just added above."},{"line_number":7739,"context_line":"        self.assertEqual(2, stats[\u0027count\u0027])"},{"line_number":7740,"context_line":"        self.assertEqual(6, stats[\u0027vcpus\u0027])"},{"line_number":7741,"context_line":"        self.assertEqual(5120, stats[\u0027memory_mb\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_830920e0","line":7738,"range":{"start_line":7736,"start_character":0,"end_line":7738,"end_character":35},"updated":"2016-03-02 16:55:12.000000000","message":"It would have been better to actually do that math, e.g.:\n\n    exp_vcpus \u003d self.item[\"vcpus\"] + compute_node_dict[\"vcpus\"]\n    ...\n    self.assertEqual(exp_vcpus, stats[\u0027vcpus\u0027])\n\nbut definitely not a show-stopper.","commit_id":"ed3e04ffd9e45fbca5014a3b4f7db16016cb32b3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a6c216cef1a6e9b44ac1b679f66eda5e9abc58b4","unresolved":false,"context_lines":[{"line_number":7795,"context_line":"        self.assertEqual(exp_free_disk_gb, stats[\u0027free_disk_gb\u0027])"},{"line_number":7796,"context_line":"        self.assertEqual(exp_running_vms, stats[\u0027running_vms\u0027])"},{"line_number":7797,"context_line":"        self.assertEqual(exp_current_workload, stats[\u0027current_workload\u0027])"},{"line_number":7798,"context_line":""},{"line_number":7799,"context_line":"    def test_compute_node_statistics_disabled_service(self):"},{"line_number":7800,"context_line":"        serv \u003d db.service_get_by_host_and_topic("},{"line_number":7801,"context_line":"            self.ctxt, \u0027host1\u0027, CONF.compute_topic)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_35372e4e","line":7798,"updated":"2016-04-01 09:19:17.000000000","message":"Well, I\u0027m pretty sure new Inventories would work given the COALESCE query, but I\u0027m a bit sad to not see a test for checking the statistics are still okay.\n\nThat\u0027s perhaps something we can merge in a follow-up patch tho.","commit_id":"8941b45bc58a833261bb09fc7eb8fb5c765e154a"}]}
