)]}'
{"rally/plugins/openstack/context/network/networks.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"3e2ecfb27cc60e6288c59107b42926e30b6828f9","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):"},{"line_number":98,"context_line":"            for network in tenant_ctx.get(\"networks\", []):"},{"line_number":99,"context_line":"                LOG.debug(\"Network to be deleted is %s\" % network[\"id\"])"},{"line_number":100,"context_line":"                if network[\"id\"] and network[\"id\"] in network_id_list:"},{"line_number":101,"context_line":"                    with logging.ExceptionLogger("},{"line_number":102,"context_line":"                            LOG,"},{"line_number":103,"context_line":"                            _(\"Failed to delete network for tenant %s\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_a5b6983b","line":100,"updated":"2016-05-26 12:18:51.000000000","message":"In what case will network[\"id\"] evaluate to a non-true value? And will the log message just before this be useful in that case?","commit_id":"0347b2e1a4f6359f06d4ee425121e5ce122a7111"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"da35d60f1d974cbe34c368acd60c91d079b3b19f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        network_id_list \u003d [n[\"id\"] for n in net_wrapper.list_networks()]"},{"line_number":97,"context_line":"        for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):"},{"line_number":98,"context_line":"            for network in tenant_ctx.get(\"networks\", []):"},{"line_number":99,"context_line":"                if network[\"id\"] and network[\"id\"] in network_id_list:"},{"line_number":100,"context_line":"                    LOG.debug(\"Network to be deleted is %s\" % network[\"id\"])"},{"line_number":101,"context_line":"                    with logging.ExceptionLogger("},{"line_number":102,"context_line":"                            LOG,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_1c2376be","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":32},"updated":"2016-05-26 14:27:40.000000000","message":"Why this check is needed? If network[\"id\"] may be \"False\" then warning at line 107 will be shown.","commit_id":"07cc156ca859f1c6488b653e614647ec2c0436c6"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"8a6a22a96a62d58253390b8770043ed14ae0c16d","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):"},{"line_number":98,"context_line":"            for network in tenant_ctx.get(\"networks\", []):"},{"line_number":99,"context_line":"                try:"},{"line_number":100,"context_line":"                    if network[\"id\"] in network_id_list:"},{"line_number":101,"context_line":"                        LOG.debug(\"Network to be \""},{"line_number":102,"context_line":"                                  \"deleted is %s\" % network[\"id\"])"},{"line_number":103,"context_line":"                        with logging.ExceptionLogger("}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_c847c175","line":100,"range":{"start_line":100,"start_character":36,"end_line":100,"end_character":37},"updated":"2016-05-30 11:45:06.000000000","message":"This list will not change if we delete network.\nnetwork_id_list \u003d [1, 2, 3]\ndelete(2)\n\u003e\u003e\u003e network_id_list\n[1, 2, 3]\nCorrect me if I\u0027m wrong","commit_id":"6f9c20bf6ae4ad78c3399734d59d31cc2c2db67b"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"4f229119ab38bf991b5d8cd78c98a4dba3b996e3","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):"},{"line_number":98,"context_line":"            for network in tenant_ctx.get(\"networks\", []):"},{"line_number":99,"context_line":"                try:"},{"line_number":100,"context_line":"                    if network[\"id\"] in network_id_list:"},{"line_number":101,"context_line":"                        LOG.debug(\"Network to be \""},{"line_number":102,"context_line":"                                  \"deleted is %s\" % network[\"id\"])"},{"line_number":103,"context_line":"                        with logging.ExceptionLogger("}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_d35ad229","line":100,"range":{"start_line":100,"start_character":36,"end_line":100,"end_character":37},"in_reply_to":"9abb7d3a_c847c175","updated":"2016-05-30 11:48:07.000000000","message":"Predict solution like:\n  for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):\n            for network in tenant_ctx.get(\"networks\", []):\n              if network[\"id\"] in net_wrapper.list_networks():\n\nThis is bad due to very slow performance of list_networks command","commit_id":"6f9c20bf6ae4ad78c3399734d59d31cc2c2db67b"},{"author":{"_account_id":21004,"name":"SHIPeiqi","email":"shipeiqi@cmss.chinamobile.com","username":"peiqishi"},"change_message_id":"ef216d346f3be4e80531d640e308c544d0cc1f45","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        for tenant_id, tenant_ctx in six.iteritems(self.context[\"tenants\"]):"},{"line_number":98,"context_line":"            for network in tenant_ctx.get(\"networks\", []):"},{"line_number":99,"context_line":"                try:"},{"line_number":100,"context_line":"                    if network[\"id\"] in network_id_list:"},{"line_number":101,"context_line":"                        LOG.debug(\"Network to be \""},{"line_number":102,"context_line":"                                  \"deleted is %s\" % network[\"id\"])"},{"line_number":103,"context_line":"                        with logging.ExceptionLogger("}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_9315ea9c","line":100,"range":{"start_line":100,"start_character":36,"end_line":100,"end_character":37},"in_reply_to":"9abb7d3a_d35ad229","updated":"2016-05-30 12:05:34.000000000","message":"great mark! thank you Roman :)","commit_id":"6f9c20bf6ae4ad78c3399734d59d31cc2c2db67b"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"2d48317610d78fedcacd4898bf52a2a600a6bbeb","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        LOG.warning(\"Network %s has already \""},{"line_number":110,"context_line":"                                    \"been deleted\" % network[\"id\"])"},{"line_number":111,"context_line":"                except KeyError:"},{"line_number":112,"context_line":"                    LOG.error(\"network %s doesn\u0027t have valide id\" % network)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_35dd4643","line":112,"updated":"2016-05-27 13:18:18.000000000","message":"1. \"Network %s doesn\u0027t have an ID\"\n\n2. When will this happen?","commit_id":"6f9c20bf6ae4ad78c3399734d59d31cc2c2db67b"}],"tests/unit/plugins/openstack/context/network/test_network.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"3e2ecfb27cc60e6288c59107b42926e30b6828f9","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        net_context.cleanup()"},{"line_number":97,"context_line":"        expected_call_args_list \u003d []"},{"line_number":98,"context_line":"        self.assertEqual(sorted(expected_call_args_list),"},{"line_number":99,"context_line":"                         sorted(mock_wrap().delete_network.call_args_list))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        mock_wrap().list_networks.return_value \u003d [{\"id\": \"toto_net\"},"},{"line_number":102,"context_line":"                                                  {\"id\": \"foo_net\"},"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_457a4c25","line":99,"updated":"2016-05-26 12:18:51.000000000","message":"Here you can just do:\n\n    self.assertFalse(mock_wrap.return_value.delete_network.called)","commit_id":"0347b2e1a4f6359f06d4ee425121e5ce122a7111"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"3e2ecfb27cc60e6288c59107b42926e30b6828f9","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        expected_call_args_list \u003d [mock.call({\"id\": \"bar_net\"}),"},{"line_number":106,"context_line":"                                   mock.call({\"id\": \"foo_net\"})]"},{"line_number":107,"context_line":"        self.assertEqual(sorted(expected_call_args_list),"},{"line_number":108,"context_line":"                         sorted(mock_wrap().delete_network.call_args_list))"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_25daa84b","line":108,"updated":"2016-05-26 12:18:51.000000000","message":"1. This assertion could be better written as:\n\n    self.assertItemsEqual(\n        expected_call_args_list,\n        mock_wrap.return_value.delete_network.call_args_list)\n\n2. You can cover both of these cases in a single test, where list_networks returns, for instance, toto_net and foo_net, but not bar_net.\n\n3. Don\u0027t combine test cases into a single function like this; it\u0027s important that mocks get reset and setup is performed anew between every set of cases. If you feel that two tests are needed for this, then please separate them into two functions.","commit_id":"0347b2e1a4f6359f06d4ee425121e5ce122a7111"}]}
