)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ca1a565f4083bac94dd695c929d1231d7caa105c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"function checks if no argument was passed, or if both port_id"},{"line_number":11,"context_line":"and subnet_id were in the passed argument, but no such check is"},{"line_number":12,"context_line":"performed if neither of them were found in the passed argument."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I39157b516c685511d0f937bd6a93a022828a94c0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"baada198_cf6de504","line":13,"updated":"2014-07-21 22:40:03.000000000","message":"Please open a bug and link here.","commit_id":"c121320ce16909c01e9b1134dd0470094f38c819"}],"neutron/db/l3_db.py":[{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"ca1a565f4083bac94dd695c929d1231d7caa105c","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        if port_id_specified and subnet_id_specified:"},{"line_number":422,"context_line":"            msg \u003d _(\"Cannot specify both subnet-id and port-id\")"},{"line_number":423,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":424,"context_line":"        if not port_id_specified and not subnet_id_specified:"},{"line_number":425,"context_line":"            msg \u003d _(\"One of subnet-id or port-id must be specified.\")"},{"line_number":426,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":427,"context_line":"        return port_id_specified, subnet_id_specified"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_922a307c","line":424,"updated":"2014-07-21 22:40:03.000000000","message":"Yes, this requires new unit tests. Please see: def test_router_add_interface(self) (line 189) in neutron/tests/unit/test_l3_plugin.py \n\nSince there seem to be no test for validating the input for adding an interface to router, you need to add new tests.","commit_id":"c121320ce16909c01e9b1134dd0470094f38c819"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"ff8166deac712752a06dc2ba4a12053a41e2536b","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        if port_id_specified and subnet_id_specified:"},{"line_number":422,"context_line":"            msg \u003d _(\"Cannot specify both subnet-id and port-id\")"},{"line_number":423,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":424,"context_line":"        if not port_id_specified and not subnet_id_specified:"},{"line_number":425,"context_line":"            msg \u003d _(\"One of subnet-id or port-id must be specified.\")"},{"line_number":426,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":427,"context_line":"        return port_id_specified, subnet_id_specified"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ec462c20","line":424,"in_reply_to":"baada198_922a307c","updated":"2014-07-22 01:29:29.000000000","message":"I attempted for about two hours today to add tests. The test class mocks out the call to any method on the plugin, so the method on the mixin class that I\u0027ve changed above is never called. None of this function is actually covered by tests.","commit_id":"c121320ce16909c01e9b1134dd0470094f38c819"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c748f605bd7b8494e8f606d3077f67cbc751be31","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        if port_id_specified and subnet_id_specified:"},{"line_number":422,"context_line":"            msg \u003d _(\"Cannot specify both subnet-id and port-id\")"},{"line_number":423,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":424,"context_line":"        if not port_id_specified and not subnet_id_specified:"},{"line_number":425,"context_line":"            msg \u003d _(\"One of subnet-id or port-id must be specified.\")"},{"line_number":426,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":427,"context_line":"        return port_id_specified, subnet_id_specified"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_c17b31bd","line":424,"updated":"2014-07-25 13:37:46.000000000","message":"Instead of this, you can instead change L416-417 to:\n\n    port_id_specified \u003d interface_info is not None and \u0027port_id\u0027 in interface_info\n    subnet_id_specified \u003d interface_info is not None and \u0027port_id\u0027 in interface_info","commit_id":"7428616d1aad2cd9af1422ccc4221fb44268349f"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"7d79d609343366737320a3a89485bb749b905056","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        if port_id_specified and subnet_id_specified:"},{"line_number":422,"context_line":"            msg \u003d _(\"Cannot specify both subnet-id and port-id\")"},{"line_number":423,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":424,"context_line":"        if not port_id_specified and not subnet_id_specified:"},{"line_number":425,"context_line":"            msg \u003d _(\"One of subnet-id or port-id must be specified.\")"},{"line_number":426,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":427,"context_line":"        return port_id_specified, subnet_id_specified"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ffdc4ce3","line":424,"in_reply_to":"baada198_c17b31bd","updated":"2014-07-25 14:33:38.000000000","message":"I\u0027m sorry if I\u0027m missing something, but how does that help? Both variables will still be None with your change if you pass in a dictionary that doesn\u0027t contain either key. We don\u0027t check them both being None without this change. Since you stated I can replace this added block with your code, this means we then return None, None from this function and add_router_interface() then raises an internal server error.","commit_id":"7428616d1aad2cd9af1422ccc4221fb44268349f"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c748f605bd7b8494e8f606d3077f67cbc751be31","unresolved":false,"context_lines":[{"line_number":908,"context_line":"                                          expected_code\u003dexc."},{"line_number":909,"context_line":"                                          HTTPBadRequest.code)"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    def test_router_add_interface_different_keys(self):"},{"line_number":912,"context_line":"        interface_data \u003d {\u0027some-key\u0027: \u0027some-value\u0027}"},{"line_number":913,"context_line":"        code \u003d exc.HTTPBadRequest.code"},{"line_number":914,"context_line":"        with self.router() as r:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_e4bf63c8","line":911,"updated":"2014-07-25 13:37:46.000000000","message":"If interface_data could be None, you should have a test case that checks that. It looks like L368-369 would prevent that case from being tested.\n\nIf interface_data could NEVER be None, then the validator doesn\u0027t need to check for None (unless desired as defensive programming).","commit_id":"7428616d1aad2cd9af1422ccc4221fb44268349f"},{"author":{"_account_id":9369,"name":"Steve Kowalik","email":"steven@wedontsleep.org","username":"stevenk"},"change_message_id":"7d79d609343366737320a3a89485bb749b905056","unresolved":false,"context_lines":[{"line_number":908,"context_line":"                                          expected_code\u003dexc."},{"line_number":909,"context_line":"                                          HTTPBadRequest.code)"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"    def test_router_add_interface_different_keys(self):"},{"line_number":912,"context_line":"        interface_data \u003d {\u0027some-key\u0027: \u0027some-value\u0027}"},{"line_number":913,"context_line":"        code \u003d exc.HTTPBadRequest.code"},{"line_number":914,"context_line":"        with self.router() as r:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3a641248","line":911,"in_reply_to":"baada198_e4bf63c8","updated":"2014-07-25 14:33:38.000000000","message":"I think interface_data could never be None, since the API serialization routines will only do so for dictionaries.","commit_id":"7428616d1aad2cd9af1422ccc4221fb44268349f"}]}
