)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d7dfa638240382cb7b00efcb9a632ae671318fb6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check keyword arguments"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Check that all keyword arguments were properly used"},{"line_number":10,"context_line":"in ironic.tests.unit.db.utils.get_test_node."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: If04a162accedb13e63a9de4b3fa2f2961347353a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bacf61ea_5dbdd400","line":10,"updated":"2016-08-05 16:30:14.000000000","message":"Need to fix commit message too.","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"de764db4e459df17028772760b24e0e5677c5c1f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check keyword arguments"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Check that all keyword arguments were properly used"},{"line_number":10,"context_line":"in ironic.tests.unit.db.utils.get_test_node."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: If04a162accedb13e63a9de4b3fa2f2961347353a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ad45d7e_a7780afa","line":10,"in_reply_to":"bacf61ea_5dbdd400","updated":"2016-08-08 08:58:20.000000000","message":"ok","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"}],"ironic/tests/unit/objects/utils.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b4c500a821fe008a0d69fb24cf33438aac24b9a0","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"\"\"\"Ironic object test utilities.\"\"\""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from ironic.common.exception import InvalidParameterValue"},{"line_number":18,"context_line":"from ironic import objects"},{"line_number":19,"context_line":"from ironic.tests.unit.db import utils as db_utils"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_9aebd512","line":17,"updated":"2016-08-05 15:25:05.000000000","message":"Please do not import a class, import a module and do exception.InvalidParameterValue(_(\u0027something\u0027))","commit_id":"1aa583cf12bd775b43267bbda1421d594241c1ee"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b4c500a821fe008a0d69fb24cf33438aac24b9a0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":"    db_node \u003d db_utils.get_test_node(**kw)"},{"line_number":29,"context_line":"    if set(kw) - set(db_node):"},{"line_number":30,"context_line":"        raise InvalidParameterValue"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # Let DB generate ID if it isn\u0027t specified explicitly"},{"line_number":33,"context_line":"    if \u0027id\u0027 not in kw:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_7ad54141","line":30,"updated":"2016-08-05 15:25:05.000000000","message":"You should raise an instance, not a class.","commit_id":"1aa583cf12bd775b43267bbda1421d594241c1ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"cc64df9bd0f622efab1d51578e1b6562e77b9131","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":"    db_node \u003d db_utils.get_test_node(**kw)"},{"line_number":29,"context_line":"    if set(kw) - set(db_node):"},{"line_number":30,"context_line":"        raise InvalidParameterValue"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # Let DB generate ID if it isn\u0027t specified explicitly"},{"line_number":33,"context_line":"    if \u0027id\u0027 not in kw:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_55612ed2","line":30,"in_reply_to":"bacf61ea_7ad54141","updated":"2016-08-05 15:34:22.000000000","message":"Might be nice to do:\n\n extra_args \u003d set(kw) - set(db_node)\n if extra_args:\n    raise InvalidParameterValue(\"A good error message: %s\" % \", \".join(extra_args))\n\nOr something like that. Give the user some info on what are the extra values.","commit_id":"1aa583cf12bd775b43267bbda1421d594241c1ee"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3664edab97eb4176e41b5df8ccdb8bb99783067","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from ironic.tests.unit.db import utils as db_utils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@functools.wraps"},{"line_number":25,"context_line":"def check_keyword_arguments(func):"},{"line_number":26,"context_line":"    def wrapper(**kw):"},{"line_number":27,"context_line":"        result \u003d func(**kw)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_6a61f0d2","line":24,"updated":"2016-08-05 16:09:57.000000000","message":"Better to use six.wraps instead of functools.","commit_id":"9d5dd2a0d0a3be80ce0b76314c22a70d80ad31f5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3664edab97eb4176e41b5df8ccdb8bb99783067","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        extra_args \u003d set(kw) - set(result)"},{"line_number":30,"context_line":"        if extra_args:"},{"line_number":31,"context_line":"            raise exception.InvalidParameterValue(_(\"Unused keyword \""},{"line_number":32,"context_line":"                                                    \"arguments: %s\") % \", \"."},{"line_number":33,"context_line":"                                                  join(extra_args))"},{"line_number":34,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_6abd7001","line":31,"updated":"2016-08-05 16:09:57.000000000","message":"Please also include the object type in the message, is it a node or port or ...","commit_id":"9d5dd2a0d0a3be80ce0b76314c22a70d80ad31f5"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3664edab97eb4176e41b5df8ccdb8bb99783067","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    return chassis"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def get_test_portgroup(ctxt, **kw):"},{"line_number":125,"context_line":"    \"\"\"Return a Portgroup object with appropriate attributes."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    NOTE: The object leaves the attributes marked as changed, such"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_ea3fa084","line":124,"updated":"2016-08-05 16:09:57.000000000","message":"missed portgroups.","commit_id":"9d5dd2a0d0a3be80ce0b76314c22a70d80ad31f5"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"4206ec2e379d9f0e81f8a303715bb408501ea805","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@six.wraps"},{"line_number":25,"context_line":"def check_keyword_arguments(func):"},{"line_number":26,"context_line":"    def wrapper(**kw):"},{"line_number":27,"context_line":"        result \u003d func(**kw)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        extra_args \u003d set(kw) - set(result)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_9b4f5491","line":26,"updated":"2016-08-05 17:25:13.000000000","message":"I think the @six.wraps should be here.\n\nSee functools.wraps docs\n\nhttps://docs.python.org/2/library/functools.html\n\n @six.wraps(func)\n def wrapper(**kw)","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"de764db4e459df17028772760b24e0e5677c5c1f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@six.wraps"},{"line_number":25,"context_line":"def check_keyword_arguments(func):"},{"line_number":26,"context_line":"    def wrapper(**kw):"},{"line_number":27,"context_line":"        result \u003d func(**kw)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        extra_args \u003d set(kw) - set(result)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_276d3a33","line":26,"in_reply_to":"bacf61ea_9b4f5491","updated":"2016-08-08 08:58:20.000000000","message":"yeah, thanks, i\u0027ve missed that","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d7dfa638240382cb7b00efcb9a632ae671318fb6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                                                    \"creating object {1}\")."},{"line_number":34,"context_line":"                                                  format(\", \"."},{"line_number":35,"context_line":"                                                         join(extra_args),"},{"line_number":36,"context_line":"                                                         type(result)))"},{"line_number":37,"context_line":"    return wrapper"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_3de1002b","line":36,"updated":"2016-08-05 16:30:14.000000000","message":"It will be just a dict. You need to pass an object type name to the decorator as an argument.","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"de764db4e459df17028772760b24e0e5677c5c1f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                                                    \"creating object {1}\")."},{"line_number":34,"context_line":"                                                  format(\", \"."},{"line_number":35,"context_line":"                                                         join(extra_args),"},{"line_number":36,"context_line":"                                                         type(result)))"},{"line_number":37,"context_line":"    return wrapper"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_07511663","line":36,"in_reply_to":"bacf61ea_3de1002b","updated":"2016-08-08 08:58:20.000000000","message":"Ok","commit_id":"663b6e406fa33e50d940fb0363b5a907bfecf90c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"19c3c772a4f2fbc114574028e376b08b9be1b921","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        result \u003d func(**kw)"},{"line_number":28,"context_line":"        obj_type \u003d kw.get(\u0027object_type\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        extra_args \u003d set(kw) - set(result)"},{"line_number":31,"context_line":"        if extra_args:"},{"line_number":32,"context_line":"            raise exception.InvalidParameterValue(_(\"Unused keyword \""},{"line_number":33,"context_line":"                                                    \"arguments: {0} while \""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_b34b1659","line":30,"updated":"2016-08-08 15:06:22.000000000","message":"This will obviously fail now, as there is no object_type defined in db_utils.get_test_* functions, if you want to go this way, please do kw.pop instead of get","commit_id":"2a250c13e0035c33228eb76a26ba0dac1c201245"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d86c3b583d9ec07738cee67dc619e01a6df9e942","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def check_keyword_arguments(func):"},{"line_number":25,"context_line":"    @six.wraps"},{"line_number":26,"context_line":"    def wrapper(**kw):"},{"line_number":27,"context_line":"        obj_type \u003d kw.pop(\u0027object_type\u0027)"},{"line_number":28,"context_line":"        result \u003d func(**kw)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_b8a0e5a0","line":25,"updated":"2016-08-09 10:39:30.000000000","message":"You need to pass func as an argument to wraps.","commit_id":"a6d4d39b61cd1ef7fca371d5b0d798dd800ce624"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"723f373b1d2ea7920bb733086b1ab83332a234cc","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        extra_args \u003d set(kw) - set(result)"},{"line_number":31,"context_line":"        if extra_args:"},{"line_number":32,"context_line":"            raise exception.InvalidParameterValue(_(\"Unused keyword \""},{"line_number":33,"context_line":"                                                    \"arguments: {0} while \""},{"line_number":34,"context_line":"                                                    \"creating object {1}\")."},{"line_number":35,"context_line":"                                                  format(\", \"."}],"source_content_type":"text/x-python","patch_set":10,"id":"9ad45d7e_02ed3725","line":32,"updated":"2016-08-09 13:48:13.000000000","message":"I\u0027d rather make the message as follows:\n\n raise exception.InvalidParameterValue(\n     _(\"Unknown keyword arguments (%(extra)s) were passed \"\n       \"while creating a test %(object_type)s object.\") %\n     {\"extra\": \", \".join(extra_args),\n      \"object_type\": obj_type})","commit_id":"45ef3c445e0b669b7f3cbaee66590616c32a3780"}]}
