)]}'
{"karbor/services/protection/protectable_plugins/network.py":[{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"e99448e44d69d1599f2ebf8e6f579c6d5796296a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            netclient \u003d self._neutron_client(context)"},{"line_number":59,"context_line":"            networks \u003d netclient.list_networks("},{"line_number":60,"context_line":"                project_id\u003dcontext.project_id).get(\u0027networks\u0027)"},{"line_number":61,"context_line":"        except Exception as e:"},{"line_number":62,"context_line":"            LOG.exception(\"List all summary networks from neutron failed.\")"},{"line_number":63,"context_line":"            raise exception.ListProtectableResourceFailed("}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_960b8222","line":60,"range":{"start_line":60,"start_character":0,"end_line":60,"end_character":62},"updated":"2017-08-29 07:16:21.000000000","message":"I notice that the filter parameter name about the project should be \u0027tenant_id\u0027 in neutron client. Have you already confirmed that \u0027project_id\u0027 is also available?\nhttps://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/network.py#L54","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"a3b482394c1ea3ca00c5f446e35304d6e1000880","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            netclient \u003d self._neutron_client(context)"},{"line_number":59,"context_line":"            networks \u003d netclient.list_networks("},{"line_number":60,"context_line":"                project_id\u003dcontext.project_id).get(\u0027networks\u0027)"},{"line_number":61,"context_line":"        except Exception as e:"},{"line_number":62,"context_line":"            LOG.exception(\"List all summary networks from neutron failed.\")"},{"line_number":63,"context_line":"            raise exception.ListProtectableResourceFailed("}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_563abacb","line":60,"range":{"start_line":60,"start_character":0,"end_line":60,"end_character":62},"in_reply_to":"7f287b81_960b8222","updated":"2017-08-29 07:41:53.000000000","message":"I debug the neutron client, it seems when we use neutron client the code you commented seems not be used. neutron client calls do_request at last.\nhttps://github.com/openstack/python-neutronclient/blob/master/neutronclient/v2_0/client.py#L270\n\nproject_id will be set as a url parameter.\n\nIn my test, it works well.","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"e99448e44d69d1599f2ebf8e6f579c6d5796296a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            netclient \u003d self._neutron_client(context)"},{"line_number":96,"context_line":"            networks \u003d netclient.list_networks("},{"line_number":97,"context_line":"                project_id\u003dcontext.project_id).get(\u0027networks\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            if networks:"},{"line_number":100,"context_line":"                return [resource.Resource(type\u003dself._SUPPORT_RESOURCE_TYPE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_93f5d4ef","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":62},"updated":"2017-08-29 07:16:21.000000000","message":"Here it should be parent resource id.","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"a3b482394c1ea3ca00c5f446e35304d6e1000880","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            netclient \u003d self._neutron_client(context)"},{"line_number":96,"context_line":"            networks \u003d netclient.list_networks("},{"line_number":97,"context_line":"                project_id\u003dcontext.project_id).get(\u0027networks\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            if networks:"},{"line_number":100,"context_line":"                return [resource.Resource(type\u003dself._SUPPORT_RESOURCE_TYPE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_3675ee32","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":62},"in_reply_to":"7f287b81_93f5d4ef","updated":"2017-08-29 07:41:53.000000000","message":"Done","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"e99448e44d69d1599f2ebf8e6f579c6d5796296a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                reason\u003dsix.text_type(e))"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_dependent_resources(self, context, parent_resource):"},{"line_number":113,"context_line":"        return self._get_dependent_resources_by_project(context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_73dee86d","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":64},"updated":"2017-08-29 07:16:21.000000000","message":"IMO, here we need pass the parent_resource as the parameter, the network resource need be filtered by parent resource id.","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"},{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"a3b482394c1ea3ca00c5f446e35304d6e1000880","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                reason\u003dsix.text_type(e))"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def get_dependent_resources(self, context, parent_resource):"},{"line_number":113,"context_line":"        return self._get_dependent_resources_by_project(context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_9686e212","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":64},"in_reply_to":"7f287b81_73dee86d","updated":"2017-08-29 07:41:53.000000000","message":"if we remove the server_resource_type, the parent_resource could only be project, so project_id is the same as parent resource id here.\n\nAnyway, use resource id is ok.","commit_id":"0311751513ef8d2476ffcc533b8f0312861d5a3e"}]}
