)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"994adaf6a9bf7971473dc575fe7607268d2d9d5a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Unable to pass additional json parameters to update_router test case"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit fixes the bug. We can now pass additioanl json"},{"line_number":10,"context_line":"attributes to update_router test case. \u0027name\u0027 and \u0027admin_state_up\u0027"},{"line_number":11,"context_line":"is needed after the loop since this method is used by test cases"},{"line_number":12,"context_line":"which do not pass these attributes to the modified method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a80dd14_4b93a35a","line":9,"updated":"2015-03-09 18:49:28.000000000","message":"additional","commit_id":"ce9036721e1525d7469a8935fd96875e552a2eca"}],"tempest/services/network/json/network_client.py":[{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"a46dc6c729d99bb019db11c5c19ea42bfb060475","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        resp, body \u003d self.get(uri)"},{"line_number":306,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":307,"context_line":"        body \u003d json.loads(body)"},{"line_number":308,"context_line":"        update_body \u003d {}"},{"line_number":309,"context_line":"        for k, v in kwargs.iteritems():"},{"line_number":310,"context_line":"            update_body[k] \u003d v"},{"line_number":311,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_a03f0324","line":308,"updated":"2015-03-03 16:05:57.000000000","message":"update_body \u003d kwargs.copy()\n\nor\n\nupdate_body \u003d copy.deepcopy(update_body )","commit_id":"6f2023950e17da942aefae88c0509417f8532259"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"a46dc6c729d99bb019db11c5c19ea42bfb060475","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        cur_gw_info \u003d body[\u0027router\u0027][\u0027external_gateway_info\u0027]"},{"line_number":315,"context_line":"        if cur_gw_info:"},{"line_number":316,"context_line":"            # TODO(kevinbenton): setting the external gateway info is not"},{"line_number":317,"context_line":"            # allowed for a regular tenant. If the ability to update is also"},{"line_number":318,"context_line":"            # merged, a test case for this will need to be added similar to"},{"line_number":319,"context_line":"            # the SNAT case."},{"line_number":320,"context_line":"            cur_gw_info.pop(\u0027external_fixed_ips\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_205f93e6","line":317,"updated":"2015-03-03 16:05:57.000000000","message":"\"for regular user.\"","commit_id":"6f2023950e17da942aefae88c0509417f8532259"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"a46dc6c729d99bb019db11c5c19ea42bfb060475","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                cur_gw_info.pop(\u0027enable_snat\u0027, None)"},{"line_number":323,"context_line":"        update_body[\u0027external_gateway_info\u0027] \u003d kwargs.get("},{"line_number":324,"context_line":"            \u0027external_gateway_info\u0027, body[\u0027router\u0027][\u0027external_gateway_info\u0027])"},{"line_number":325,"context_line":"        if \u0027distributed\u0027 in kwargs:"},{"line_number":326,"context_line":"            update_body[\u0027distributed\u0027] \u003d kwargs[\u0027distributed\u0027]"},{"line_number":327,"context_line":"        update_body \u003d dict(router\u003dupdate_body)"},{"line_number":328,"context_line":"        update_body \u003d json.dumps(update_body)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_005c4f18","line":325,"updated":"2015-03-03 16:05:57.000000000","message":"This distributed part is done by the loop.","commit_id":"6f2023950e17da942aefae88c0509417f8532259"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"994adaf6a9bf7971473dc575fe7607268d2d9d5a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":307,"context_line":"        body \u003d json.loads(body)"},{"line_number":308,"context_line":"        update_body \u003d {}"},{"line_number":309,"context_line":"        for k, v in kwargs.iteritems():"},{"line_number":310,"context_line":"            update_body[k] \u003d v"},{"line_number":311,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"},{"line_number":312,"context_line":"        update_body[\u0027admin_state_up\u0027] \u003d kwargs.get("}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_8ba75ba6","line":309,"updated":"2015-03-09 18:49:28.000000000","message":"agree with afazekas regarding dict.copy.... at the very least iteritems is not py3 compatible","commit_id":"ce9036721e1525d7469a8935fd96875e552a2eca"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"af365ee075894225be419192c50a6078f23e6af6","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        resp, body \u003d self.get(uri)"},{"line_number":305,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":306,"context_line":"        body \u003d json.loads(body)"},{"line_number":307,"context_line":"        update_body \u003d {}"},{"line_number":308,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"},{"line_number":309,"context_line":"        update_body[\u0027admin_state_up\u0027] \u003d kwargs.get("},{"line_number":310,"context_line":"            \u0027admin_state_up\u0027, body[\u0027router\u0027][\u0027admin_state_up\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_82678824","side":"PARENT","line":307,"updated":"2015-06-08 21:07:05.000000000","message":"First assign to update_body is not needed.","commit_id":"7960e0dd80a76b5e1f284e502b6faf25da9b7489"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f1a9ce6b35151580df43f27fe0a35944f7fa71b1","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        resp, body \u003d self.get(uri)"},{"line_number":305,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":306,"context_line":"        body \u003d json.loads(body)"},{"line_number":307,"context_line":"        update_body \u003d kwargs.copy()"},{"line_number":308,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"},{"line_number":309,"context_line":"        update_body[\u0027admin_state_up\u0027] \u003d kwargs.get("},{"line_number":310,"context_line":"            \u0027admin_state_up\u0027, body[\u0027router\u0027][\u0027admin_state_up\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_b424b7c4","line":307,"updated":"2015-06-10 06:45:46.000000000","message":"it looks like that now most of the stuff that use **kwargs below is basically redundant now. My understanding of the initialization of update_body to an empty dictionary was that we wanted a controlled set of parameters being passed to the update request, but I might be mistaken.","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":11784,"name":"Chirag Shahani","email":"chirag.shahani@gmail.com","username":"cshahani"},"change_message_id":"7113b0c0d06cb0f68bbbc9580c586c393b701cda","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        resp, body \u003d self.get(uri)"},{"line_number":305,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":306,"context_line":"        body \u003d json.loads(body)"},{"line_number":307,"context_line":"        update_body \u003d kwargs.copy()"},{"line_number":308,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"},{"line_number":309,"context_line":"        update_body[\u0027admin_state_up\u0027] \u003d kwargs.get("},{"line_number":310,"context_line":"            \u0027admin_state_up\u0027, body[\u0027router\u0027][\u0027admin_state_up\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_b840b6a6","line":307,"in_reply_to":"3afb71cf_8476dbd6","updated":"2016-02-10 22:49:03.000000000","message":"where rd\u003d route-distinguisher and rt \u003d route-target associated with a router object","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":11784,"name":"Chirag Shahani","email":"chirag.shahani@gmail.com","username":"cshahani"},"change_message_id":"4d95f6c08bf33a7dac89f81d73c90a1bf04c2d32","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        resp, body \u003d self.get(uri)"},{"line_number":305,"context_line":"        self.expected_success(200, resp.status)"},{"line_number":306,"context_line":"        body \u003d json.loads(body)"},{"line_number":307,"context_line":"        update_body \u003d kwargs.copy()"},{"line_number":308,"context_line":"        update_body[\u0027name\u0027] \u003d kwargs.get(\u0027name\u0027, body[\u0027router\u0027][\u0027name\u0027])"},{"line_number":309,"context_line":"        update_body[\u0027admin_state_up\u0027] \u003d kwargs.get("},{"line_number":310,"context_line":"            \u0027admin_state_up\u0027, body[\u0027router\u0027][\u0027admin_state_up\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_8476dbd6","line":307,"in_reply_to":"3afb71cf_b424b7c4","updated":"2015-06-11 17:36:15.000000000","message":"Well, for one of the update router test cases, the user can update additional parameters like rd and rt for vendor specific plugin. I encountered this while writing tempest test cases for update router with rd/rt parameters. Hence the above fix.","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"cb72a58d278b4b1add0ebf00cbe3553be75962b7","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            cur_gw_info.pop(\u0027external_fixed_ips\u0027, None)"},{"line_number":318,"context_line":"            if not set_enable_snat:"},{"line_number":319,"context_line":"                cur_gw_info.pop(\u0027enable_snat\u0027, None)"},{"line_number":320,"context_line":"        update_body[\u0027external_gateway_info\u0027] \u003d kwargs.get("},{"line_number":321,"context_line":"            \u0027external_gateway_info\u0027, body[\u0027router\u0027][\u0027external_gateway_info\u0027])"},{"line_number":322,"context_line":"        if \u0027distributed\u0027 in kwargs:"},{"line_number":323,"context_line":"            update_body[\u0027distributed\u0027] \u003d kwargs[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_da0cfb94","line":320,"updated":"2015-06-25 13:47:22.000000000","message":"L320..L323 is not needed.","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"1c261e92f8ecf9009e64915c36ae11949ccd6eb6","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            cur_gw_info.pop(\u0027external_fixed_ips\u0027, None)"},{"line_number":318,"context_line":"            if not set_enable_snat:"},{"line_number":319,"context_line":"                cur_gw_info.pop(\u0027enable_snat\u0027, None)"},{"line_number":320,"context_line":"        update_body[\u0027external_gateway_info\u0027] \u003d kwargs.get("},{"line_number":321,"context_line":"            \u0027external_gateway_info\u0027, body[\u0027router\u0027][\u0027external_gateway_info\u0027])"},{"line_number":322,"context_line":"        if \u0027distributed\u0027 in kwargs:"},{"line_number":323,"context_line":"            update_body[\u0027distributed\u0027] \u003d kwargs[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"bae84128_3f3b479e","line":320,"in_reply_to":"3a57f1b5_337e161a","updated":"2016-02-25 06:43:21.000000000","message":"We are using the PUT method which means create-or-update,\ngenerally expected the not specified parameters will be nullified/removed be service. Is neutron different ?\n\nThe enable_snat parameter excluded because neutron forbidden the PUT requests when the user repeated the same entity what he got. Generally it is not expected behavior, neutron just needs to forbid the request when user tries to _change_ this value without permission.\nYou may report it as bug in neutron.\n\n\nDo we have documentation about how neutron generally,\nunderstands the PUT requests ? (Not, Source code, api contract)\n\nI am ok with the short version, if it\u0027s documented to work as you expect.","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":16759,"name":"Wim De Clercq","email":"wim.de_clercq@nuagenetworks.net","username":"wdeclercq"},"change_message_id":"d8797fc1430f6648a76ecf8e6d16312da2fd1505","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            cur_gw_info.pop(\u0027external_fixed_ips\u0027, None)"},{"line_number":318,"context_line":"            if not set_enable_snat:"},{"line_number":319,"context_line":"                cur_gw_info.pop(\u0027enable_snat\u0027, None)"},{"line_number":320,"context_line":"        update_body[\u0027external_gateway_info\u0027] \u003d kwargs.get("},{"line_number":321,"context_line":"            \u0027external_gateway_info\u0027, body[\u0027router\u0027][\u0027external_gateway_info\u0027])"},{"line_number":322,"context_line":"        if \u0027distributed\u0027 in kwargs:"},{"line_number":323,"context_line":"            update_body[\u0027distributed\u0027] \u003d kwargs[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_337e161a","line":320,"in_reply_to":"3a57f1b5_58c0a2e0","updated":"2016-02-11 08:30:35.000000000","message":"The way this _update_router currently works is that it sends ALL known update-able parameters to neutron even when not needed. And if it\u0027s not in the kwargs, it will take the value from the current router.\n\nWhether the lines are needed or not will depend on whether we want to keep on doing this (Sending name, admin_state_up, external_gateway_info, ... even when it\u0027s not in the kwargs).\n\nIf we say, no we don\u0027t necessarily have to send all update-able parameters to neutron, then you can just reduce the method to 3 lines where update_body \u003d kwargs. Drop the GET in the beginning, even the set_enable_snat parameter becomes redundant.\n\nIf yes, the lines must stay.\n\n\nPersonally, I vote for no and change update_router to\n\n  def update_router(self, router_id, **kwargs):\n    uri \u003d \u0027/routers/%s\u0027 % router_id\n    update_body \u003d {\u0027router\u0027: kwargs}\n    return self.update_resource(uri, update_body)\n\nJust like most other update methods. I\u0027m not sure what the reasons are to have routers so different from the rest.","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"},{"author":{"_account_id":11784,"name":"Chirag Shahani","email":"chirag.shahani@gmail.com","username":"cshahani"},"change_message_id":"7113b0c0d06cb0f68bbbc9580c586c393b701cda","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            cur_gw_info.pop(\u0027external_fixed_ips\u0027, None)"},{"line_number":318,"context_line":"            if not set_enable_snat:"},{"line_number":319,"context_line":"                cur_gw_info.pop(\u0027enable_snat\u0027, None)"},{"line_number":320,"context_line":"        update_body[\u0027external_gateway_info\u0027] \u003d kwargs.get("},{"line_number":321,"context_line":"            \u0027external_gateway_info\u0027, body[\u0027router\u0027][\u0027external_gateway_info\u0027])"},{"line_number":322,"context_line":"        if \u0027distributed\u0027 in kwargs:"},{"line_number":323,"context_line":"            update_body[\u0027distributed\u0027] \u003d kwargs[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_58c0a2e0","line":320,"in_reply_to":"fa32b979_da0cfb94","updated":"2016-02-10 22:49:03.000000000","message":"I may be wrong here.. but this is needed IMO. \n\nAs per my understanding, kwargs was copied to update_bidy. Suppose there was no key for \u0027external_gateway_info\u0027 in the kwargs dict. In this case, we need the update_body dict to have the default value for \u0027external_gateway_info\u0027 i.e, body[\u0027router\u0027][\u0027external_gateway_info\u0027]. Correct?","commit_id":"e91226c4ab5cdf2cd42cadfd868f3ea65295882b"}]}
