)]}'
{"neutronclient/neutron/v2_0/__init__.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"7a21161f5c1d9486805bf4deecc4f39a1c936fd6","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"},{"line_number":72,"context_line":"        info \u003d [d for d in data[collection] if \u0027tenant_id\u0027 in d and"},{"line_number":73,"context_line":"                d[\u0027tenant_id\u0027] \u003d\u003d project]"},{"line_number":74,"context_line":"    if len(info) \u003e 1:"},{"line_number":75,"context_line":"        raise exceptions.NeutronClientNoUniqueMatch(resource\u003dresource,"},{"line_number":76,"context_line":"                                                    name\u003dname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7e832c04","line":73,"updated":"2014-07-02 15:55:22.000000000","message":"info \u003d [d for d in info if d.get(\u0027tenant_id\u0027) \u003d\u003d project]","commit_id":"c2d71c453fa96bc5391b6834d60db0ce6f0585c9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"236f6c9cb5a11803ee423ff2a3aa7bee6878b47a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"},{"line_number":72,"context_line":"        info \u003d [d for d in data[collection] if \u0027tenant_id\u0027 in d and"},{"line_number":73,"context_line":"                d[\u0027tenant_id\u0027] \u003d\u003d project]"},{"line_number":74,"context_line":"    if len(info) \u003e 1:"},{"line_number":75,"context_line":"        raise exceptions.NeutronClientNoUniqueMatch(resource\u003dresource,"},{"line_number":76,"context_line":"                                                    name\u003dname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3759cb36","line":73,"in_reply_to":"baada198_7e832c04","updated":"2014-07-02 21:15:45.000000000","message":"Oh, it makes more sense.","commit_id":"c2d71c453fa96bc5391b6834d60db0ce6f0585c9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"95d6d60e47117cbfb807814a435600af5b70ff02","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _find_resourceid_by_name(client, resource, name, project\u003dNone):"},{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8bb04f41","line":64,"updated":"2014-07-28 03:06:02.000000000","message":"IMO project_id is a better name because we cannot pass a project name here.\n\nI am not sure which is better either \"tenant\" or \"project\" here. In neutron v2 API, \"tenant\" is used.","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f98cf385f948ce28e6df9e2af8503f8743c80b25","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _find_resourceid_by_name(client, resource, name, project\u003dNone):"},{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ccc6af69","line":64,"in_reply_to":"baada198_2b4bc32b","updated":"2014-07-29 06:04:15.000000000","message":"Okay, though I think it would increase mix usage of tenant and project in neutronclient code. \n\nThe following is my point. I understand \"project\" is the agreed direction and \"tenant\" is deprecated. What I want to say is \"tenant\" is used throughout Neutron client \"v2\" code and introducing \"project\" here would increase chaos. IMO switching to \"project\" should be considered in implementing the next version of neutorn API (e.g., v3).","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"475920167ecec9d259429ed2c8d7a11182732d19","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _find_resourceid_by_name(client, resource, name, project\u003dNone):"},{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2b4bc32b","line":64,"in_reply_to":"baada198_8bb04f41","updated":"2014-07-28 22:05:23.000000000","message":"I would say \u0027tenant\u0027 is deprecated. I would use project_id.","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"733b143a0881f5dc56888b942512f0dc3940c23d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _find_resourceid_by_name(client, resource, name, project\u003dNone):"},{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8783b002","line":64,"in_reply_to":"baada198_cc65cf4a","updated":"2014-07-29 06:44:15.000000000","message":"In most cases there is no confusion for developers and reviewers and reviewers would not be surprised which keyword is used.\n\nI am just talking about code consistency about neutronclient code base and it is the first time \"project\" keyword is introduced. If you can grep the code, you will notice no \"project\" is found.\n\nOn the other hand, I understand the situation from the point of cross project contribution. I think you choose \"project\" rather than \"tenant\" in this patch even though neutronclient code does not have \"project\" keyword so far. It is a choice of the author. and I would like not to bother the decision. I don\u0027t like the discussion project vs tenant. So I won\u0027t oppose to use \"project\" in this patch more.\n\nI am not sure which should be prioritized: code consistency or openstack general policy change for small patches.\n\nI am okay if other reviewers say good.","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"60c5ea2588a8048b7143739f94022ea7451456ec","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        message\u003dnot_found_message, status_code\u003d404)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _find_resourceid_by_name(client, resource, name, project\u003dNone):"},{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cc65cf4a","line":64,"in_reply_to":"baada198_ccc6af69","updated":"2014-07-29 06:09:18.000000000","message":"Thanks for the comments. But you know, now project/tenant is a common sense for most of the OpenStack developers. So it will be more weird if using \u0027tenant\u0027 at here for the reviewers. Thoughts?","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"95d6d60e47117cbfb807814a435600af5b70ff02","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"},{"line_number":68,"context_line":"                                                            fields\u003d\u0027id\u0027)"},{"line_number":69,"context_line":"    collection \u003d resource_plural"},{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_6b193b79","line":68,"updated":"2014-07-28 03:06:02.000000000","message":"If project is passed, we want to retrieve data for a specific tenant. We can use \"tenant_id\" filter to query.\n\n  data \u003d obj_lister(name\u003dname, tenant_id\u003dproject, fields\u003d[\u0027id\u0027])\n\nTo share the code,\n\n  params \u003d {\u0027name\u0027: name, fields: [\u0027id\u0027]}\n  if project:\n     params[\u0027tenant_id\u0027] \u003d project\n  data \u003d obj_lister(**params)","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"475920167ecec9d259429ed2c8d7a11182732d19","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    resource_plural \u003d _get_resource_plural(resource, client)"},{"line_number":66,"context_line":"    obj_lister \u003d getattr(client, \"list_%s\" % resource_plural)"},{"line_number":67,"context_line":"    data \u003d obj_lister(name\u003dname) if project else obj_lister(name\u003dname,"},{"line_number":68,"context_line":"                                                            fields\u003d\u0027id\u0027)"},{"line_number":69,"context_line":"    collection \u003d resource_plural"},{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_08b09e3e","line":68,"in_reply_to":"baada198_6b193b79","updated":"2014-07-28 22:05:23.000000000","message":"Good point.","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"95d6d60e47117cbfb807814a435600af5b70ff02","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    collection \u003d resource_plural"},{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"},{"line_number":72,"context_line":"        info \u003d [d for d in info if d.get(\u0027tenant_id\u0027) \u003d\u003d project]"},{"line_number":73,"context_line":"    if len(info) \u003e 1:"},{"line_number":74,"context_line":"        raise exceptions.NeutronClientNoUniqueMatch(resource\u003dresource,"},{"line_number":75,"context_line":"                                                    name\u003dname)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cb9ec7b7","line":72,"updated":"2014-07-28 03:06:02.000000000","message":"If you adopt the approach in the above comment, it will be no longer needed.","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"475920167ecec9d259429ed2c8d7a11182732d19","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    collection \u003d resource_plural"},{"line_number":70,"context_line":"    info \u003d data[collection]"},{"line_number":71,"context_line":"    if project:"},{"line_number":72,"context_line":"        info \u003d [d for d in info if d.get(\u0027tenant_id\u0027) \u003d\u003d project]"},{"line_number":73,"context_line":"    if len(info) \u003e 1:"},{"line_number":74,"context_line":"        raise exceptions.NeutronClientNoUniqueMatch(resource\u003dresource,"},{"line_number":75,"context_line":"                                                    name\u003dname)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2882c251","line":72,"in_reply_to":"baada198_cb9ec7b7","updated":"2014-07-28 22:05:23.000000000","message":"Done","commit_id":"08a0c5aa8e7fb8d93dcea1b1aeadedefcfe4c366"}],"neutronclient/tests/unit/test_name_or_id.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ef02359df08ddd1fc4e52a58d2cf4343098f38d0","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            self.client, \u0027security_group\u0027, name, project)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.assertEqual(expect_id, observed_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_get_id_from_name_notfound(self):"},{"line_number":139,"context_line":"        name \u003d \u0027myname\u0027"},{"line_number":140,"context_line":"        reses \u003d {\u0027networks\u0027: []}"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7b72bbe6","line":137,"updated":"2014-06-30 14:49:16.000000000","message":"Unit tests should cover the following cases as well:\n\n1- The same name is used with different tan ants and the returned resource is the correct one.\n2- The name is used by a different tenant only and the resource is therefore not found.","commit_id":"632563bb43ed7d183243fb59a2e31f4b228b95ab"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"557d7acc6c31fc9972e88f74766a1c8f28bad203","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            self.client, \u0027security_group\u0027, name, project)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.assertEqual(expect_id, observed_id)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def test_get_id_from_name_notfound(self):"},{"line_number":139,"context_line":"        name \u003d \u0027myname\u0027"},{"line_number":140,"context_line":"        reses \u003d {\u0027networks\u0027: []}"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0d233706","line":137,"in_reply_to":"baada198_7b72bbe6","updated":"2014-06-30 22:43:53.000000000","message":"Make sense. I think the #1 case has been covered by above test case. I will submit a new PS to cover the #2. Thanks for the review.","commit_id":"632563bb43ed7d183243fb59a2e31f4b228b95ab"}]}
