)]}'
{"nova/api/openstack/placement/microversion.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e080e59593c7ac979951247d3e087da57efe38fb","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    raise exc()"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"def version_handler(min_ver, max_ver\u003dNone, exc\u003dwebob.exc.HTTPNotFound):"},{"line_number":220,"context_line":"    \"\"\"Decorator for versioning API methods."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    Add as a decorator to a placement API handler to constrain"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_e59d0267","line":219,"updated":"2017-10-18 18:23:11.000000000","message":"How about defining error_status_code instead of exc and the default code 404?\n\n def version_handler(min_ver, max_ver\u003dNone, error_status_code\u003d404):\n\nWe have\n\n raise webob.exc.status_map[status_code]\n\nSo it is easy to find corresponding exception from the status code.\n\nI feel passing an exception to version_handler() is a little unreadable from caller side.","commit_id":"97b2f7e8bbb1a9c51cf7fe6229f457b9422e0361"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"72d81bb1d254e199081c9f1c4a7507aef6d0482c","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    raise exc()"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"def version_handler(min_ver, max_ver\u003dNone, exc\u003dwebob.exc.HTTPNotFound):"},{"line_number":220,"context_line":"    \"\"\"Decorator for versioning API methods."},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    Add as a decorator to a placement API handler to constrain"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_0c80428b","line":219,"in_reply_to":"3f4b6375_e59d0267","updated":"2017-10-19 02:09:46.000000000","message":"ok, make sense to me ,will modify","commit_id":"97b2f7e8bbb1a9c51cf7fe6229f457b9422e0361"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ce8213da17f5f88da3c295e4082f96851b7bf95f","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                    minimum version allowed for the decorated method."},{"line_number":231,"context_line":"    :param min_ver: A string of two numerals, X.Y, indicating the"},{"line_number":232,"context_line":"                    maximum version allowed for the decorated method."},{"line_number":233,"context_line":"    :param exc: A exception to raise when no handlers defined."},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    def decorator(f):"},{"line_number":236,"context_line":"        min_version \u003d parse_version_string(min_ver)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_e393a54e","line":233,"range":{"start_line":233,"start_character":11,"end_line":233,"end_character":62},"updated":"2017-10-19 12:55:49.000000000","message":"We need to update here also.","commit_id":"066b373c456878b9c5b8395ba792f317efffe6e0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"df74d9af10edeb60097c8867b1a9bd4190d39d02","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                    minimum version allowed for the decorated method."},{"line_number":231,"context_line":"    :param min_ver: A string of two numerals, X.Y, indicating the"},{"line_number":232,"context_line":"                    maximum version allowed for the decorated method."},{"line_number":233,"context_line":"    :param exc: A exception to raise when no handlers defined."},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    def decorator(f):"},{"line_number":236,"context_line":"        min_version \u003d parse_version_string(min_ver)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_9b2b1f81","line":233,"range":{"start_line":233,"start_character":11,"end_line":233,"end_character":62},"in_reply_to":"3f4b6375_e393a54e","updated":"2017-10-20 08:39:13.000000000","message":"Done","commit_id":"066b373c456878b9c5b8395ba792f317efffe6e0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"70e76bf465634e24291451a68167a66fd43a2ebf","unresolved":false,"context_lines":[{"line_number":203,"context_line":"def _find_method(f, version, status_code):"},{"line_number":204,"context_line":"    \"\"\"Look in VERSIONED_METHODS for method with right name matching version."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    If no match is found raise a 404 by default or raise given exception"},{"line_number":207,"context_line":"    \"\"\""},{"line_number":208,"context_line":"    qualified_name \u003d _fully_qualified_name(f)"},{"line_number":209,"context_line":"    # A KeyError shouldn\u0027t be possible here, but let\u0027s be robust"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4b6375_693e5adb","line":206,"range":{"start_line":206,"start_character":31,"end_line":206,"end_character":72},"updated":"2017-10-20 13:04:19.000000000","message":"\"...the HTTPError corresponding to status_code\"\n\n(the defaulting is done by version_handler - this method always looks up the appropriate error)","commit_id":"bd07a67f2995b819f6632e6815789f0444891b45"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"70e76bf465634e24291451a68167a66fd43a2ebf","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    :param min_ver: A string of two numerals, X.Y indicating the"},{"line_number":230,"context_line":"                    minimum version allowed for the decorated method."},{"line_number":231,"context_line":"    :param min_ver: A string of two numerals, X.Y, indicating the"},{"line_number":232,"context_line":"                    maximum version allowed for the decorated method."},{"line_number":233,"context_line":"    :param status_code: A status code to indicate error, 404 by default"},{"line_number":234,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4b6375_e9024a0b","line":231,"range":{"start_line":231,"start_character":11,"end_line":231,"end_character":18},"updated":"2017-10-20 13:04:19.000000000","message":"max_ver\n\n(Not changed by this patch, but may as well fix it while you\u0027re in the neighborhood.)","commit_id":"bd07a67f2995b819f6632e6815789f0444891b45"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1a7f69424d1bb8d7f86511eb99f925c7b072637a","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    :param min_ver: A string of two numerals, X.Y indicating the"},{"line_number":230,"context_line":"                    minimum version allowed for the decorated method."},{"line_number":231,"context_line":"    :param min_ver: A string of two numerals, X.Y, indicating the"},{"line_number":232,"context_line":"                    maximum version allowed for the decorated method."},{"line_number":233,"context_line":"    :param status_code: A status code to indicate error, 404 by default"},{"line_number":234,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f4b6375_97650fe4","line":231,"range":{"start_line":231,"start_character":11,"end_line":231,"end_character":18},"in_reply_to":"3f4b6375_e9024a0b","updated":"2017-10-23 01:36:15.000000000","message":"Done","commit_id":"bd07a67f2995b819f6632e6815789f0444891b45"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9fa575f6fb411351a8616877e1eaa05e2d4488d1","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    \"\"\"Look in VERSIONED_METHODS for method with right name matching version."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    If no match is found a HTTPError corresponding to status_code will"},{"line_number":207,"context_line":"    be returned, default is HTTPNotFound."},{"line_number":208,"context_line":"    \"\"\""},{"line_number":209,"context_line":"    qualified_name \u003d _fully_qualified_name(f)"},{"line_number":210,"context_line":"    # A KeyError shouldn\u0027t be possible here, but let\u0027s be robust"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_57bb170d","line":207,"range":{"start_line":207,"start_character":15,"end_line":207,"end_character":40},"updated":"2017-10-23 01:33:57.000000000","message":"No, the default is handled by the calling method.  There is no default in this method.  The status_code param is required.","commit_id":"89905f381a172790f7bb047d7e6f3cee155af668"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dbc14231a7d02c2402976e0a82b5940799a15501","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    \"\"\"Look in VERSIONED_METHODS for method with right name matching version."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    If no match is found a HTTPError corresponding to status_code will"},{"line_number":207,"context_line":"    be returned, default is HTTPNotFound."},{"line_number":208,"context_line":"    \"\"\""},{"line_number":209,"context_line":"    qualified_name \u003d _fully_qualified_name(f)"},{"line_number":210,"context_line":"    # A KeyError shouldn\u0027t be possible here, but let\u0027s be robust"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_6822ad02","line":207,"range":{"start_line":207,"start_character":15,"end_line":207,"end_character":40},"in_reply_to":"3f4b6375_5750b7d4","updated":"2017-10-23 11:05:16.000000000","message":"The version_handler method defaults to 404.  This method does not.  If you wanted to add a :raises clause to version_handler including that verbiage, that would be okay.","commit_id":"89905f381a172790f7bb047d7e6f3cee155af668"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1a7f69424d1bb8d7f86511eb99f925c7b072637a","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    \"\"\"Look in VERSIONED_METHODS for method with right name matching version."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    If no match is found a HTTPError corresponding to status_code will"},{"line_number":207,"context_line":"    be returned, default is HTTPNotFound."},{"line_number":208,"context_line":"    \"\"\""},{"line_number":209,"context_line":"    qualified_name \u003d _fully_qualified_name(f)"},{"line_number":210,"context_line":"    # A KeyError shouldn\u0027t be possible here, but let\u0027s be robust"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f4b6375_5750b7d4","line":207,"range":{"start_line":207,"start_character":15,"end_line":207,"end_character":40},"in_reply_to":"3f4b6375_57bb170d","updated":"2017-10-23 01:36:15.000000000","message":"well, the default is 404 if nothing given...\nbut I am ok to remove it\n\nversion_handler(min_ver, max_ver\u003dNone, status_code\u003d404):","commit_id":"89905f381a172790f7bb047d7e6f3cee155af668"}],"nova/tests/unit/api/openstack/placement/test_microversion.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"f6f8d8bef287e5676cd9bd2e87fe49964402d5a2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return True"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class TestMicroversionDecoration(test.NoDBTestCase):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\u0027nova.api.openstack.placement.microversion.VERSIONED_METHODS\u0027,"},{"line_number":33,"context_line":"                new\u003dcollections.defaultdict(list))"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_267c45b4","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":52},"updated":"2017-12-01 05:44:07.000000000","message":"Unit tests for this change is added or existing tests should be modified.","commit_id":"581717e444ec0c70a41974101b53d1bcda7b56d2"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"633e3e90271cc00330e729e9e4f7c3e9eba693f0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return True"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class TestMicroversionDecoration(test.NoDBTestCase):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch(\u0027nova.api.openstack.placement.microversion.VERSIONED_METHODS\u0027,"},{"line_number":33,"context_line":"                new\u003dcollections.defaultdict(list))"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_464aa455","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":52},"in_reply_to":"ff82abbf_267c45b4","updated":"2017-12-04 04:55:59.000000000","message":"are you suggesting we need add more test cases for this?","commit_id":"581717e444ec0c70a41974101b53d1bcda7b56d2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"1a227766a97e281d6bb3f1fd2ec939005221a041","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import collections"},{"line_number":16,"context_line":"import operator"},{"line_number":17,"context_line":"import webob"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"df87a7cf_cfa60e10","line":17,"updated":"2017-12-11 16:40:22.000000000","message":"nit: this is the wrong place for this, it should have stayed where it was. This block of imports is for stuff that comes from the stdlib.","commit_id":"6ae2e2c0686fefd1894425c11c8b11fd5da21c76"}]}
