)]}'
{"neutron/db/rbac_db_mixin.py":[{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"4df8a01580414506c3e57449246cf0770807bb71","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        rbac_class \u003d ("},{"line_number":48,"context_line":"            rbac_obj.RBACBaseObject.get_type_class_map()[e[\u0027object_type\u0027]])"},{"line_number":49,"context_line":"        try:"},{"line_number":50,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":51,"context_line":"                rbac_args \u003d {\u0027project_id\u0027: e[\u0027tenant_id\u0027],"},{"line_number":52,"context_line":"                             \u0027object_id\u0027: e[\u0027object_id\u0027],"},{"line_number":53,"context_line":"                             \u0027action\u0027: e[\u0027action\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_1d3f3edf","line":50,"range":{"start_line":50,"start_character":12,"end_line":50,"end_character":61},"updated":"2018-10-17 02:25:36.000000000","message":"we do not need this line in ovo","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"12be5a6761602207c33b31b5ad71414918845bd8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        rbac_class \u003d ("},{"line_number":48,"context_line":"            rbac_obj.RBACBaseObject.get_type_class_map()[e[\u0027object_type\u0027]])"},{"line_number":49,"context_line":"        try:"},{"line_number":50,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":51,"context_line":"                rbac_args \u003d {\u0027project_id\u0027: e[\u0027tenant_id\u0027],"},{"line_number":52,"context_line":"                             \u0027object_id\u0027: e[\u0027object_id\u0027],"},{"line_number":53,"context_line":"                             \u0027action\u0027: e[\u0027action\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_9a002d06","line":50,"range":{"start_line":50,"start_character":12,"end_line":50,"end_character":61},"in_reply_to":"3f79a3b5_1d3f3edf","updated":"2018-10-17 07:36:52.000000000","message":"Indeed, everything in done inside the OVO. Thanks!","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"4df8a01580414506c3e57449246cf0770807bb71","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":78,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":79,"context_line":"                                           details\u003dex)"},{"line_number":80,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":81,"context_line":"            entry.update_fields(pol)"},{"line_number":82,"context_line":"            entry.update()"},{"line_number":83,"context_line":"        return self._make_rbac_policy_dict(entry)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_388008f6","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":57},"updated":"2018-10-17 02:25:36.000000000","message":"this line is not needed either, because .update() already has a context","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"12be5a6761602207c33b31b5ad71414918845bd8","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":78,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":79,"context_line":"                                           details\u003dex)"},{"line_number":80,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":81,"context_line":"            entry.update_fields(pol)"},{"line_number":82,"context_line":"            entry.update()"},{"line_number":83,"context_line":"        return self._make_rbac_policy_dict(entry)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_5df84f17","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":57},"in_reply_to":"3f79a3b5_388008f6","updated":"2018-10-17 07:36:52.000000000","message":"Done","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"4df8a01580414506c3e57449246cf0770807bb71","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":97,"context_line":"        # object_id link to network"},{"line_number":98,"context_line":"        entry_dict \u003d dict(entry)"},{"line_number":99,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"            entry.delete()"},{"line_number":101,"context_line":"        registry.notify(resources.RBAC_POLICY, events.AFTER_DELETE, self,"},{"line_number":102,"context_line":"                        context\u003dcontext, object_type\u003dobject_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_d87a3423","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":57},"updated":"2018-10-17 02:25:36.000000000","message":"ditto","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"12be5a6761602207c33b31b5ad71414918845bd8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":97,"context_line":"        # object_id link to network"},{"line_number":98,"context_line":"        entry_dict \u003d dict(entry)"},{"line_number":99,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"            entry.delete()"},{"line_number":101,"context_line":"        registry.notify(resources.RBAC_POLICY, events.AFTER_DELETE, self,"},{"line_number":102,"context_line":"                        context\u003dcontext, object_type\u003dobject_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_1d02d709","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":57},"in_reply_to":"3f79a3b5_d87a3423","updated":"2018-10-17 07:36:52.000000000","message":"Done","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"4df8a01580414506c3e57449246cf0770807bb71","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        object_type \u003d self._get_object_type(context, id)"},{"line_number":108,"context_line":"        rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[object_type]"},{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"            return rbac_class.get_object(context, id\u003did)"},{"line_number":111,"context_line":"        except exc.NoResultFound:"},{"line_number":112,"context_line":"            raise ext_rbac.RbacPolicyNotFound(id\u003did, object_type\u003dobject_type)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f30ab11b","line":110,"range":{"start_line":110,"start_character":12,"end_line":110,"end_character":56},"updated":"2018-10-17 02:25:36.000000000","message":"i\u0027m afraid this line will never throw exc.NoResultFoudn exception, as get_object() returns either the object found or None.","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"12be5a6761602207c33b31b5ad71414918845bd8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        object_type \u003d self._get_object_type(context, id)"},{"line_number":108,"context_line":"        rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[object_type]"},{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"            return rbac_class.get_object(context, id\u003did)"},{"line_number":111,"context_line":"        except exc.NoResultFound:"},{"line_number":112,"context_line":"            raise ext_rbac.RbacPolicyNotFound(id\u003did, object_type\u003dobject_type)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_3da31302","line":110,"range":{"start_line":110,"start_character":12,"end_line":110,"end_character":56},"in_reply_to":"3f79a3b5_f30ab11b","updated":"2018-10-17 07:36:52.000000000","message":"Good catch, thanks!","commit_id":"78f74a92027a757c746c8df1c3ce637bc9e0b7d4"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return self._make_rbac_policy_dict(_rbac_obj)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @staticmethod"},{"line_number":60,"context_line":"    def _make_rbac_policy_dict(db_entry, fields\u003dNone):"},{"line_number":61,"context_line":"        res \u003d {f: db_entry[f] for f in (\u0027id\u0027, \u0027project_id\u0027, \u0027target_tenant\u0027,"},{"line_number":62,"context_line":"                                        \u0027action\u0027, \u0027object_id\u0027)}"},{"line_number":63,"context_line":"        res[\u0027object_type\u0027] \u003d db_entry.db_model.object_type"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_60a61410","line":60,"range":{"start_line":60,"start_character":31,"end_line":60,"end_character":39},"updated":"2018-11-07 21:08:20.000000000","message":"It looks this becomes an OVO now. I think removing the \u0027db_\u0027 prefix might make it less confusing.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return self._make_rbac_policy_dict(_rbac_obj)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @staticmethod"},{"line_number":60,"context_line":"    def _make_rbac_policy_dict(db_entry, fields\u003dNone):"},{"line_number":61,"context_line":"        res \u003d {f: db_entry[f] for f in (\u0027id\u0027, \u0027project_id\u0027, \u0027target_tenant\u0027,"},{"line_number":62,"context_line":"                                        \u0027action\u0027, \u0027object_id\u0027)}"},{"line_number":63,"context_line":"        res[\u0027object_type\u0027] \u003d db_entry.db_model.object_type"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_946b6eb6","line":60,"range":{"start_line":60,"start_character":31,"end_line":60,"end_character":39},"in_reply_to":"3f79a3b5_60a61410","updated":"2018-11-08 00:31:00.000000000","message":"+1","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return self._make_rbac_policy_dict(_rbac_obj)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @staticmethod"},{"line_number":60,"context_line":"    def _make_rbac_policy_dict(db_entry, fields\u003dNone):"},{"line_number":61,"context_line":"        res \u003d {f: db_entry[f] for f in (\u0027id\u0027, \u0027project_id\u0027, \u0027target_tenant\u0027,"},{"line_number":62,"context_line":"                                        \u0027action\u0027, \u0027object_id\u0027)}"},{"line_number":63,"context_line":"        res[\u0027object_type\u0027] \u003d db_entry.db_model.object_type"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_10e1a3fd","line":60,"range":{"start_line":60,"start_character":31,"end_line":60,"end_character":39},"in_reply_to":"3f79a3b5_60a61410","updated":"2018-11-08 10:40:49.000000000","message":"Done","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            context\u003dcontext, policy\u003dentry,"},{"line_number":74,"context_line":"                            object_type\u003dobject_type, policy_update\u003dpol)"},{"line_number":75,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":76,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":77,"context_line":"                                           details\u003dex)"},{"line_number":78,"context_line":"        entry.update_fields(pol)"},{"line_number":79,"context_line":"        entry.update()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_00bc00b4","line":76,"range":{"start_line":76,"start_character":53,"end_line":76,"end_character":71},"updated":"2018-11-07 21:08:20.000000000","message":"nit: entry.object_id is more \"OVO\".","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            context\u003dcontext, policy\u003dentry,"},{"line_number":74,"context_line":"                            object_type\u003dobject_type, policy_update\u003dpol)"},{"line_number":75,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":76,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":77,"context_line":"                                           details\u003dex)"},{"line_number":78,"context_line":"        entry.update_fields(pol)"},{"line_number":79,"context_line":"        entry.update()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_30de1f3c","line":76,"range":{"start_line":76,"start_character":53,"end_line":76,"end_character":71},"in_reply_to":"3f79a3b5_00bc00b4","updated":"2018-11-08 10:40:49.000000000","message":"Done","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                            context\u003dcontext, object_type\u003dobject_type,"},{"line_number":89,"context_line":"                            policy\u003dentry)"},{"line_number":90,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":91,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":92,"context_line":"                                           details\u003dex)"},{"line_number":93,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":94,"context_line":"        # object_id link to network"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_00eac09f","line":91,"range":{"start_line":91,"start_character":53,"end_line":91,"end_character":71},"updated":"2018-11-07 21:08:20.000000000","message":"ditto: entry.object_id","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                            context\u003dcontext, object_type\u003dobject_type,"},{"line_number":89,"context_line":"                            policy\u003dentry)"},{"line_number":90,"context_line":"        except c_exc.CallbackFailure as ex:"},{"line_number":91,"context_line":"            raise ext_rbac.RbacPolicyInUse(object_id\u003dentry[\u0027object_id\u0027],"},{"line_number":92,"context_line":"                                           details\u003dex)"},{"line_number":93,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":94,"context_line":"        # object_id link to network"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_f09f474b","line":91,"range":{"start_line":91,"start_character":53,"end_line":91,"end_character":71},"in_reply_to":"3f79a3b5_00eac09f","updated":"2018-11-08 10:40:49.000000000","message":"Done","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                           details\u003dex)"},{"line_number":93,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":94,"context_line":"        # object_id link to network"},{"line_number":95,"context_line":"        entry_dict \u003d dict(entry)"},{"line_number":96,"context_line":"        entry.delete()"},{"line_number":97,"context_line":"        registry.notify(resources.RBAC_POLICY, events.AFTER_DELETE, self,"},{"line_number":98,"context_line":"                        context\u003dcontext, object_type\u003dobject_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_60361452","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":32},"updated":"2018-11-07 21:08:20.000000000","message":"Use the OVO\u0027s to_dict() method is better:\n\n  entry.to_dict()","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                           details\u003dex)"},{"line_number":93,"context_line":"        # make a dict copy because deleting the entry will nullify its"},{"line_number":94,"context_line":"        # object_id link to network"},{"line_number":95,"context_line":"        entry_dict \u003d dict(entry)"},{"line_number":96,"context_line":"        entry.delete()"},{"line_number":97,"context_line":"        registry.notify(resources.RBAC_POLICY, events.AFTER_DELETE, self,"},{"line_number":98,"context_line":"                        context\u003dcontext, object_type\u003dobject_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_90d7f3f4","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":32},"in_reply_to":"3f79a3b5_60361452","updated":"2018-11-08 10:40:49.000000000","message":"Done","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        if not object_types:"},{"line_number":122,"context_line":"            object_types \u003d list(rbac_obj.RBACBaseObject.get_type_class_map())"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            object_types \u003d [object_types]"},{"line_number":125,"context_line":"        rbac_objs \u003d []"},{"line_number":126,"context_line":"        for obj_type in object_types:"},{"line_number":127,"context_line":"            rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[obj_type]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_c37052aa","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":41},"updated":"2018-11-07 21:08:20.000000000","message":"It seems object_types is either None or a list and this changes it to a list of list, which I am not sure if it is correct.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        if not object_types:"},{"line_number":122,"context_line":"            object_types \u003d list(rbac_obj.RBACBaseObject.get_type_class_map())"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            object_types \u003d [object_types]"},{"line_number":125,"context_line":"        rbac_objs \u003d []"},{"line_number":126,"context_line":"        for obj_type in object_types:"},{"line_number":127,"context_line":"            rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[obj_type]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_548f1675","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":41},"in_reply_to":"3f79a3b5_c37052aa","updated":"2018-11-08 00:31:00.000000000","message":"@Hongbin, object_types returned from line 120 is not list, but a single string. That\u0027s why these codes are changing it to lists by either list() or add [].","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def get_rbac_policies(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":117,"context_line":"                          sorts\u003dNone, limit\u003dNone, page_reverse\u003dFalse):"},{"line_number":118,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse)"},{"line_number":119,"context_line":"        filters \u003d filters or {}"},{"line_number":120,"context_line":"        object_types \u003d filters.pop(\u0027object_type\u0027, None)"},{"line_number":121,"context_line":"        if not object_types:"},{"line_number":122,"context_line":"            object_types \u003d list(rbac_obj.RBACBaseObject.get_type_class_map())"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            object_types \u003d [object_types]"},{"line_number":125,"context_line":"        rbac_objs \u003d []"},{"line_number":126,"context_line":"        for obj_type in object_types:"},{"line_number":127,"context_line":"            rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[obj_type]"},{"line_number":128,"context_line":"            rbac_objs +\u003d rbac_class.get_objects(context, _pager\u003dpager,"},{"line_number":129,"context_line":"                                                **filters)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        return [self._make_rbac_policy_dict(_rbac_obj, fields)"},{"line_number":132,"context_line":"                for _rbac_obj in rbac_objs]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_a323d656","line":129,"range":{"start_line":119,"start_character":0,"end_line":129,"end_character":58},"updated":"2018-11-07 21:08:20.000000000","message":"If I do this, I would write the code as below (UNTESTED). It avoids calling get_type_class_map() inside the for loop which might be a bit faster.\n\n        filters \u003d filters or {}\n        object_type_filters \u003d filters.pop(\u0027object_type\u0027, None)\n        rbac_classes_to_query \u003d [\n            o for t, o in rbac_obj.RBACBaseObject.get_type_class_map().items()\n            if object_type_filters is None or t in object_type_filters\n        ]\n        rbac_objs \u003d []\n        for rbac_class in rbac_classes_to_query:\n            rbac_objs +\u003d rbac_class.get_objects(context, _pager\u003dpager,\n                                                **filters)","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def get_rbac_policies(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":117,"context_line":"                          sorts\u003dNone, limit\u003dNone, page_reverse\u003dFalse):"},{"line_number":118,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse)"},{"line_number":119,"context_line":"        filters \u003d filters or {}"},{"line_number":120,"context_line":"        object_types \u003d filters.pop(\u0027object_type\u0027, None)"},{"line_number":121,"context_line":"        if not object_types:"},{"line_number":122,"context_line":"            object_types \u003d list(rbac_obj.RBACBaseObject.get_type_class_map())"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            object_types \u003d [object_types]"},{"line_number":125,"context_line":"        rbac_objs \u003d []"},{"line_number":126,"context_line":"        for obj_type in object_types:"},{"line_number":127,"context_line":"            rbac_class \u003d rbac_obj.RBACBaseObject.get_type_class_map()[obj_type]"},{"line_number":128,"context_line":"            rbac_objs +\u003d rbac_class.get_objects(context, _pager\u003dpager,"},{"line_number":129,"context_line":"                                                **filters)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        return [self._make_rbac_policy_dict(_rbac_obj, fields)"},{"line_number":132,"context_line":"                for _rbac_obj in rbac_objs]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_abd16458","line":129,"range":{"start_line":119,"start_character":0,"end_line":129,"end_character":58},"in_reply_to":"3f79a3b5_a323d656","updated":"2018-11-08 10:40:49.000000000","message":"Yes it makes sense, it\u0027s faster.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ce55e94fc3d1cd970574b01681d8099f4b262df1","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @staticmethod"},{"line_number":60,"context_line":"    def _make_rbac_policy_dict(entry, fields\u003dNone):"},{"line_number":61,"context_line":"        res \u003d {f: entry[f] for f in (\u0027id\u0027, \u0027project_id\u0027, \u0027target_tenant\u0027,"},{"line_number":62,"context_line":"                                     \u0027action\u0027, \u0027object_id\u0027)}"},{"line_number":63,"context_line":"        res[\u0027object_type\u0027] \u003d entry.db_model.object_type"},{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_f0912bf8","line":61,"range":{"start_line":61,"start_character":58,"end_line":61,"end_character":71},"updated":"2018-11-14 09:01:51.000000000","message":"not for this patch but shouldn\u0027t we also change name of this to \"target_project\" someday?","commit_id":"8eee74f626a904b69f005c0eaf76a5ca52b7fb64"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"fb7513ad63946a5d0aa6dec5b43cb187dcf9484e","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @staticmethod"},{"line_number":60,"context_line":"    def _make_rbac_policy_dict(entry, fields\u003dNone):"},{"line_number":61,"context_line":"        res \u003d {f: entry[f] for f in (\u0027id\u0027, \u0027project_id\u0027, \u0027target_tenant\u0027,"},{"line_number":62,"context_line":"                                     \u0027action\u0027, \u0027object_id\u0027)}"},{"line_number":63,"context_line":"        res[\u0027object_type\u0027] \u003d entry.db_model.object_type"},{"line_number":64,"context_line":"        return db_utils.resource_fields(res, fields)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3f79a3b5_e372c7af","line":61,"range":{"start_line":61,"start_character":58,"end_line":61,"end_character":71},"in_reply_to":"3f79a3b5_f0912bf8","updated":"2018-11-14 09:11:33.000000000","message":"Yes, this should be target_project","commit_id":"8eee74f626a904b69f005c0eaf76a5ca52b7fb64"}],"neutron/db/rbac_db_models.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bff105ccf6144a494b2e8989b11c1dfe3c7f20ab","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    object_type \u003d \u0027network\u0027"},{"line_number":98,"context_line":"    revises_on_change \u003d (\u0027network\u0027, )"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_valid_actions(cls):"},{"line_number":102,"context_line":"        actions \u003d (ACCESS_SHARED,)"},{"line_number":103,"context_line":"        pl \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_f1f6e25e","line":100,"updated":"2018-11-02 09:04:31.000000000","message":"I just wondering: can\u0027t it be staticmethod even? You are not using \"cls\" anywhere in it :)","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    object_type \u003d \u0027network\u0027"},{"line_number":98,"context_line":"    revises_on_change \u003d (\u0027network\u0027, )"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_valid_actions(cls):"},{"line_number":102,"context_line":"        actions \u003d (ACCESS_SHARED,)"},{"line_number":103,"context_line":"        pl \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_6fffdffe","line":100,"in_reply_to":"3f79a3b5_3d8365ac","updated":"2018-11-08 00:31:00.000000000","message":"I am curious why we are changing it to staticmethod as well. Are we calling it before NetworkRBAC is initialized? AFAIK, that\u0027s the situation we want to use staticmethod, or maybe I am missing anything?","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    object_type \u003d \u0027network\u0027"},{"line_number":98,"context_line":"    revises_on_change \u003d (\u0027network\u0027, )"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_valid_actions(cls):"},{"line_number":102,"context_line":"        actions \u003d (ACCESS_SHARED,)"},{"line_number":103,"context_line":"        pl \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_f0b2e730","line":100,"in_reply_to":"3f79a3b5_6fffdffe","updated":"2018-11-08 10:40:49.000000000","message":"That\u0027s why in PS14 I didn\u0027t change this method to static, but I didn\u0027t comment it.","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"952f04a41706372f9168c54922273fdcdf44f3da","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    object_type \u003d \u0027network\u0027"},{"line_number":98,"context_line":"    revises_on_change \u003d (\u0027network\u0027, )"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_valid_actions(cls):"},{"line_number":102,"context_line":"        actions \u003d (ACCESS_SHARED,)"},{"line_number":103,"context_line":"        pl \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3d8365ac","line":100,"in_reply_to":"3f79a3b5_dcb41ad6","updated":"2018-11-07 19:10:51.000000000","message":"One thing is that staticmethod is not designed for inheritance. See here: https://stackoverflow.com/questions/37659660/static-methods-and-designing-for-inheritance","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00eedb933c3f27149970788ec54d4b6a211f726f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    object_type \u003d \u0027network\u0027"},{"line_number":98,"context_line":"    revises_on_change \u003d (\u0027network\u0027, )"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @classmethod"},{"line_number":101,"context_line":"    def get_valid_actions(cls):"},{"line_number":102,"context_line":"        actions \u003d (ACCESS_SHARED,)"},{"line_number":103,"context_line":"        pl \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_dcb41ad6","line":100,"in_reply_to":"3f79a3b5_f1f6e25e","updated":"2018-11-02 12:07:26.000000000","message":"You are right, there is no reason to keep this method as a classmethod.","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"}],"neutron/objects/network.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bff105ccf6144a494b2e8989b11c1dfe3c7f20ab","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Version 1.0: Initial version"},{"line_number":39,"context_line":"    # Version 1.1: Added \u0027id\u0027 and \u0027project_id\u0027"},{"line_number":40,"context_line":"    # Version 1.2: Inherit from rbac.RBACBaseObject; changed \u0027object_id\u0027 from"},{"line_number":41,"context_line":"    #              StringField to UUIDField"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_31fd3a3c","line":41,"updated":"2018-11-02 09:04:31.000000000","message":"shouldn\u0027t You provide some backward compatibility method and change object_id to String if version \u003c 1.2 ?","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00eedb933c3f27149970788ec54d4b6a211f726f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Version 1.0: Initial version"},{"line_number":39,"context_line":"    # Version 1.1: Added \u0027id\u0027 and \u0027project_id\u0027"},{"line_number":40,"context_line":"    # Version 1.2: Inherit from rbac.RBACBaseObject; changed \u0027object_id\u0027 from"},{"line_number":41,"context_line":"    #              StringField to UUIDField"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_5c7d6ac1","line":41,"in_reply_to":"3f79a3b5_31fd3a3c","updated":"2018-11-02 12:07:26.000000000","message":"Actually what I need to check is if the object version is \u003d\u003e1.2 and convert any string in \"object_id\" to UUIDField.\n\nThe conversion from UUIDField to String is not needed (UUIDField is a string).","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"96adf81e20a196460421869ceecdf1ccfd125b3a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Version 1.0: Initial version"},{"line_number":39,"context_line":"    # Version 1.1: Added \u0027id\u0027 and \u0027project_id\u0027"},{"line_number":40,"context_line":"    # Version 1.2: Inherit from rbac.RBACBaseObject; changed \u0027object_id\u0027 from"},{"line_number":41,"context_line":"    #              StringField to UUIDField"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_27286eeb","line":41,"in_reply_to":"3f79a3b5_5c7d6ac1","updated":"2018-11-05 16:04:28.000000000","message":"My previous comment was wrong: we don\u0027t upgrade objects but only downgrade. Because every UUID field is a string, there is no need to check \"project_id\" during an object downgrade.","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"}],"neutron/objects/rbac.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"bff105ccf6144a494b2e8989b11c1dfe3c7f20ab","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class RBACBaseObject(base.NeutronDbObject):"},{"line_number":29,"context_line":"    # Version 1.0: Initial version"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027id\u0027: common_types.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_51f8f649","line":31,"updated":"2018-11-02 09:04:31.000000000","message":"For example in QoSRule objects, we also have some base object class and then specific rule types which inherits from this base class. And there we have version specified only in this base class. Here You are specifing different versions for base class and classes which inherits from it. Maybe we should have version only in one place?","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00eedb933c3f27149970788ec54d4b6a211f726f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class RBACBaseObject(base.NeutronDbObject):"},{"line_number":29,"context_line":"    # Version 1.0: Initial version"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027id\u0027: common_types.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_1c44d29e","line":31,"in_reply_to":"3f79a3b5_51f8f649","updated":"2018-11-02 12:07:26.000000000","message":"QosRule was originally designed in this way. NetworkRBAC and QosPolicyRBAC have now different versions and, in order to keep backwards compatibility (\"obj_make_compatible\"), we need to keep both objects versions (and the parent one) different.","commit_id":"887cc19bd7c361e8d4080a8a67d33bdb3e9df92b"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    @classmethod"},{"line_number":44,"context_line":"    def get_projects(cls, context, object_id\u003dNone, action\u003dNone,"},{"line_number":45,"context_line":"                     target_tenant\u003dNone):"},{"line_number":46,"context_line":"        clauses \u003d []"},{"line_number":47,"context_line":"        if object_id:"},{"line_number":48,"context_line":"            clauses.append(models.NetworkRBAC.object_id \u003d\u003d object_id)"},{"line_number":49,"context_line":"        if action:"},{"line_number":50,"context_line":"            clauses.append(models.NetworkRBAC.action \u003d\u003d action)"},{"line_number":51,"context_line":"        if target_tenant:"},{"line_number":52,"context_line":"            clauses.append(models.NetworkRBAC.target_tenant \u003d\u003d"},{"line_number":53,"context_line":"                           target_tenant)"},{"line_number":54,"context_line":"        query \u003d context.session.query(models.NetworkRBAC.target_tenant)"},{"line_number":55,"context_line":"        if clauses:"},{"line_number":56,"context_line":"            query \u003d query.filter(and_(*clauses))"},{"line_number":57,"context_line":"        return [data[0] for data in query]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    def get_type_class_map(cls):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_5405d613","line":57,"range":{"start_line":46,"start_character":8,"end_line":57,"end_character":42},"updated":"2018-11-08 00:31:00.000000000","message":"I do not understand why we need these lines here. The same method is implemented in neutron/objects/network.py. QOSRBAC does not call this method.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    @classmethod"},{"line_number":44,"context_line":"    def get_projects(cls, context, object_id\u003dNone, action\u003dNone,"},{"line_number":45,"context_line":"                     target_tenant\u003dNone):"},{"line_number":46,"context_line":"        clauses \u003d []"},{"line_number":47,"context_line":"        if object_id:"},{"line_number":48,"context_line":"            clauses.append(models.NetworkRBAC.object_id \u003d\u003d object_id)"},{"line_number":49,"context_line":"        if action:"},{"line_number":50,"context_line":"            clauses.append(models.NetworkRBAC.action \u003d\u003d action)"},{"line_number":51,"context_line":"        if target_tenant:"},{"line_number":52,"context_line":"            clauses.append(models.NetworkRBAC.target_tenant \u003d\u003d"},{"line_number":53,"context_line":"                           target_tenant)"},{"line_number":54,"context_line":"        query \u003d context.session.query(models.NetworkRBAC.target_tenant)"},{"line_number":55,"context_line":"        if clauses:"},{"line_number":56,"context_line":"            query \u003d query.filter(and_(*clauses))"},{"line_number":57,"context_line":"        return [data[0] for data in query]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    def get_type_class_map(cls):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_8b258818","line":57,"range":{"start_line":46,"start_character":8,"end_line":57,"end_character":42},"in_reply_to":"3f79a3b5_5405d613","updated":"2018-11-08 10:40:49.000000000","message":"Moving this function to the parent class I share this code with both classes, QoS and Network RBAC. It doesn\u0027t matter if QoS doesn\u0027t use it yet, but could make use of it in the future.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"}],"neutron/objects/rbac_db.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d0a598b53d77bcb4c4bc70a7d21e8a4d017d382b","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def _create_post(self):"},{"line_number":246,"context_line":"    if self.shared:"},{"line_number":247,"context_line":"        self.attach_rbac(self.id, self.project_id)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"def _create_hook(self, orig_create):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_6364de4d","line":247,"range":{"start_line":247,"start_character":34,"end_line":247,"end_character":49},"updated":"2018-11-07 21:08:20.000000000","message":"Just wondering. What is the rationale of this change. I asked that because self.obj_context.tenant_id and self.project_id might not be the same.\n\nIf this change is intentional, then how about line #261. It needs the same change?","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def _create_post(self):"},{"line_number":246,"context_line":"    if self.shared:"},{"line_number":247,"context_line":"        self.attach_rbac(self.id, self.project_id)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"def _create_hook(self, orig_create):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_f4fd020a","line":247,"range":{"start_line":247,"start_character":34,"end_line":247,"end_character":49},"in_reply_to":"3f79a3b5_6364de4d","updated":"2018-11-08 00:31:00.000000000","message":"+1","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def _create_post(self):"},{"line_number":246,"context_line":"    if self.shared:"},{"line_number":247,"context_line":"        self.attach_rbac(self.id, self.project_id)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"def _create_hook(self, orig_create):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_4ba8d072","line":247,"range":{"start_line":247,"start_character":34,"end_line":247,"end_character":49},"in_reply_to":"3f79a3b5_6364de4d","updated":"2018-11-08 10:40:49.000000000","message":"Because when an object is created, the project_id must be always set, but not all objects must have this parameter. Please, review patch [1].\n\n[1] https://review.openstack.org/#/c/384949/","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"}],"neutron/tests/unit/objects/qos/test_policy.py":[{"author":{"_account_id":28581,"name":"Lujin Luo","email":"lujinluo@gmail.com","username":"lujin"},"change_message_id":"2b7e72f75437b96735f278ed6c7ac809d3d9d4cb","unresolved":false,"context_lines":[{"line_number":579,"context_line":"    @mock.patch.object(policy.QosPolicy, \u0027unset_default\u0027)"},{"line_number":580,"context_line":"    def test_filter_by_shared(self, *mocks):"},{"line_number":581,"context_line":"        project_id \u003d uuidutils.generate_uuid()"},{"line_number":582,"context_line":"        self.context.project_id \u003d project_id"},{"line_number":583,"context_line":"        policy_obj \u003d policy.QosPolicy("},{"line_number":584,"context_line":"            self.context, name\u003d\u0027shared-policy\u0027, shared\u003dTrue,"},{"line_number":585,"context_line":"            project_id\u003dproject_id, is_default\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_0f3e6bb5","line":582,"range":{"start_line":582,"start_character":8,"end_line":582,"end_character":44},"updated":"2018-11-08 00:31:00.000000000","message":"Could you please explain why we need this? It seems to me porject_id is passed in line 585 and 590.","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57025f2e157f73c2d76bcc35b97013aa6655580e","unresolved":false,"context_lines":[{"line_number":579,"context_line":"    @mock.patch.object(policy.QosPolicy, \u0027unset_default\u0027)"},{"line_number":580,"context_line":"    def test_filter_by_shared(self, *mocks):"},{"line_number":581,"context_line":"        project_id \u003d uuidutils.generate_uuid()"},{"line_number":582,"context_line":"        self.context.project_id \u003d project_id"},{"line_number":583,"context_line":"        policy_obj \u003d policy.QosPolicy("},{"line_number":584,"context_line":"            self.context, name\u003d\u0027shared-policy\u0027, shared\u003dTrue,"},{"line_number":585,"context_line":"            project_id\u003dproject_id, is_default\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_0c018fb5","line":582,"range":{"start_line":582,"start_character":8,"end_line":582,"end_character":44},"in_reply_to":"3f79a3b5_0f3e6bb5","updated":"2018-11-08 10:40:49.000000000","message":"Not needed, I\u0027ll remove it","commit_id":"86a0fe1316f5f93241be1da16782eb60a19eaec7"}]}
