)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"48f4c1b1fc2f89dfa63bebd782a814d8f3dd6bf4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Sane parameters for node and driver vendor_passthru()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The vendor_passthru() method for the node and driver library was"},{"line_number":10,"context_line":"expecting a **kwargs, that kinda sucks because you don\u0027t know exactly"},{"line_number":11,"context_line":"how much parameters it expects, what are the parameters etc... This"},{"line_number":12,"context_line":"patch is changing it since the parameters are well defined (we knew what"},{"line_number":13,"context_line":"parameters we were expecting there)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_8cbfbfa9","line":10,"updated":"2014-11-13 20:54:32.000000000","message":"I would prefer if we didn\u0027t use \u0027sucks\u0027. What about \u0027kinda sucks\u0027 -\u003e \u0027isn\u0027t helpful\u0027","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"281c6f36456f87deb990d5f4f0bd90e7e209881c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Sane parameters for node and driver vendor_passthru()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The vendor_passthru() method for the node and driver library was"},{"line_number":10,"context_line":"expecting a **kwargs, that kinda sucks because you don\u0027t know exactly"},{"line_number":11,"context_line":"how much parameters it expects, what are the parameters etc... This"},{"line_number":12,"context_line":"patch is changing it since the parameters are well defined (we knew what"},{"line_number":13,"context_line":"parameters we were expecting there)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_6d727aae","line":10,"in_reply_to":"5a890539_8cbfbfa9","updated":"2014-11-14 11:55:21.000000000","message":"Done","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"}],"ironicclient/tests/v1/test_driver_shell.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"48f4c1b1fc2f89dfa63bebd782a814d8f3dd6bf4","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        d_shell.do_driver_vendor_passthru(client_mock, args)"},{"line_number":43,"context_line":"        client_mock.driver.vendor_passthru.assert_called_once_with("},{"line_number":44,"context_line":"                \u0027driver_name\u0027, \u0027method\u0027, args\u003d{\u0027arg1\u0027: \u0027val1\u0027, \u0027arg2\u0027: \u0027val2\u0027})"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_do_driver_vendor_passthru_without_args(self):"},{"line_number":47,"context_line":"        client_mock \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_8c2a5f8e","line":44,"updated":"2014-11-13 20:54:32.000000000","message":"you could use \u0027driver_name\u0027 -\u003e args.driver_name, \u0027method\u0027 -\u003e args.method. (but what you have is fine.)","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"281c6f36456f87deb990d5f4f0bd90e7e209881c","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        d_shell.do_driver_vendor_passthru(client_mock, args)"},{"line_number":43,"context_line":"        client_mock.driver.vendor_passthru.assert_called_once_with("},{"line_number":44,"context_line":"                \u0027driver_name\u0027, \u0027method\u0027, args\u003d{\u0027arg1\u0027: \u0027val1\u0027, \u0027arg2\u0027: \u0027val2\u0027})"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_do_driver_vendor_passthru_without_args(self):"},{"line_number":47,"context_line":"        client_mock \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2d7cf282","line":44,"in_reply_to":"5a890539_8c2a5f8e","updated":"2014-11-14 11:55:21.000000000","message":"Done","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"}],"ironicclient/v1/driver.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"48f4c1b1fc2f89dfa63bebd782a814d8f3dd6bf4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        except IndexError:"},{"line_number":45,"context_line":"            return {}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def vendor_passthru(self, driver_name, method, args\u003dNone):"},{"line_number":48,"context_line":"        if args is None:"},{"line_number":49,"context_line":"            args \u003d {}"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_8c441fb8","line":47,"updated":"2014-11-13 20:54:32.000000000","message":"If someone uses the ironicclient API (the library) [1], would this be backwards compatible? Wondering why args has a default value.\n\n(Outside the scope but...) why didn\u0027t we put docstrings for all these methods?\n\n[1] http://docs.openstack.org/developer/python-ironicclient/api_v1.html","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"281c6f36456f87deb990d5f4f0bd90e7e209881c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        except IndexError:"},{"line_number":45,"context_line":"            return {}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def vendor_passthru(self, driver_name, method, args\u003dNone):"},{"line_number":48,"context_line":"        if args is None:"},{"line_number":49,"context_line":"            args \u003d {}"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_8d4de640","line":47,"in_reply_to":"5a890539_8c441fb8","updated":"2014-11-14 11:55:21.000000000","message":"Yeah the idea is to be backwards compat. Those values where expected to be present on the kwargs anyway.\n\n\n In [1]: kwargs \u003d {\u0027driver_name\u0027: \u0027fake\u0027, \u0027method\u0027: \u0027test\u0027, \u0027args\u0027: \u0027aaaa\u0027}\n\n In [2]: def vendor_passthru(driver_name, method, args\u003dNone):\n    ...:     print driver_name, method, args\n    ...:     \n\n In [3]: vendor_passthru(**kwargs)\n fake test aaaa\n\n In [4]: vendor_passthru(driver_name\u003d\u0027fake\u0027, method\u003d\u0027test\u0027,  args\u003d\u0027aaaa\u0027)                                                                                                                                                                        \n fake test aaaa\n\nBefore args was mandatory on the CLI but not here in the library, I think that it was inconsistent so I added the placeholder check on the library too so both have this parameter as optional.\n\n...\n\nAbout docstrings, I will add for the vendor_passthru()","commit_id":"ac80e3e18d76c848a7a411e61860b3d7fea98d70"}],"ironicclient/v1/driver_shell.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca24787ca25b347cbbcb453b1966130b07b91808","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"Call a vendor-passthru extension for a driver.\"\"\""},{"line_number":75,"context_line":"    fields \u003d {}"},{"line_number":76,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":77,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":80,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_5c96b295","line":77,"updated":"2014-11-11 21:03:41.000000000","message":"Isn\u0027t result of this call ignored by not using **fields any more? If not, please get rid of \u0027fields\u0027 completely","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"972324d38b4b513fb13f6ffeea7d153e4163d468","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"Call a vendor-passthru extension for a driver.\"\"\""},{"line_number":75,"context_line":"    fields \u003d {}"},{"line_number":76,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":77,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":80,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_e8a5aab5","line":77,"in_reply_to":"5a890539_502af77e","updated":"2014-11-13 09:12:31.000000000","message":"Yes please. I would prefer smth like:\n\n args \u003d utils.args_array_to_dict(args.arguments[0])\n if not args:\n   args \u003d {}","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"5cb0ad54349a351f9eb21a3aead2272e7a8565b3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"Call a vendor-passthru extension for a driver.\"\"\""},{"line_number":75,"context_line":"    fields \u003d {}"},{"line_number":76,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":77,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":80,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_d2842fb3","line":77,"in_reply_to":"5a890539_5c96b295","updated":"2014-11-12 18:38:19.000000000","message":"Dmitry: Unless I totally misunderstand your question, fields is still needed because args_array_to_dict needs it for processing the argument list. It will redefine fields[\u0027args\u0027], which is used below.","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"92887eb4f4b259f2edf0f76860d1b82c20ca1402","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"Call a vendor-passthru extension for a driver.\"\"\""},{"line_number":75,"context_line":"    fields \u003d {}"},{"line_number":76,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":77,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":80,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_502af77e","line":77,"in_reply_to":"5a890539_d2842fb3","updated":"2014-11-12 19:21:37.000000000","message":"Thanks @Dmitry, @David for the comments.\n\nSo yeah @Dmitry, the args_array_to_dict() is a odd function, it requires a dict as input to process the list of arguments as @David said, I\u0027m not passing fileds to the vendor_passthru() method. I can take a look and try to see if there\u0027s a better way of doing that.","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3c6f6e13bb00549ab0da87c267b3a948f6b8c558","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"Call a vendor-passthru extension for a driver.\"\"\""},{"line_number":75,"context_line":"    fields \u003d {}"},{"line_number":76,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":77,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":80,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_0814b64c","line":77,"in_reply_to":"5a890539_e8a5aab5","updated":"2014-11-13 09:35:25.000000000","message":"Yeah, well it doesn\u0027t work this way\n\nTypeError: args_array_to_dict() takes exactly 2 arguments (1 given).\n\n...\n\nI can do something like this:\n\narguments \u003d utils.args_array_to_dict({\u0027args\u0027: args.arguments[0]}, \u0027args\u0027)[\u0027args\u0027]\n\n(I understand this args_array_to_dict() sucks, but I\u0027m not willing to refactor it in this patch)","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"}],"ironicclient/v1/node_shell.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"92887eb4f4b259f2edf0f76860d1b82c20ca1402","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    fields \u003d dict((k, v) for (k, v) in vars(args).items()"},{"line_number":142,"context_line":"                  if k in field_list and not (v is None))"},{"line_number":143,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027driver_info\u0027)"},{"line_number":144,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027extra\u0027)"},{"line_number":145,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027properties\u0027)"},{"line_number":146,"context_line":"    node \u003d cc.node.create(**fields)"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_7021b39e","line":144,"updated":"2014-11-12 19:21:37.000000000","message":"See here","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca24787ca25b347cbbcb453b1966130b07b91808","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    \"\"\"Call a vendor-passthru extension for a node.\"\"\""},{"line_number":196,"context_line":"    fields \u003d {}"},{"line_number":197,"context_line":"    fields[\u0027args\u0027] \u003d args.arguments[0]"},{"line_number":198,"context_line":"    fields \u003d utils.args_array_to_dict(fields, \u0027args\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    # If there were no arguments for the method, fields[\u0027args\u0027] will still"},{"line_number":201,"context_line":"    # be an empty list. So make it an empty dict."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_fcee7e21","line":198,"updated":"2014-11-11 21:03:41.000000000","message":"ditto","commit_id":"0feba82b5b32de6625bf393109a376995f2bf707"}]}
