)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"bc09289725756e3bba52987aae0f32e314f09cb3","unresolved":false,"context_lines":[{"line_number":11,"context_line":"extension via ofctl. This check is done during the OVS agent"},{"line_number":12,"context_line":"startup. However, if the check fails the temporary bridge is not"},{"line_number":13,"context_line":"cleaned up."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I428c954d6561cd398a1e580804a9482969a154af"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3ae8d1ca_c8f85cc7","line":14,"updated":"2014-05-27 11:52:49.000000000","message":"Is there any bug/blueprint to link this patch?","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"323513cdccae4a483059646d45e7797a454a3c88","unresolved":false,"context_lines":[{"line_number":11,"context_line":"extension via ofctl. This check is done during the OVS agent"},{"line_number":12,"context_line":"startup. However, if the check fails the temporary bridge is not"},{"line_number":13,"context_line":"cleaned up."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I428c954d6561cd398a1e580804a9482969a154af"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3ae8d1ca_351d8d10","line":14,"in_reply_to":"3ae8d1ca_c8f85cc7","updated":"2014-05-27 16:05:22.000000000","message":"Done","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"}],"neutron/agent/linux/ovs_lib.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"ba137c92f1c0000c7d14cb3c59810e7a03477fb2","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        try:"},{"line_number":614,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":615,"context_line":"        except Exception:"},{"line_number":616,"context_line":"            supported \u003d False"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_b67fc065","line":616,"updated":"2014-05-22 12:27:36.000000000","message":"Why not just using finally here?","commit_id":"5e168f7c19272edf7b7d4536f0d6b99239f97fd2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"be8c756c0861b81119db3cbf5b042755bb8116f3","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        try:"},{"line_number":614,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":615,"context_line":"        except Exception:"},{"line_number":616,"context_line":"            supported \u003d False"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_366730b9","line":616,"in_reply_to":"7adec928_b67fc065","updated":"2014-05-22 12:32:19.000000000","message":"I think both methods are legit, but creating a context manager is more reusable.","commit_id":"5e168f7c19272edf7b7d4536f0d6b99239f97fd2"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"ac647ad29554edf4b58c30581a7459e4151a3fe8","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":615,"context_line":"        except Exception as e:"},{"line_number":616,"context_line":"            LOG.debug(_(\"Exception while checking supported feature: %s\"), e)"},{"line_number":617,"context_line":"            supported \u003d False"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_990cb796","line":617,"updated":"2014-05-22 12:58:44.000000000","message":"The reproach of Maru in that method is to use catch-all try/catch without any log.\n\nThe method \u0027utils.execute\u0027 returns \u0027RuntimeError\u0027 when the command does not returns 0. So you can catch that exception, destroy the test bridge and return false. Then catch all other exceptions with finally, destroy the bridge test and re-raise exception.\n\nThat solution avoids tu use a catch-all try/catch.","commit_id":"6efa4c75415383dff194796a75c6fe1ba8288250"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bec09fa0d4a1839ae56b65e25fa7128ffd8ae1f2","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":615,"context_line":"        except Exception as e:"},{"line_number":616,"context_line":"            LOG.debug(_(\"Exception while checking supported feature: %s\"), e)"},{"line_number":617,"context_line":"            supported \u003d False"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_7c6e2ecb","line":617,"in_reply_to":"7adec928_990cb796","updated":"2014-05-27 09:10:45.000000000","message":"Done","commit_id":"6efa4c75415383dff194796a75c6fe1ba8288250"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"97e45e432cc73c43b79745309ab67563047f5bc1","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    yield bridge"},{"line_number":113,"context_line":"    bridge.destroy()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class OVSBridge(BaseOVS):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_f75a574f","line":113,"updated":"2014-05-27 10:16:35.000000000","message":"I think that if the raise at line 621 is hit, the call of bridge.destroy() won\u0027t happen.\n\nFrom https://docs.python.org/2/library/contextlib.html\n\"At the point where the generator yields, the block nested in the with statement is executed. The generator is then resumed after the block is exited. If an unhandled exception occurs in the block, it is reraised inside the generator at the point where the yield occurred. Thus, you can use a try...except...finally statement to trap the error (if any), or ensure that some cleanup takes place.\"\n\n\nYou might want to add a try...except and make sure that the bridge gets cleaned up properly.\n\nA unit test could be useful","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"6a4e2d3f3fda1ae8a43fd60bc1461e087214f315","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    yield bridge"},{"line_number":113,"context_line":"    bridge.destroy()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class OVSBridge(BaseOVS):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_281aa06e","line":113,"in_reply_to":"3ae8d1ca_f75a574f","updated":"2014-05-27 11:30:52.000000000","message":"Oh my, clearly I haven\u0027t written enough contextmanagers. Thanks!","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"53bd444a263c7474e38d51032fed95f6c8a2f9ee","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        except Exception as e:"},{"line_number":619,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":620,"context_line":"                            \"feature: %s\"), e)"},{"line_number":621,"context_line":"            raise e"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_17c4233f","line":621,"updated":"2014-05-27 10:04:15.000000000","message":"Single \"raise\" is sufficient.","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"6a4e2d3f3fda1ae8a43fd60bc1461e087214f315","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        except Exception as e:"},{"line_number":619,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":620,"context_line":"                            \"feature: %s\"), e)"},{"line_number":621,"context_line":"            raise e"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_48260cbc","line":621,"in_reply_to":"3ae8d1ca_17c4233f","updated":"2014-05-27 11:30:52.000000000","message":"Done","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"bc09289725756e3bba52987aae0f32e314f09cb3","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":617,"context_line":"        except RuntimeError as e:"},{"line_number":618,"context_line":"            LOG.debug(_(\"Exception while checking supported feature: %s\"), e)"},{"line_number":619,"context_line":"            supported \u003d False"},{"line_number":620,"context_line":"        except Exception as e:"},{"line_number":621,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_c87bfc27","line":618,"updated":"2014-05-27 11:52:49.000000000","message":"It may be worth to log the command as well","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"323513cdccae4a483059646d45e7797a454a3c88","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":617,"context_line":"        except RuntimeError as e:"},{"line_number":618,"context_line":"            LOG.debug(_(\"Exception while checking supported feature: %s\"), e)"},{"line_number":619,"context_line":"            supported \u003d False"},{"line_number":620,"context_line":"        except Exception as e:"},{"line_number":621,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_d5dd4944","line":618,"in_reply_to":"3ae8d1ca_c87bfc27","updated":"2014-05-27 16:05:22.000000000","message":"Done","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"bc09289725756e3bba52987aae0f32e314f09cb3","unresolved":false,"context_lines":[{"line_number":619,"context_line":"            supported \u003d False"},{"line_number":620,"context_line":"        except Exception as e:"},{"line_number":621,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":622,"context_line":"                            \"feature: %s\"), e)"},{"line_number":623,"context_line":"            raise"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_a8b070f5","line":622,"updated":"2014-05-27 11:52:49.000000000","message":"There is no need to pass the exception in explicitly, the exception details will be logged together with trace-back.","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"323513cdccae4a483059646d45e7797a454a3c88","unresolved":false,"context_lines":[{"line_number":619,"context_line":"            supported \u003d False"},{"line_number":620,"context_line":"        except Exception as e:"},{"line_number":621,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":622,"context_line":"                            \"feature: %s\"), e)"},{"line_number":623,"context_line":"            raise"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_d58389ca","line":622,"in_reply_to":"3ae8d1ca_a8b070f5","updated":"2014-05-27 16:05:22.000000000","message":"Seems like there\u0027s no consistency in this file regarding this issue... I\u0027ll remove it here.","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c54d79cbd289706801f505b7e0c9354a885bb636","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":617,"context_line":"        except RuntimeError as e:"},{"line_number":618,"context_line":"            LOG.debug(_(\"Exception while checking supported feature via \""},{"line_number":619,"context_line":"                        \"command %(command)s. Exception: %(e)s\"),"},{"line_number":620,"context_line":"                      {\u0027command\u0027: full_args, \u0027e\u0027: e})"},{"line_number":621,"context_line":"            supported \u003d False"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ae8d1ca_a436cd01","line":618,"updated":"2014-05-27 17:58:23.000000000","message":"please do not use translations with debug messages","commit_id":"c63cf88ac4a2fc496ec031bdc79aa76ade551646"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"08e51b0ecda49be14288213dcf230dca862b5b58","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":617,"context_line":"        except RuntimeError as e:"},{"line_number":618,"context_line":"            LOG.debug(_(\"Exception while checking supported feature via \""},{"line_number":619,"context_line":"                        \"command %(command)s. Exception: %(e)s\"),"},{"line_number":620,"context_line":"                      {\u0027command\u0027: full_args, \u0027e\u0027: e})"},{"line_number":621,"context_line":"            supported \u003d False"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ae8d1ca_6d7c8c21","line":618,"in_reply_to":"3ae8d1ca_a436cd01","updated":"2014-05-28 12:22:55.000000000","message":"Done","commit_id":"c63cf88ac4a2fc496ec031bdc79aa76ade551646"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3c509d515fa4da965e0c7822bee0e79e3186c876","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_b658ccfb","line":109,"updated":"2014-05-30 10:07:58.000000000","message":"Always the same trouble, where should i respond in your or my change ? :)\n\nDefining __enter__/__exit__ in OVSBridge seems more pythonic (strategy used by open(), tempfile classes, Lock, ...).","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"28c9082abab461fc09773c45cb6c7172ccc42bc3","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_8a9bd716","line":109,"updated":"2014-06-05 17:49:52.000000000","message":"it\u0027s better to enable OVSBridge to be using within a context vs having the standalone to get a different behavior","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_2e4d5b73","line":109,"in_reply_to":"1ae5cdf2_43e00396","updated":"2014-06-29 15:33:01.000000000","message":"Done","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f15c8004aca0d494ebc428088e99299350437755","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_43e00396","line":109,"in_reply_to":"1ae5cdf2_561dc365","updated":"2014-06-04 19:23:41.000000000","message":"https://review.openstack.org/96525 which is about to be merge provide the context manager","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2869b4ece99369b75b2f9b80d80885dba7d6d4b1","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_561dc365","line":109,"in_reply_to":"1ae5cdf2_56aa2871","updated":"2014-06-01 16:34:46.000000000","message":"It is a good idea, it will remove the ping pong between changes.\n\nEDIT: Terry chooses for us [1] ! So we can depend on it\n\nI inform Terry of the need to check patch port support but i can not depend on it because based on comments, the check is done during startup to reduce configuration.\n\n[1] https://review.openstack.org/#/c/96525/4/neutron/agent/linux/ovs_lib.py","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_0e3177ec","line":109,"in_reply_to":"1ae5cdf2_8a9bd716","updated":"2014-06-29 15:33:01.000000000","message":"Done","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8f1b2c9a23e04f973cd541e5055273734d617000","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_56aa2871","line":109,"in_reply_to":"1ae5cdf2_b658ccfb","updated":"2014-05-30 10:20:39.000000000","message":"Meh, it\u0027s a stylistic choice, either one is legit in my mind. I suggest you make a new patch that introduces the context manager, then have both of our patches depend on it?\n\nAnother suggestion is that you talk to Terry so that he puts in the patch ports check in his script and you depend on his patch.","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"28c9082abab461fc09773c45cb6c7172ccc42bc3","unresolved":false,"context_lines":[{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        yield bridge"},{"line_number":114,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_aa9ed304","line":111,"updated":"2014-06-05 17:49:52.000000000","message":"why is this necessary?","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":108,"context_line":"@contextlib.contextmanager"},{"line_number":109,"context_line":"def bridge_context(br_name, root_helper):"},{"line_number":110,"context_line":"    bridge \u003d OVSBridge(br_name, root_helper)"},{"line_number":111,"context_line":"    bridge.reset_bridge()"},{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        yield bridge"},{"line_number":114,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_ee3363f4","line":111,"in_reply_to":"1ae5cdf2_aa9ed304","updated":"2014-06-29 15:33:01.000000000","message":"Done","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ff1f92b37a11471729445b4f48e94e3b5dac11c6","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            supported \u003d False"},{"line_number":621,"context_line":"        except Exception:"},{"line_number":622,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":623,"context_line":"                            \"feature via command: %s\") % full_args)"},{"line_number":624,"context_line":"            raise"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_7ccb551e","line":623,"updated":"2014-06-01 13:47:06.000000000","message":"please use a , instead of the %","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            supported \u003d False"},{"line_number":621,"context_line":"        except Exception:"},{"line_number":622,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":623,"context_line":"                            \"feature via command: %s\") % full_args)"},{"line_number":624,"context_line":"            raise"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_ee4a8354","line":623,"in_reply_to":"1ae5cdf2_7ccb551e","updated":"2014-06-29 15:33:01.000000000","message":"The hacking guidelines state to use a %?\nhttp://docs.openstack.org/developer/hacking/#internationalization-i18n-strings","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ff1f92b37a11471729445b4f48e94e3b5dac11c6","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        except Exception:"},{"line_number":622,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":623,"context_line":"                            \"feature via command: %s\") % full_args)"},{"line_number":624,"context_line":"            raise"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_bcd5ddba","line":624,"updated":"2014-06-01 13:47:06.000000000","message":"You should uses:\nwith excutils.save_and_reraise_exception():\n    LOG.exception...","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        except Exception:"},{"line_number":622,"context_line":"            LOG.exception(_(\"Unexpected exception while checking supported \""},{"line_number":623,"context_line":"                            \"feature via command: %s\") % full_args)"},{"line_number":624,"context_line":"            raise"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    return supported"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_ae408b36","line":624,"in_reply_to":"1ae5cdf2_bcd5ddba","updated":"2014-06-29 15:33:01.000000000","message":"I find \"raise\" simpler than \"with excutils.save_and_reraise_exception():\" but this isn\u0027t important enough to argue over...","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c65a6951dd24f4da761f01b6aae48a91eb200b5c","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return \u0027,\u0027.join(flow_expr_arr)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def ofctl_arg_supported(root_helper, cmd, args):"},{"line_number":545,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    :param root_helper: utility to use when running shell cmds."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e1761c06","line":544,"updated":"2014-06-30 16:30:02.000000000","message":"Since the whole point of doing external checks is to avoid doing runtime checks that modify system state, it doesn\u0027t make sense to me for this function to remain in ovs_lib. We definitely wouldn\u0027t want to encourage a library user to actually call it.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aaffca748f2c192103affb8d85376539665f43bf","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    return \u0027,\u0027.join(flow_expr_arr)"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"def ofctl_arg_supported(root_helper, cmd, args):"},{"line_number":545,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    :param root_helper: utility to use when running shell cmds."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_bae130d2","line":544,"in_reply_to":"baada198_e1761c06","updated":"2014-07-06 17:31:16.000000000","message":"Done","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"}],"neutron/cmd/sanity/checks.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c65a6951dd24f4da761f01b6aae48a91eb200b5c","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":48,"context_line":"    args \u003d [\u0027arp,action\u003dload:0x2-\u003eNXM_OF_ARP_OP[],\u0027"},{"line_number":49,"context_line":"            \u0027move:NXM_NX_ARP_SHA[]-\u003eNXM_NX_ARP_THA[],\u0027"},{"line_number":50,"context_line":"            \u0027move:NXM_OF_ARP_SPA[]-\u003eNXM_OF_ARP_TPA[]\u0027]"},{"line_number":51,"context_line":"    cmd \u003d \u0027add-flow\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a7127456","line":48,"updated":"2014-06-30 16:30:02.000000000","message":"Part of me dislikes that this is duplicated in a couple of different places, the other part realizes that the other use of this has additional stuff added to it and abstracting out the common parts to a constant might also be ugly. Ideally the actions tested would be derived from the actions actually passed to the code...but I don\u0027t feel strongly enough about that to actually hold up getting this merged.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aaffca748f2c192103affb8d85376539665f43bf","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":48,"context_line":"    args \u003d [\u0027arp,action\u003dload:0x2-\u003eNXM_OF_ARP_OP[],\u0027"},{"line_number":49,"context_line":"            \u0027move:NXM_NX_ARP_SHA[]-\u003eNXM_NX_ARP_THA[],\u0027"},{"line_number":50,"context_line":"            \u0027move:NXM_OF_ARP_SPA[]-\u003eNXM_OF_ARP_TPA[]\u0027]"},{"line_number":51,"context_line":"    cmd \u003d \u0027add-flow\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_9f0257b2","line":48,"in_reply_to":"baada198_64bcc86d","updated":"2014-07-06 17:31:16.000000000","message":"Done","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d1020f277d0901906ec4f5b1e75d12fb3138e672","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":48,"context_line":"    args \u003d [\u0027arp,action\u003dload:0x2-\u003eNXM_OF_ARP_OP[],\u0027"},{"line_number":49,"context_line":"            \u0027move:NXM_NX_ARP_SHA[]-\u003eNXM_NX_ARP_THA[],\u0027"},{"line_number":50,"context_line":"            \u0027move:NXM_OF_ARP_SPA[]-\u003eNXM_OF_ARP_TPA[]\u0027]"},{"line_number":51,"context_line":"    cmd \u003d \u0027add-flow\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_b20b902a","line":48,"in_reply_to":"baada198_a7127456","updated":"2014-06-30 17:05:13.000000000","message":"I fear that if an update is done in ovs_neutron_agent, args will not be updated","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"507104f813155f3ec222cd935a0f6cdb535967a4","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":48,"context_line":"    args \u003d [\u0027arp,action\u003dload:0x2-\u003eNXM_OF_ARP_OP[],\u0027"},{"line_number":49,"context_line":"            \u0027move:NXM_NX_ARP_SHA[]-\u003eNXM_NX_ARP_THA[],\u0027"},{"line_number":50,"context_line":"            \u0027move:NXM_OF_ARP_SPA[]-\u003eNXM_OF_ARP_TPA[]\u0027]"},{"line_number":51,"context_line":"    cmd \u003d \u0027add-flow\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_64bcc86d","line":48,"in_reply_to":"baada198_b20b902a","updated":"2014-07-01 02:43:58.000000000","message":"+1 to making a constant of this action list to ensure that updates to the constant impact both the sanity check and the runtime code.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3f9a54ba5b1ef55478b9a2d86a2d6828e8bb696a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return False"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def ofctl_arg_supported(root_helper, cmd, **args):"},{"line_number":54,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_86704b0c","line":53,"updated":"2014-07-07 11:12:29.000000000","message":"Nit: **kwargs","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"47d07b2636d7cef80b651ce03b1b8f5fdb12bb3c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        return False"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def ofctl_arg_supported(root_helper, cmd, **args):"},{"line_number":54,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_73059b0f","line":53,"in_reply_to":"baada198_86704b0c","updated":"2014-07-07 18:20:01.000000000","message":"Done","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"da80b89b2c47eea29f4fcb73dc8712b6e410ae56","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    supported \u003d True"},{"line_number":62,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":63,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":64,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name] +"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_82df54d5","line":61,"updated":"2014-07-07 08:48:29.000000000","message":"do we need to define supported variable ? we can return False instead of supported \u003d False, return True instead of return supported","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"47d07b2636d7cef80b651ce03b1b8f5fdb12bb3c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    supported \u003d True"},{"line_number":62,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":63,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":64,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name] +"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_13337ff6","line":61,"in_reply_to":"baada198_82df54d5","updated":"2014-07-07 18:20:01.000000000","message":"I don\u0027t care about this, but then again, I think if I had coded this stuff up I wouldn\u0027t have used a variable, so there\u0027s that :)","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3f9a54ba5b1ef55478b9a2d86a2d6828e8bb696a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    supported \u003d True"},{"line_number":62,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":63,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":64,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name] +"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_91631c41","line":61,"in_reply_to":"baada198_82df54d5","updated":"2014-07-07 11:12:29.000000000","message":"I think that just depends on programmer\u0027s taste :) I have no strong opinion on that, if I would be creating the code, I\u0027d do\n\n supported \u003d False\n ...\n try:\n     agent_utils.execute(...)\n     supported \u003d True\n except ...","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3f9a54ba5b1ef55478b9a2d86a2d6828e8bb696a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":63,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":64,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name] +"},{"line_number":65,"context_line":"                     [ovs_lib._build_flow_expr_str(args, cmd.split(\u0027-\u0027)[0])])"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            agent_utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":68,"context_line":"        except RuntimeError as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_3124100c","line":65,"updated":"2014-07-07 11:12:29.000000000","message":"I think it\u0027s not needed to join two lists:\n\nfull_args \u003d [\"ovs-ofctl\", cmd, test_br.br_name,\n             ovs_lib._build_flow_expr_str(args, cmd.split(\u0027-\u0027)[0])]","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"47d07b2636d7cef80b651ce03b1b8f5fdb12bb3c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":63,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":64,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name] +"},{"line_number":65,"context_line":"                     [ovs_lib._build_flow_expr_str(args, cmd.split(\u0027-\u0027)[0])])"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            agent_utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":68,"context_line":"        except RuntimeError as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_b30bb322","line":65,"in_reply_to":"baada198_3124100c","updated":"2014-07-07 18:20:01.000000000","message":"Done","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0477d6d27e06fac2be70677e8e6769e4deb867c5","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":81,"context_line":"    mac \u003d netaddr.EUI(\u0027dead:1234:beef\u0027, dialect\u003dnetaddr.mac_unix)"},{"line_number":82,"context_line":"    ip \u003d netaddr.IPAddress(\u0027240.0.0.1\u0027)"},{"line_number":83,"context_line":"    actions \u003d ovs_const.ARP_RESPONDER_ACTIONS % {\u0027mac\u0027: mac, \u0027ip\u0027: ip}"},{"line_number":84,"context_line":"    cmd \u003d \u0027add-flow\u0027"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_17a2abfc","line":82,"updated":"2014-07-06 23:22:25.000000000","message":"why bother to use netaddr?\nit\u0027s simpler to hardcode strings.","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"47d07b2636d7cef80b651ce03b1b8f5fdb12bb3c","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":81,"context_line":"    mac \u003d netaddr.EUI(\u0027dead:1234:beef\u0027, dialect\u003dnetaddr.mac_unix)"},{"line_number":82,"context_line":"    ip \u003d netaddr.IPAddress(\u0027240.0.0.1\u0027)"},{"line_number":83,"context_line":"    actions \u003d ovs_const.ARP_RESPONDER_ACTIONS % {\u0027mac\u0027: mac, \u0027ip\u0027: ip}"},{"line_number":84,"context_line":"    cmd \u003d \u0027add-flow\u0027"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_f310cb4f","line":82,"in_reply_to":"baada198_17a2abfc","updated":"2014-07-07 18:20:01.000000000","message":"Done","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"6e101460062559977149d75601542213f199dd94","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def arp_responder_supported(root_helper):"},{"line_number":81,"context_line":"    mac \u003d netaddr.EUI(\u0027dead:1234:beef\u0027, dialect\u003dnetaddr.mac_unix)"},{"line_number":82,"context_line":"    ip \u003d netaddr.IPAddress(\u0027240.0.0.1\u0027)"},{"line_number":83,"context_line":"    actions \u003d ovs_const.ARP_RESPONDER_ACTIONS % {\u0027mac\u0027: mac, \u0027ip\u0027: ip}"},{"line_number":84,"context_line":"    cmd \u003d \u0027add-flow\u0027"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_589edd08","line":82,"in_reply_to":"baada198_f310cb4f","updated":"2014-07-08 10:52:57.000000000","message":"Seems like the reason is that both mac and ip are used as both strings and numbers in ARP_RESPNDER_ACTIONS. IE both %(mac)s and %(mac)#x. You can\u0027t convert a hardcoded string to a number, but the IPAddress and EUI objects know how to convert themselves like that.","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"560dc867c6e98832c7a0ad5c265aa0758b871576","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":62,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":63,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name,"},{"line_number":64,"context_line":"                      ovs_lib._build_flow_expr_str(kwargs, cmd.split(\u0027-\u0027)[0])])"},{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            agent_utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":67,"context_line":"        except RuntimeError as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_5edc0547","line":64,"updated":"2014-07-08 11:36:25.000000000","message":"Super nit: Cause now you have only one list, external () are not needed.","commit_id":"2525e11b3117da9448ddec155ba1b1e423711ff9"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"0966c90b9f8be1a22a3819cd7294afdefe0361ac","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":62,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"},{"line_number":63,"context_line":"        full_args \u003d ([\"ovs-ofctl\", cmd, test_br.br_name,"},{"line_number":64,"context_line":"                      ovs_lib._build_flow_expr_str(kwargs, cmd.split(\u0027-\u0027)[0])])"},{"line_number":65,"context_line":"        try:"},{"line_number":66,"context_line":"            agent_utils.execute(full_args, root_helper\u003droot_helper)"},{"line_number":67,"context_line":"        except RuntimeError as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_beab611d","line":64,"in_reply_to":"baada198_5edc0547","updated":"2014-07-08 11:45:47.000000000","message":"Done","commit_id":"2525e11b3117da9448ddec155ba1b1e423711ff9"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def ofctl_arg_supported(root_helper, cmd, **kwargs):"},{"line_number":54,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_15c7ea45","line":54,"updated":"2014-07-15 02:31:56.000000000","message":"(Suggestion only) The convention in Neutron would seem to be double-quotes for docstrings.","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def ofctl_arg_supported(root_helper, cmd, **kwargs):"},{"line_number":54,"context_line":"    \u0027\u0027\u0027Verify if ovs-ofctl binary supports command with specific args."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b9374dfd","line":54,"in_reply_to":"baada198_15c7ea45","updated":"2014-07-20 12:30:14.000000000","message":"For the protocol (Bear with me, this is total catharsis for me) the grammar / styling changes are unrelated to this patch and should go in a follow up patch, but well, what is \"should\" really. It\u0027s easier to just fix this in this patch considering how slow it is to push patches around here!\n\nTL;DR: Done.","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."},{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b5b47e82","line":58,"updated":"2014-07-15 02:31:56.000000000","message":"I don\u0027t see a good example of how this should be documented, but at the least args should be renamed to kwargs here - and maybe \u0027:param **kwargs:\u0027?  I don\u0027t see a precendent in the sphinx examples for this style of docstring, but I think it make more sense to make it explicit that the documentation is for **kwargs rather than a parameter named \u0027kwargs\u0027.\n\ncommand -\u003e the command","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."},{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_5928f196","line":58,"in_reply_to":"baada198_b5b47e82","updated":"2014-07-20 12:30:14.000000000","message":"Done","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."},{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":62,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_f5a436a7","line":59,"updated":"2014-07-15 02:31:56.000000000","message":"the args -\u003e the supplied arguments are","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    :param root_helper: utility to use when running shell cmds."},{"line_number":57,"context_line":"    :param cmd: ovs-ofctl command to use for test."},{"line_number":58,"context_line":"    :param args: arguments to test with command."},{"line_number":59,"context_line":"    :returns: a boolean if the args supported."},{"line_number":60,"context_line":"    \u0027\u0027\u0027"},{"line_number":61,"context_line":"    br_name \u003d \u0027br-test-%s\u0027 % utils.get_random_string(6)"},{"line_number":62,"context_line":"    with ovs_lib.OVSBridge(br_name, root_helper) as test_br:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_79185584","line":59,"in_reply_to":"baada198_f5a436a7","updated":"2014-07-20 12:30:14.000000000","message":"Done","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \" feature via command: %s\") % full_args)"},{"line_number":74,"context_line":"            return False"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    return True"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"def arp_responder_supported(root_helper):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_351eaebb","line":76,"updated":"2014-07-15 02:31:56.000000000","message":"(Suggestion only) Maybe it makes sense to use an else: clause in the try/catch?","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            \" feature via command: %s\") % full_args)"},{"line_number":74,"context_line":"            return False"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    return True"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"def arp_responder_supported(root_helper):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_9c527711","line":76,"in_reply_to":"baada198_351eaebb","updated":"2014-07-20 12:30:14.000000000","message":"It\u0027s a bit more consistent with the removal of the variable (Having all of the returns in the context manager block) - Sure.","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"}],"neutron/cmd/sanity_check.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c65a6951dd24f4da761f01b6aae48a91eb200b5c","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def check_arp_responder():"},{"line_number":64,"context_line":"    result \u003d checks.arp_responder_supported("},{"line_number":65,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":66,"context_line":"    if not result:"},{"line_number":67,"context_line":"        LOG.error(_(\u0027Check for Open vSwitch ARP responder support failed. \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_47a0b8f4","line":64,"updated":"2014-06-30 16:30:02.000000000","message":"Since arp_responder_supported() now might pass through an exception, this could cause tests not to continue to run when running multiple tests via running against a set of config files.\n\nSince the external testing would be the only thing calling this now, it might be better to re-architect the check to not re-raise--all we need is a false return and helpful log message.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aaffca748f2c192103affb8d85376539665f43bf","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def check_arp_responder():"},{"line_number":64,"context_line":"    result \u003d checks.arp_responder_supported("},{"line_number":65,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":66,"context_line":"    if not result:"},{"line_number":67,"context_line":"        LOG.error(_(\u0027Check for Open vSwitch ARP responder support failed. \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_1af93c80","line":64,"in_reply_to":"baada198_47a0b8f4","updated":"2014-07-06 17:31:16.000000000","message":"Very good point.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"97e45e432cc73c43b79745309ab67563047f5bc1","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # TODO(ethuleau): Change ARP responder so it\u0027s not dependent on the"},{"line_number":184,"context_line":"        #                 ML2 l2 population mechanism driver."},{"line_number":185,"context_line":"        self.arp_responder_enabled \u003d (arp_responder and"},{"line_number":186,"context_line":"                                      self.l2_pop and"},{"line_number":187,"context_line":"                                      self._check_arp_responder_support())"},{"line_number":188,"context_line":"        self.agent_state \u003d {"},{"line_number":189,"context_line":"            \u0027binary\u0027: \u0027neutron-openvswitch-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_172fc3a2","line":186,"updated":"2014-05-27 10:16:35.000000000","message":"what\u0027s the reason of this change?","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"6a4e2d3f3fda1ae8a43fd60bc1461e087214f315","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # TODO(ethuleau): Change ARP responder so it\u0027s not dependent on the"},{"line_number":184,"context_line":"        #                 ML2 l2 population mechanism driver."},{"line_number":185,"context_line":"        self.arp_responder_enabled \u003d (arp_responder and"},{"line_number":186,"context_line":"                                      self.l2_pop and"},{"line_number":187,"context_line":"                                      self._check_arp_responder_support())"},{"line_number":188,"context_line":"        self.agent_state \u003d {"},{"line_number":189,"context_line":"            \u0027binary\u0027: \u0027neutron-openvswitch-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_adede28d","line":186,"in_reply_to":"3ae8d1ca_172fc3a2","updated":"2014-05-27 11:30:52.000000000","message":"_check_arp_responder_support() is not cheap so there\u0027s no point in calling it if l2_pop is False.","commit_id":"0684f226d148f1d811bf2e183ffa58ec93316343"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c581e77344112ca6533bd322da75a253a7578541","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.tunnel_types \u003d tunnel_types or []"},{"line_number":162,"context_line":"        self.l2_pop \u003d l2_population"},{"line_number":163,"context_line":"        # TODO(ethuleau): Change ARP responder so it\u0027s not dependent on the"},{"line_number":164,"context_line":"        #                 ML2 l2 population mechanism driver."},{"line_number":165,"context_line":"        self.arp_responder_enabled \u003d arp_responder and self.l2_pop"},{"line_number":166,"context_line":"        self.agent_state \u003d {"},{"line_number":167,"context_line":"            \u0027binary\u0027: \u0027neutron-openvswitch-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_0f53e4e2","line":164,"updated":"2014-07-23 16:33:52.000000000","message":"if you change a todo then you become its owner!","commit_id":"604f80d6e247ba0c72b534dce076b95f9676dce1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"460e2ff06fc349ae3455ac02b5e8f3e630a225a6","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.tunnel_types \u003d tunnel_types or []"},{"line_number":162,"context_line":"        self.l2_pop \u003d l2_population"},{"line_number":163,"context_line":"        # TODO(ethuleau): Change ARP responder so it\u0027s not dependent on the"},{"line_number":164,"context_line":"        #                 ML2 l2 population mechanism driver."},{"line_number":165,"context_line":"        self.arp_responder_enabled \u003d arp_responder and self.l2_pop"},{"line_number":166,"context_line":"        self.agent_state \u003d {"},{"line_number":167,"context_line":"            \u0027binary\u0027: \u0027neutron-openvswitch-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_a8a02e43","line":164,"in_reply_to":"baada198_0f53e4e2","updated":"2014-07-23 18:15:29.000000000","message":"I only reworded it :( Sad panda.","commit_id":"604f80d6e247ba0c72b534dce076b95f9676dce1"}],"neutron/tests/functional/sanity/test_sanity.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        checks.patch_supported(self.root_helper)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_arp_responder_runs(self):"},{"line_number":61,"context_line":"        checks.arp_responder_supported(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b5cf1e28","line":61,"updated":"2014-07-15 02:31:56.000000000","message":"(No action required) This won\u0027t actually run in the gate until we can figure out how to enable sudo properly, but hopefully you\u0027ve run it manually.","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        checks.patch_supported(self.root_helper)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_arp_responder_runs(self):"},{"line_number":61,"context_line":"        checks.arp_responder_supported(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_dc586f33","line":61,"in_reply_to":"baada198_b5cf1e28","updated":"2014-07-20 12:30:14.000000000","message":"I have. Is there anyone assigned / responsible for making sure that sudo will be enabled?","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bff2d13d50add6e00681ccc9b41dc02e0fda4cc2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        checks.patch_supported(self.root_helper)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_arp_responder_runs(self):"},{"line_number":61,"context_line":"        checks.arp_responder_supported(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b6a56104","line":61,"in_reply_to":"baada198_dc586f33","updated":"2014-07-22 01:01:59.000000000","message":"I\u0027m technically the assignee [1], but progress was slow last week with infra meeting in Germany.\n\nFiguring out how to get sudo working in the gate has been a struggle, and any insight you can provide is welcome.  I haven\u0027t had time to configure a local system for test so I\u0027ve had to do keyhole debugging through patches to the config repo.  The next step is submitting a patch that dumps the sudo config as part of the functional job config.  I\u0027ve submitted a neutron patch [2] that needs to pass before the functional job is switched over to the dsvm-functional env.\n\n1: https://bugs.launchpad.net/neutron/+bug/1336172\n2: https://review.openstack.org/#/c/104043/","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"}],"neutron/tests/unit/agent/linux/test_ovs_lib.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"bc09289725756e3bba52987aae0f32e314f09cb3","unresolved":false,"context_lines":[{"line_number":933,"context_line":"            ])"},{"line_number":934,"context_line":"            self.assertTrue(supported)"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"            self.execute.side_effect \u003d RuntimeError"},{"line_number":937,"context_line":"            supported \u003d ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027,"},{"line_number":938,"context_line":"                                                    [\u0027args\u0027])"},{"line_number":939,"context_line":"            self.execute.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_e8f43889","line":936,"updated":"2014-05-27 11:52:49.000000000","message":"I think that it worth to add test to verify the Exception case and verify the exception is re-raised","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"323513cdccae4a483059646d45e7797a454a3c88","unresolved":false,"context_lines":[{"line_number":933,"context_line":"            ])"},{"line_number":934,"context_line":"            self.assertTrue(supported)"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"            self.execute.side_effect \u003d RuntimeError"},{"line_number":937,"context_line":"            supported \u003d ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027,"},{"line_number":938,"context_line":"                                                    [\u0027args\u0027])"},{"line_number":939,"context_line":"            self.execute.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":4,"id":"3ae8d1ca_386f4494","line":936,"in_reply_to":"3ae8d1ca_e8f43889","updated":"2014-05-27 16:05:22.000000000","message":"Done","commit_id":"ca9e90e288c21fc4f15e6ddba9a0afa59dd3d749"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c8b179debb23ceb058e6af457469c744cf98a3d5","unresolved":false,"context_lines":[{"line_number":954,"context_line":"        self.assertRaises(OSError, ovs_lib.ofctl_arg_supported,"},{"line_number":955,"context_line":"                          self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"        # And that a RuntimeError is not raised"},{"line_number":958,"context_line":"        self.execute.side_effect \u003d RuntimeError"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_1d2e6243","line":957,"updated":"2014-06-04 13:49:37.000000000","message":"This should be separate test.","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":954,"context_line":"        self.assertRaises(OSError, ovs_lib.ofctl_arg_supported,"},{"line_number":955,"context_line":"                          self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"        # And that a RuntimeError is not raised"},{"line_number":958,"context_line":"        self.execute.side_effect \u003d RuntimeError"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_4e79af92","line":957,"in_reply_to":"1ae5cdf2_1d2e6243","updated":"2014-06-29 15:33:01.000000000","message":"You\u0027re right.","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c8b179debb23ceb058e6af457469c744cf98a3d5","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        self.execute.side_effect \u003d RuntimeError"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"},{"line_number":961,"context_line":"        except RuntimeError:"},{"line_number":962,"context_line":"            self.fail(\u0027ofctl_arg_supported raised RuntimeError unexpectedly\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_5d0d4ae7","line":961,"updated":"2014-06-04 13:49:37.000000000","message":"I think it is better to let caller see the exception rather than catching it here.","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"648a871369f52c049512469ed49ff63a38e51a32","unresolved":false,"context_lines":[{"line_number":958,"context_line":"        self.execute.side_effect \u003d RuntimeError"},{"line_number":959,"context_line":"        try:"},{"line_number":960,"context_line":"            ovs_lib.ofctl_arg_supported(self.root_helper, \u0027cmd\u0027, [\u0027args\u0027])"},{"line_number":961,"context_line":"        except RuntimeError:"},{"line_number":962,"context_line":"            self.fail(\u0027ofctl_arg_supported raised RuntimeError unexpectedly\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab895d6_0e48975a","line":961,"in_reply_to":"1ae5cdf2_5d0d4ae7","updated":"2014-06-29 15:33:01.000000000","message":"The purpose of this bit (Which will be a second test in the next patch set) is to assert that a RuntimeError is not raised. It will be easier to debug if you get an error string that explicitly states that went wrong (That a Runtime exception was raised), instead of some exception that will be really unconnected to the issue. Imagine you\u0027d get some Runtime error like \u0027Not found...\". How would you understand that the test failed because the error was raised? You\u0027d probably think that the issue is the exception itself, and not the fact that it was raised. What do you think?","commit_id":"7d635bd3e904ac2ec659f5369d9eff30bb266c11"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c65a6951dd24f4da761f01b6aae48a91eb200b5c","unresolved":false,"context_lines":[{"line_number":961,"context_line":"                           \u0027br-test-test\u0027], root_helper\u003dself.root_helper)"},{"line_number":962,"context_line":"            ])"},{"line_number":963,"context_line":"            self.assertFalse(supported)"},{"line_number":964,"context_line":""},{"line_number":965,"context_line":"    def test_ofctl_arg_supported_raises_non_runtime_error(self):"},{"line_number":966,"context_line":"        self.execute.side_effect \u003d OSError"},{"line_number":967,"context_line":"        self.assertRaises(OSError, ovs_lib.ofctl_arg_supported,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_67e77ce5","line":964,"updated":"2014-06-30 16:30:02.000000000","message":"Since the only place that will call this function is now the external check, I don\u0027t think we really care about the internals of what is raised under what circumstances, all that matters is True/False result and helpful log message. Might be better to just make the other changes I mention and move this to a functional test like the existing ones in neutron/tests/functional/sanity/ to make sure that we catch any weird ovs_lib API changes.","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aaffca748f2c192103affb8d85376539665f43bf","unresolved":false,"context_lines":[{"line_number":961,"context_line":"                           \u0027br-test-test\u0027], root_helper\u003dself.root_helper)"},{"line_number":962,"context_line":"            ])"},{"line_number":963,"context_line":"            self.assertFalse(supported)"},{"line_number":964,"context_line":""},{"line_number":965,"context_line":"    def test_ofctl_arg_supported_raises_non_runtime_error(self):"},{"line_number":966,"context_line":"        self.execute.side_effect \u003d OSError"},{"line_number":967,"context_line":"        self.assertRaises(OSError, ovs_lib.ofctl_arg_supported,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_da0d0492","line":964,"in_reply_to":"baada198_67e77ce5","updated":"2014-07-06 17:31:16.000000000","message":"Done","commit_id":"b7ce59c5d7bff23f0d8eedd77f2dbc620ca0908e"}],"neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"c5cc34311a716bd562c182973bf6cf02b28b0d43","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        ) as (add_flow_fn, mod_flow_fn, add_tun_fn):"},{"line_number":636,"context_line":"            self.agent.fdb_add(None, fdb_entry)"},{"line_number":637,"context_line":"            self.assertFalse(add_tun_fn.called)"},{"line_number":638,"context_line":"            actions \u003d (constants.ARP_RESPONDER_ACTIONS %"},{"line_number":639,"context_line":"                       {\u0027mac\u0027: netaddr.EUI(FAKE_MAC, dialect\u003dnetaddr.mac_unix),"},{"line_number":640,"context_line":"                        \u0027ip\u0027: netaddr.IPAddress(FAKE_IP1)})"},{"line_number":641,"context_line":"            add_flow_fn.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_15d8caed","line":638,"updated":"2014-07-15 02:31:56.000000000","message":"DRY, yay!","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3b4155a304417954f273603419dee660109a56dc","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        ) as (add_flow_fn, mod_flow_fn, add_tun_fn):"},{"line_number":636,"context_line":"            self.agent.fdb_add(None, fdb_entry)"},{"line_number":637,"context_line":"            self.assertFalse(add_tun_fn.called)"},{"line_number":638,"context_line":"            actions \u003d (constants.ARP_RESPONDER_ACTIONS %"},{"line_number":639,"context_line":"                       {\u0027mac\u0027: netaddr.EUI(FAKE_MAC, dialect\u003dnetaddr.mac_unix),"},{"line_number":640,"context_line":"                        \u0027ip\u0027: netaddr.IPAddress(FAKE_IP1)})"},{"line_number":641,"context_line":"            add_flow_fn.assert_has_calls(["}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b9402d60","line":638,"in_reply_to":"baada198_15d8caed","updated":"2014-07-20 12:30:14.000000000","message":"yay indeed.","commit_id":"80f4207f8a30d86860883486dbf5e8a4fc5279fd"}],"neutron/tests/unit/test_sanity_checks.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"c575e583a5caf432175f703929546ac7843c1b6e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.execute \u003d mock.patch(\u0027neutron.agent.linux.utils.execute\u0027).start()"},{"line_number":26,"context_line":"        self.TO \u003d \"--timeout\u003d10\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def test_ofctl_arg_supported(self):"},{"line_number":29,"context_line":"        def _assert_mock_calls():"},{"line_number":30,"context_line":"            self.execute.assert_has_calls(["},{"line_number":31,"context_line":"                mock.call([\u0027ovs-vsctl\u0027, self.TO, \u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_73c3e537","line":28,"updated":"2014-07-07 15:07:22.000000000","message":"\u003creligious_rant\u003e\nI know it is the fashion in neutron, but I really hate these kinds of tests. They focus more on implementation details than testing something actually useful. Who really cares that ovs-vsctl is called with specific options when all you really care about is that the you somehow test that the ofctl arg is supported?\n\nAny refactoring of the code, like to move ovs_lib to using ovsdb, will end up making us completely rewrite the test so it does no good. Even adding an argument to what we pass to ovs-vsctl would break the test. I think functional/integration tests are much more appropriate for this kind of thing since what we really want to know is highly dependent on external things.\n\u003c/religious_rant\u003e","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"47d07b2636d7cef80b651ce03b1b8f5fdb12bb3c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.execute \u003d mock.patch(\u0027neutron.agent.linux.utils.execute\u0027).start()"},{"line_number":26,"context_line":"        self.TO \u003d \"--timeout\u003d10\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def test_ofctl_arg_supported(self):"},{"line_number":29,"context_line":"        def _assert_mock_calls():"},{"line_number":30,"context_line":"            self.execute.assert_has_calls(["},{"line_number":31,"context_line":"                mock.call([\u0027ovs-vsctl\u0027, self.TO, \u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_010fac37","line":28,"in_reply_to":"baada198_73c3e537","updated":"2014-07-07 18:20:01.000000000","message":"I agree with you 200%. Generally speaking I see little value in unit tests that mock everything out and assert that stuff was called. Generally speaking these are the same tests where every time you want to change something in the implementation you have to run around changing tests to match. They do however run some of the code and so at least you know you don\u0027t have silly syntax issues.\n\nIn this case, specifically, I think a functional test would be much more valuable, and what do you know...\n\nI\u0027ll just remove this code.","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3f9a54ba5b1ef55478b9a2d86a2d6828e8bb696a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                                                   actions\u003d\u0027in_port\u0027)"},{"line_number":46,"context_line":"            _assert_mock_calls()"},{"line_number":47,"context_line":"            self.assertTrue(supported)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"            self.execute.side_effect \u003d RuntimeError"},{"line_number":50,"context_line":"            supported \u003d checks.ofctl_arg_supported(self.root_helper,"},{"line_number":51,"context_line":"                                                   \u0027add-flow\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_315c104b","line":48,"updated":"2014-07-07 11:12:29.000000000","message":"I think here should start different test. Reason is that if line 47 fails, code below won\u0027t be tested.","commit_id":"68acc615d5314fc7cf36df4ec8648c03a183455b"}]}
