)]}'
{"nova/api/openstack/compute/hosts.py":[{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"cb894c50614de0cd5e8b58229704c7d478034e90","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                             \u0027project\u0027: \u0027(used_now)\u0027,"},{"line_number":229,"context_line":"                             \u0027cpu\u0027: cpu,"},{"line_number":230,"context_line":"                             \u0027memory_mb\u0027: memory_mb,"},{"line_number":231,"context_line":"                             \u0027disk_gb\u0027: disk_gb}}"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @staticmethod"},{"line_number":234,"context_line":"    def _get_resource_totals_from_instances(host_name, instances):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_28cc5069","line":231,"updated":"2015-08-19 08:07:59.000000000","message":"It seems there is no difference between the two functions \"_get_total_resources\" and \"_get_used_now_resources\" except the return statement field \"project\". I think they can be merged for optimal code OR a differentiation is required while passing \"compute_nodes\" to these functions. Please clarify.","commit_id":"92133a49d4525df0a1cf1fc03dae965aea74f016"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"cb894c50614de0cd5e8b58229704c7d478034e90","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"},{"line_number":287,"context_line":"        resources \u003d [self._get_total_resources(host_name, compute_nodes)]"},{"line_number":288,"context_line":"        resources.append(self._get_used_now_resources(host_name,"},{"line_number":289,"context_line":"                                                      compute_nodes))"},{"line_number":290,"context_line":"        resources.append(self._get_resource_totals_from_instances(host_name,"},{"line_number":291,"context_line":"                                                                  instances))"},{"line_number":292,"context_line":"        by_proj_resources \u003d self._get_resources_by_project(host_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_6836c853","line":289,"updated":"2015-08-19 08:07:59.000000000","message":"Calling get_used_now_resources after _get_total_resources() may end up listing the same set of resources twice unless the list passed in compute_nodes is differentiated. Please Clarify","commit_id":"92133a49d4525df0a1cf1fc03dae965aea74f016"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ee20026407616098ba5ec972aeb3582c9f840317","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                              \u0027project\u0027: \u0027(used_now)\u0027,"},{"line_number":225,"context_line":"                              \u0027cpu\u0027: vcpus_used,"},{"line_number":226,"context_line":"                              \u0027memory_mb\u0027: memory_mb_used,"},{"line_number":227,"context_line":"                              \u0027disk_gb\u0027: local_gb_used}}]"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    @staticmethod"},{"line_number":230,"context_line":"    def _get_resource_totals_from_instances(host_name, instances):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_5e84c15c","line":227,"updated":"2015-08-28 19:26:44.000000000","message":"This doesn\u0027t make sense. If you have 4 nodes with 1T disk each, you can\u0027t schedule a 4T instance.","commit_id":"e60ed6b2b1d5e20b03dbf6be9099875d0cf63553"}],"nova/api/openstack/compute/legacy_v2/contrib/hosts.py":[{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"cb894c50614de0cd5e8b58229704c7d478034e90","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"},{"line_number":319,"context_line":"        resources \u003d [self._get_total_resources(host_name, compute_nodes)]"},{"line_number":320,"context_line":"        resources.append(self._get_used_now_resources(host_name,"},{"line_number":321,"context_line":"                                                      compute_nodes))"},{"line_number":322,"context_line":"        resources.append(self._get_resource_totals_from_instances(host_name,"},{"line_number":323,"context_line":"                                                                  instances))"},{"line_number":324,"context_line":"        by_proj_resources \u003d self._get_resources_by_project(host_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_e82178fc","line":321,"updated":"2015-08-19 08:07:59.000000000","message":"Both _get_total_resources() and _get_used_now_resources() seem to gather the same set of resources except for the value in the return field \"project\". I think the compute_nodes list should be differentiated to ensure unique entries in the result. Please clarify.","commit_id":"92133a49d4525df0a1cf1fc03dae965aea74f016"}],"nova/tests/unit/api/openstack/compute/contrib/test_hosts.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"a05b0572797678af03a10ed076468f00785f335e","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        ctxt \u003d self.req.environ[\"nova.context\"]"},{"line_number":379,"context_line":"        dic \u003d {\u0027host\u0027: \u0027dummy\u0027, \u0027binary\u0027: \u0027nova-compute\u0027, \u0027topic\u0027: \u0027compute\u0027,"},{"line_number":380,"context_line":"               \u0027report_count\u0027: 0}"},{"line_number":381,"context_line":"        s_ref \u003d db.service_create(ctxt, dic)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        dic \u003d {\u0027service_id\u0027: s_ref[\u0027id\u0027],"},{"line_number":384,"context_line":"               \u0027host\u0027: s_ref[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_94b6ba3c","line":381,"updated":"2015-08-11 14:13:47.000000000","message":"seems this is not mocked \ndo we really need to create service?\n\nwe can mock the function get_all_by_host then do the remainly test, can we?","commit_id":"2f571d1386e1371bef99ceb41aac0f7fc4228af3"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"41f63bf7dfb5ef3bd1543a0a8ff2e89fc097fab1","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        ctxt \u003d self.req.environ[\"nova.context\"]"},{"line_number":379,"context_line":"        dic \u003d {\u0027host\u0027: \u0027dummy\u0027, \u0027binary\u0027: \u0027nova-compute\u0027, \u0027topic\u0027: \u0027compute\u0027,"},{"line_number":380,"context_line":"               \u0027report_count\u0027: 0}"},{"line_number":381,"context_line":"        s_ref \u003d db.service_create(ctxt, dic)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        dic \u003d {\u0027service_id\u0027: s_ref[\u0027id\u0027],"},{"line_number":384,"context_line":"               \u0027host\u0027: s_ref[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_15536818","line":381,"in_reply_to":"1a4dcd0f_94b6ba3c","updated":"2015-08-12 02:56:35.000000000","message":"Done","commit_id":"2f571d1386e1371bef99ceb41aac0f7fc4228af3"}]}
