)]}'
{"glance/cmd/manage.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c177542f85c35c0ba6b652b2c461599bd5a937c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def purge(self, age_in_days\u003d30, max_rows\u003d100):"},{"line_number":156,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            age_in_days \u003d int(age_in_days)"},{"line_number":159,"context_line":"        except ValueError:"},{"line_number":160,"context_line":"            sys.exit((_(\"Invalid int value for age_in_days: %(args)s.\") % {"},{"line_number":161,"context_line":"                \u0027args\u0027: age_in_days}))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_3fcfc6b1","line":158,"updated":"2016-03-11 20:29:25.000000000","message":"This change is unrelated to this patch. Mind sending a follow-up patch for this?","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"cc9f5eaff32b09330dab4b1c87ed4b185336cafa","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def purge(self, age_in_days\u003d30, max_rows\u003d100):"},{"line_number":156,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            age_in_days \u003d int(age_in_days)"},{"line_number":159,"context_line":"        except ValueError:"},{"line_number":160,"context_line":"            sys.exit((_(\"Invalid int value for age_in_days: %(args)s.\") % {"},{"line_number":161,"context_line":"                \u0027args\u0027: age_in_days}))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_5ce8b4b4","line":158,"in_reply_to":"3afc51ec_3fcfc6b1","updated":"2016-03-16 13:42:18.000000000","message":"Done","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"707b17c9076b9be137f4f993f79652957809405a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def purge(self, age_in_days\u003d30, max_rows\u003d100):"},{"line_number":156,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            age_in_days \u003d int(age_in_days)"},{"line_number":159,"context_line":"        except ValueError:"},{"line_number":160,"context_line":"            sys.exit((_(\"Invalid int value for age_in_days: %(args)s.\") % {"},{"line_number":161,"context_line":"                \u0027args\u0027: age_in_days}))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_7772d54a","line":158,"in_reply_to":"3afc51ec_3fcfc6b1","updated":"2016-03-14 14:50:38.000000000","message":"Yeah, I\u0027m not sure why this code had to be moved from glance/db/sqlalchemy/api.py .","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"0f3bfd2c4adbc22d871fa584c7416b451127ab4f","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def purge(self, age_in_days\u003d30, max_rows\u003d100):"},{"line_number":156,"context_line":"        \"\"\"Purge deleted rows older than a given age from glance tables.\"\"\""},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            age_in_days \u003d int(age_in_days)"},{"line_number":159,"context_line":"        except ValueError:"},{"line_number":160,"context_line":"            sys.exit((_(\"Invalid int value for age_in_days: %(args)s.\") % {"},{"line_number":161,"context_line":"                \u0027args\u0027: age_in_days}))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_d68c6b81","line":158,"in_reply_to":"3afc51ec_7772d54a","updated":"2016-03-15 03:34:58.000000000","message":"Hi Cyril,\n\nThe code from glance/db/sqlalchemy/api.py is unreachable as in glance/cmd/manage.py earlier we were converting age_in_days and max_rows to int [1] so their itself ValueError is getting raised for invalid input.\n\n[1]https://github.com/openstack/glance/blob/master/glance/cmd/manage.py#L160","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c177542f85c35c0ba6b652b2c461599bd5a937c","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if max_rows \u003c 1:"},{"line_number":172,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":173,"context_line":"        # check max_rows for its maximum limit"},{"line_number":174,"context_line":"        utils.validate_mysql_int(max_rows)"},{"line_number":175,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":176,"context_line":"        db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_9fc41a93","line":174,"updated":"2016-03-11 20:29:25.000000000","message":"Doesn\u0027t this patch assume we\u0027re using mysql? What about postgresql ? or other databases supported by sqlalchemy?","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"707b17c9076b9be137f4f993f79652957809405a","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if max_rows \u003c 1:"},{"line_number":172,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":173,"context_line":"        # check max_rows for its maximum limit"},{"line_number":174,"context_line":"        utils.validate_mysql_int(max_rows)"},{"line_number":175,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":176,"context_line":"        db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_37cded5d","line":174,"in_reply_to":"3afc51ec_2d5928ff","updated":"2016-03-14 14:50:38.000000000","message":"The name of the function is misleading, but what it does does not seem MySQL-specific. Should we rename it?","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"cc9f5eaff32b09330dab4b1c87ed4b185336cafa","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if max_rows \u003c 1:"},{"line_number":172,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":173,"context_line":"        # check max_rows for its maximum limit"},{"line_number":174,"context_line":"        utils.validate_mysql_int(max_rows)"},{"line_number":175,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":176,"context_line":"        db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_fc07007f","line":174,"in_reply_to":"3afc51ec_37cded5d","updated":"2016-03-16 13:42:18.000000000","message":"Done","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"4c9f208e8bbf0bba36c5b465f0fe0596995ab037","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if max_rows \u003c 1:"},{"line_number":172,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":173,"context_line":"        # check max_rows for its maximum limit"},{"line_number":174,"context_line":"        utils.validate_mysql_int(max_rows)"},{"line_number":175,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":176,"context_line":"        db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_2d5928ff","line":174,"in_reply_to":"3afc51ec_9fc41a93","updated":"2016-03-14 13:22:58.000000000","message":"Hi Flavio,\n\nI will move utils.validate_mysql_int() to glance.db.sqlalchemy.api since it is related to database only and I have confirmed that the value of max_int used in this method is same to maximum limit of integer for PostgreSQL, DB2, MySQL etc.","commit_id":"44c5d2c5a57e499746278c080c9f127041688e92"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"7033826a39aa07dafeb4db85f0ef415daec96cdd","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        if max_rows \u003c 1:"},{"line_number":179,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":180,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_a1970d8f","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":11},"updated":"2016-03-16 15:58:15.000000000","message":"I feel like there is a lot of extra code being run to check if max_rows \u003c 0x7FFFFFFF\n\n\nif we do it with an if statement we wouldn\u0027t need a \"try except\" here either.","commit_id":"efdac4e3a8d9ad82adb618d61ded04e8f9323df2"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a41c51f247720e47bf939910fd76d3c76d8081f1","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        if max_rows \u003c 1:"},{"line_number":179,"context_line":"            sys.exit(_(\"Minimal rows limit is 1.\"))"},{"line_number":180,"context_line":"        ctx \u003d context.get_admin_context(show_deleted\u003dTrue)"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_75a915df","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":11},"in_reply_to":"1af94dfe_a1970d8f","updated":"2016-03-17 08:58:35.000000000","message":"I see that image validate use that code also, so not sure try except would be enough.","commit_id":"efdac4e3a8d9ad82adb618d61ded04e8f9323df2"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4959ebc3cd323814f16d3458a5cbe5f25f74f30d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"},{"line_number":185,"context_line":"            sys.exit(1)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_e60ff834","line":185,"range":{"start_line":185,"start_character":21,"end_line":185,"end_character":22},"updated":"2016-03-18 13:38:43.000000000","message":"why aren\u0027t we passing a translated string to sys.exit() like the above cases?\n\nsys.exit(exc)","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"00bf1655eff03659384bd69b9180f717fef4e0ff","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"},{"line_number":185,"context_line":"            sys.exit(1)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_35dd4743","line":185,"range":{"start_line":185,"start_character":21,"end_line":185,"end_character":22},"in_reply_to":"1af94dfe_e60ff834","updated":"2016-03-21 07:38:45.000000000","message":"Hi Tom,\n\nI got one comment on my other patch that exit code should be an integer, not some string message.\n\nPlease refer: https://review.openstack.org/#/c/284156/3/cinder/cmd/manage.py","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"eaef4e9a7dd43ff7796c5f4050037707204b4c59","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"},{"line_number":185,"context_line":"            sys.exit(1)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da0c15f0_acab801c","line":185,"range":{"start_line":185,"start_character":21,"end_line":185,"end_character":22},"in_reply_to":"fa0719c6_278a16c0","updated":"2016-03-28 06:02:36.000000000","message":"Done","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"eb0dff3d677cc1dfb8b75d5bc73d28898645c95d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":183,"context_line":"        except exception.Invalid as exc:"},{"line_number":184,"context_line":"            print(exc)"},{"line_number":185,"context_line":"            sys.exit(1)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_278a16c0","line":185,"range":{"start_line":185,"start_character":21,"end_line":185,"end_character":22},"in_reply_to":"fa0719c6_35dd4743","updated":"2016-03-21 18:13:41.000000000","message":"Yeah that person was mistaken. Check out the docs :) https://docs.python.org/2/library/sys.html#sys.exit","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"a41c51f247720e47bf939910fd76d3c76d8081f1","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"    according to given age for relevant models."},{"line_number":1299,"context_line":"    \"\"\""},{"line_number":1300,"context_line":"    # check max_rows for its maximum limit"},{"line_number":1301,"context_line":"    _validate_db_int(max_rows)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"    session \u003d session or get_session()"},{"line_number":1304,"context_line":"    metadata \u003d MetaData(get_engine())"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_b5c0bd7d","line":1301,"updated":"2016-03-17 08:58:35.000000000","message":"Just a small nit, is it possible to pass row_limit\u003dmax_rows here?\nthen we don\u0027t need args in parameters(we can even delete them from validation func. Also exception message would be more clear.","commit_id":"efdac4e3a8d9ad82adb618d61ded04e8f9323df2"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e8152a5cf8019de62f752e961d481d268e5c176e","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"    according to given age for relevant models."},{"line_number":1299,"context_line":"    \"\"\""},{"line_number":1300,"context_line":"    # check max_rows for its maximum limit"},{"line_number":1301,"context_line":"    _validate_db_int(max_rows)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"    session \u003d session or get_session()"},{"line_number":1304,"context_line":"    metadata \u003d MetaData(get_engine())"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_30b9207a","line":1301,"in_reply_to":"1af94dfe_b5c0bd7d","updated":"2016-03-18 08:35:45.000000000","message":"Done","commit_id":"efdac4e3a8d9ad82adb618d61ded04e8f9323df2"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4959ebc3cd323814f16d3458a5cbe5f25f74f30d","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    for param_str in kwargs:"},{"line_number":118,"context_line":"        param \u003d kwargs.get(param_str)"},{"line_number":119,"context_line":"        if param and param \u003e max_int:"},{"line_number":120,"context_line":"            msg \u003d _(\"\u0027%(param)s\u0027 value out of range, \""},{"line_number":121,"context_line":"                    \"must not exceed %(max)d.\") % {\"param\": param_str,"},{"line_number":122,"context_line":"                                                   \"max\": max_int}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_b2088629","line":119,"range":{"start_line":119,"start_character":27,"end_line":119,"end_character":28},"updated":"2016-03-18 13:38:43.000000000","message":"nit :P this should be \u0027\u003e\u003d\u0027  A signed int can hold 2147483647 which is exactly what (2 ** 31) -1 is.\n\n\nRef:\nhttps://msdn.microsoft.com/en-us/library/s3f49ktz.aspx","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"00bf1655eff03659384bd69b9180f717fef4e0ff","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    for param_str in kwargs:"},{"line_number":118,"context_line":"        param \u003d kwargs.get(param_str)"},{"line_number":119,"context_line":"        if param and param \u003e max_int:"},{"line_number":120,"context_line":"            msg \u003d _(\"\u0027%(param)s\u0027 value out of range, \""},{"line_number":121,"context_line":"                    \"must not exceed %(max)d.\") % {\"param\": param_str,"},{"line_number":122,"context_line":"                                                   \"max\": max_int}"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_350f07e3","line":119,"range":{"start_line":119,"start_character":27,"end_line":119,"end_character":28},"in_reply_to":"1af94dfe_b2088629","updated":"2016-03-21 07:38:45.000000000","message":"Hi Tom,\n\nA signed INT allows an exact boundary value(2147483647) to be stored in a database so value greater than this should not be allowed. Same thing is implemented in nova.\n\nPlease refer: https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L959","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"29cf7cf1e911c9c34b251260af20eacae10384cf","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    for param_str in kwargs:"},{"line_number":118,"context_line":"        param \u003d kwargs.get(param_str)"},{"line_number":119,"context_line":"        if param and param \u003e max_int:"},{"line_number":120,"context_line":"            msg \u003d _(\"\u0027%(param)s\u0027 value out of range, \""},{"line_number":121,"context_line":"                    \"must not exceed %(max)d.\") % {\"param\": param_str,"},{"line_number":122,"context_line":"                                                   \"max\": max_int}"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_fe6a6719","line":119,"range":{"start_line":119,"start_character":27,"end_line":119,"end_character":28},"in_reply_to":"fa0719c6_350f07e3","updated":"2016-03-21 20:23:30.000000000","message":"I guess it doesn\u0027t really matter since the number is so big.  \n\nIts up to you :)","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4959ebc3cd323814f16d3458a5cbe5f25f74f30d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    max_int \u003d (2 ** 31) - 1"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    for param_str in kwargs:"},{"line_number":118,"context_line":"        param \u003d kwargs.get(param_str)"},{"line_number":119,"context_line":"        if param and param \u003e max_int:"},{"line_number":120,"context_line":"            msg \u003d _(\"\u0027%(param)s\u0027 value out of range, \""},{"line_number":121,"context_line":"                    \"must not exceed %(max)d.\") % {\"param\": param_str,"},{"line_number":122,"context_line":"                                                   \"max\": max_int}"},{"line_number":123,"context_line":"            raise exception.Invalid(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def clear_db_env():"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_6963b942","line":123,"range":{"start_line":117,"start_character":4,"end_line":123,"end_character":40},"updated":"2016-03-18 13:38:43.000000000","message":"nit: maybe extract the key value pair in the `for`: http://paste.openstack.org/show/491092/","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"eaef4e9a7dd43ff7796c5f4050037707204b4c59","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    max_int \u003d (2 ** 31) - 1"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    for param_str in kwargs:"},{"line_number":118,"context_line":"        param \u003d kwargs.get(param_str)"},{"line_number":119,"context_line":"        if param and param \u003e max_int:"},{"line_number":120,"context_line":"            msg \u003d _(\"\u0027%(param)s\u0027 value out of range, \""},{"line_number":121,"context_line":"                    \"must not exceed %(max)d.\") % {\"param\": param_str,"},{"line_number":122,"context_line":"                                                   \"max\": max_int}"},{"line_number":123,"context_line":"            raise exception.Invalid(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def clear_db_env():"}],"source_content_type":"text/x-python","patch_set":4,"id":"da0c15f0_ec63b818","line":123,"range":{"start_line":117,"start_character":4,"end_line":123,"end_character":40},"in_reply_to":"1af94dfe_6963b942","updated":"2016-03-28 06:02:36.000000000","message":"Done","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"87b26d4a89306d5f01943f1515887a45e5c4f34c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                              expire_on_commit\u003dexpire_on_commit)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def _validate_db_int(**kwargs):"},{"line_number":109,"context_line":"    \"\"\"Make sure that all arguments are less than or equal to 2 ** 31 - 1."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    This limitation is introduced because databases stores INT in 4 bytes."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_d255e11d","line":108,"updated":"2016-04-04 20:53:45.000000000","message":"Is this something that should go into oslo.db?\n\nNot saying we shouldn\u0027t land this in Glance and then use oslo.db but it\u0027d be better to at least have a patch proposed there before we merge this one.","commit_id":"90bd4c32aa83a3b4e6b29856dbc6fd5e29a2bc5c"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"059164e810fed1c77cca9a9c5dadb5a7c97e5641","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                              expire_on_commit\u003dexpire_on_commit)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def _validate_db_int(**kwargs):"},{"line_number":109,"context_line":"    \"\"\"Make sure that all arguments are less than or equal to 2 ** 31 - 1."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    This limitation is introduced because databases stores INT in 4 bytes."}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_15b007dd","line":108,"in_reply_to":"9a061dce_d255e11d","updated":"2016-04-15 13:39:04.000000000","message":"Hi Flavio,\n\nThank\u0027s for your review. Proposed a patch in oslo.db.\nPlease refer: https://review.openstack.org/#/c/306389/","commit_id":"90bd4c32aa83a3b4e6b29856dbc6fd5e29a2bc5c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"63bf31bc4420c220bc0a48e295b0159a3161affb","unresolved":false,"context_lines":[{"line_number":108,"context_line":"def _validate_db_int(**kwargs):"},{"line_number":109,"context_line":"    \"\"\"Make sure that all arguments are less than or equal to 2 ** 31 - 1."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    This limitation is introduced because databases stores INT in 4 bytes."},{"line_number":112,"context_line":"    If the validation fails for some argument, exception.Invalid is raised with"},{"line_number":113,"context_line":"    appropriate information."},{"line_number":114,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da0c15f0_0e31adec","line":111,"updated":"2016-03-28 14:56:14.000000000","message":"That\u0027s not true for unsigned ints but anyway...\u003d)","commit_id":"90bd4c32aa83a3b4e6b29856dbc6fd5e29a2bc5c"}],"glance/tests/unit/test_glance_manage.py":[{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4959ebc3cd323814f16d3458a5cbe5f25f74f30d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        mock_context.return_value \u003d self.context"},{"line_number":39,"context_line":"        self.commands.purge(1, 100)"},{"line_number":40,"context_line":"        mock_db_purge.assert_called_once_with(self.context, 1, 100)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_purge_command_negative_rows(self):"},{"line_number":43,"context_line":"        exit \u003d self.assertRaises(SystemExit, self.commands.purge, 1, -1)"},{"line_number":44,"context_line":"        self.assertEqual(\"Minimal rows limit is 1.\", exit.code)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_52c02250","line":41,"updated":"2016-03-18 13:38:43.000000000","message":"wouldn\u0027t hurt to get a passing test in here too\n\nhttp://paste.openstack.org/show/491100/","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"eaef4e9a7dd43ff7796c5f4050037707204b4c59","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        mock_context.return_value \u003d self.context"},{"line_number":39,"context_line":"        self.commands.purge(1, 100)"},{"line_number":40,"context_line":"        mock_db_purge.assert_called_once_with(self.context, 1, 100)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_purge_command_negative_rows(self):"},{"line_number":43,"context_line":"        exit \u003d self.assertRaises(SystemExit, self.commands.purge, 1, -1)"},{"line_number":44,"context_line":"        self.assertEqual(\"Minimal rows limit is 1.\", exit.code)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da0c15f0_2c45b06f","line":41,"in_reply_to":"1af94dfe_52c02250","updated":"2016-03-28 06:02:36.000000000","message":"Done","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"4959ebc3cd323814f16d3458a5cbe5f25f74f30d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        ex \u003d self.assertRaises(SystemExit, self.commands.purge, 1, max_rows)"},{"line_number":54,"context_line":"        self.assertEqual(1, ex.code)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_purge_command_maximum_rows(self):"},{"line_number":57,"context_line":"        value \u003d int(\u0027999945\u0027 * 100)"},{"line_number":58,"context_line":"        ex \u003d self.assertRaises(SystemExit, self.commands.purge, 1, value)"},{"line_number":59,"context_line":"        self.assertEqual(1, ex.code)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_d2d9d2f4","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":39},"updated":"2016-03-18 13:38:43.000000000","message":"test_purge_command_exceeded_maximum_rows","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"eaef4e9a7dd43ff7796c5f4050037707204b4c59","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        ex \u003d self.assertRaises(SystemExit, self.commands.purge, 1, max_rows)"},{"line_number":54,"context_line":"        self.assertEqual(1, ex.code)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_purge_command_maximum_rows(self):"},{"line_number":57,"context_line":"        value \u003d int(\u0027999945\u0027 * 100)"},{"line_number":58,"context_line":"        ex \u003d self.assertRaises(SystemExit, self.commands.purge, 1, value)"},{"line_number":59,"context_line":"        self.assertEqual(1, ex.code)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da0c15f0_ec4a9882","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":39},"in_reply_to":"1af94dfe_d2d9d2f4","updated":"2016-03-28 06:02:36.000000000","message":"Done","commit_id":"10ea639fbacf4941b63185954942520c4ba84a4d"}]}
