)]}'
{"nova/objects/quotas.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7f23232478b04547209f17005c666eb744c2463","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(self, context, project_id, key, value, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_19f3200b","line":115,"updated":"2014-07-17 18:56:56.000000000","message":"I\u0027d prefer to replace the term \"key\" with the term \"resource\", since that is what is used in the database table and makes it clear that we are creating a quota on a particular resource.\n\nSimilarly, the term \"value\" is actually \"limit\" in the DB API calls, and I feel that is more descriptive of the parameter\u0027s purpose.","commit_id":"bdc3c611732ac666925f4614070620ba1afe2d83"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"93d3becb168869771b30dcf5b8eb89e81e020200","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(self, context, project_id, key, value, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e873f4b1","line":115,"in_reply_to":"baada198_19f3200b","updated":"2014-07-17 19:53:55.000000000","message":"Very nice, that\u0027s much better. I don\u0027t really like this approach at all, but I think it\u0027s what we need to do for the time being to move forward. Clarity will help for sure.","commit_id":"bdc3c611732ac666925f4614070620ba1afe2d83"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"122f5c7c7c01635baf2064079ae833c58a1fbefd","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(self, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b311cf06","line":115,"updated":"2014-07-22 12:07:28.000000000","message":"This is classmethod,  so we should use \u0027cls\u0027 instead of \u0027self\u0027 in normally.","commit_id":"593f1b44221a0e3519ba19efad6d5996a20a7e5a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19566489070237c33bb77a7d1da2c735e66ebe83","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(self, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9e7f6b17","line":115,"in_reply_to":"baada198_b311cf06","updated":"2014-07-22 13:46:12.000000000","message":"Oops, thanks :)","commit_id":"593f1b44221a0e3519ba19efad6d5996a20a7e5a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"122f5c7c7c01635baf2064079ae833c58a1fbefd","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        db.quota_create(context, project_id, resource, limit, user_id\u003duser_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @base.remotable_classmethod"},{"line_number":122,"context_line":"    def update_limit(self, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":123,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":124,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":125,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_1300bbaa","line":122,"updated":"2014-07-22 12:07:28.000000000","message":"ditto","commit_id":"593f1b44221a0e3519ba19efad6d5996a20a7e5a"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"26e41a79d964f6f9456838e1bcb6b8bfa61ee92d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(cls, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_1ab987cb","line":115,"updated":"2014-07-23 01:54:44.000000000","message":"maybe I miss something, but I\u0027d like to know why these method names(create_limit) are different from the other methods(create) under nova/objects/.","commit_id":"0bd324b80b1bd7c4b96fa5520bd182e903b92ec2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4e74463ffb8393b429d8c1aac0cdfde4fea23b0f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(cls, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_866e04ff","line":115,"in_reply_to":"baada198_1ab987cb","updated":"2014-07-23 14:17:33.000000000","message":"Because they are not creating an instance of the object in the database (this object doesn\u0027t directly represent a single entity in the database), but rather they create a quota limit for a given named resource.","commit_id":"0bd324b80b1bd7c4b96fa5520bd182e903b92ec2"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"7b7f211728b6543bce6a3ffe22c9fd5aa859af67","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @base.remotable_classmethod"},{"line_number":115,"context_line":"    def create_limit(cls, context, project_id, resource, limit, user_id\u003dNone):"},{"line_number":116,"context_line":"        # NOTE(danms,comstud): Quotas likely needs an overhaul and currently"},{"line_number":117,"context_line":"        # doesn\u0027t map very well to objects. Since there is quite a bit of"},{"line_number":118,"context_line":"        # logic in the db api layer for this, just pass this through for now."}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_149e7e07","line":115,"in_reply_to":"baada198_866e04ff","updated":"2014-07-24 08:14:21.000000000","message":"Thanks for your explanation, I got it.","commit_id":"0bd324b80b1bd7c4b96fa5520bd182e903b92ec2"}],"nova/tests/objects/test_quotas.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e7f23232478b04547209f17005c666eb744c2463","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    @mock.patch(\u0027nova.db.quota_create\u0027)"},{"line_number":148,"context_line":"    def test_create_limit(self, mock_create):"},{"line_number":149,"context_line":"        quotas_obj.Quotas.create_limit(self.context, \u0027fake-project\u0027,"},{"line_number":150,"context_line":"                                       \u0027foo\u0027, \u0027bar\u0027, user_id\u003d\u0027user\u0027)"},{"line_number":151,"context_line":"        mock_create.assert_called_once_with(self.context, \u0027fake-project\u0027,"},{"line_number":152,"context_line":"                                            \u0027foo\u0027, \u0027bar\u0027, user_id\u003d\u0027user\u0027)"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_395b84f7","line":150,"updated":"2014-07-17 18:56:56.000000000","message":"While \u0027foo\u0027 and \u0027bar\u0027 are fine I suppose, a more realistic example would be \u0027foo\u0027 and 10, as the \"value\" parameter is expected to be an integer.","commit_id":"bdc3c611732ac666925f4614070620ba1afe2d83"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"93d3becb168869771b30dcf5b8eb89e81e020200","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    @mock.patch(\u0027nova.db.quota_create\u0027)"},{"line_number":148,"context_line":"    def test_create_limit(self, mock_create):"},{"line_number":149,"context_line":"        quotas_obj.Quotas.create_limit(self.context, \u0027fake-project\u0027,"},{"line_number":150,"context_line":"                                       \u0027foo\u0027, \u0027bar\u0027, user_id\u003d\u0027user\u0027)"},{"line_number":151,"context_line":"        mock_create.assert_called_once_with(self.context, \u0027fake-project\u0027,"},{"line_number":152,"context_line":"                                            \u0027foo\u0027, \u0027bar\u0027, user_id\u003d\u0027user\u0027)"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_08502809","line":150,"in_reply_to":"baada198_395b84f7","updated":"2014-07-17 19:53:55.000000000","message":"Ah, yep, good call.","commit_id":"bdc3c611732ac666925f4614070620ba1afe2d83"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"26e41a79d964f6f9456838e1bcb6b8bfa61ee92d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                                            \u0027foo\u0027, 10, user_id\u003d\u0027user\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    @mock.patch(\u0027nova.db.quota_update\u0027)"},{"line_number":155,"context_line":"    def test_update_limit(self, mock_create):"},{"line_number":156,"context_line":"        quotas_obj.Quotas.update_limit(self.context, \u0027fake-project\u0027,"},{"line_number":157,"context_line":"                                       \u0027foo\u0027, 10, user_id\u003d\u0027user\u0027)"},{"line_number":158,"context_line":"        mock_create.assert_called_once_with(self.context, \u0027fake-project\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_bac5fb5d","line":155,"updated":"2014-07-23 01:54:44.000000000","message":"nit: s/mock_create/mock_update/","commit_id":"0bd324b80b1bd7c4b96fa5520bd182e903b92ec2"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"26e41a79d964f6f9456838e1bcb6b8bfa61ee92d","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def test_update_limit(self, mock_create):"},{"line_number":156,"context_line":"        quotas_obj.Quotas.update_limit(self.context, \u0027fake-project\u0027,"},{"line_number":157,"context_line":"                                       \u0027foo\u0027, 10, user_id\u003d\u0027user\u0027)"},{"line_number":158,"context_line":"        mock_create.assert_called_once_with(self.context, \u0027fake-project\u0027,"},{"line_number":159,"context_line":"                                            \u0027foo\u0027, 10, user_id\u003d\u0027user\u0027)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_fa9e9368","line":158,"updated":"2014-07-23 01:54:44.000000000","message":"ditto","commit_id":"0bd324b80b1bd7c4b96fa5520bd182e903b92ec2"}]}
