)]}'
{"dragonflow/tests/common/app_testing_objects.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0d9cc6f63b7a386f6bd09e07d02345bbde394a71","unresolved":false,"context_lines":[{"line_number":508,"context_line":"class RyuIPv6Filter(object):"},{"line_number":509,"context_line":"    \"\"\"Use ryu to parse the packet and test if it\u0027s IPv6.\"\"\""},{"line_number":510,"context_line":"    def __call__(self, buf):"},{"line_number":511,"context_line":"        pkt \u003d ryu.lib.packet.packet.Packet(buf)"},{"line_number":512,"context_line":"        return (pkt.get_protocol(ryu.lib.packet.ipv6.ipv6) is not None)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_b09496e8","line":511,"updated":"2016-03-07 04:39:23.000000000","message":"this can raise various exceptions when failing to parse the given packet.\nit might be safer to surround it with try-except. \nan example:\nhttps://github.com/openstack/networking-ofagent/blob/master/networking_ofagent/plugins/ofagent/agent/arp_lib.py#L153\n\n(i don\u0027t know how scapy.Ether behaves in such cases)","commit_id":"de78ded7206aae7befc372941008d0b4497ae96d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5506511e763b70d402fa56c2272865aefb61399d","unresolved":false,"context_lines":[{"line_number":508,"context_line":"class RyuIPv6Filter(object):"},{"line_number":509,"context_line":"    \"\"\"Use ryu to parse the packet and test if it\u0027s IPv6.\"\"\""},{"line_number":510,"context_line":"    def __call__(self, buf):"},{"line_number":511,"context_line":"        pkt \u003d ryu.lib.packet.packet.Packet(buf)"},{"line_number":512,"context_line":"        return (pkt.get_protocol(ryu.lib.packet.ipv6.ipv6) is not None)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_ec45d317","line":511,"in_reply_to":"5aef4532_31c71847","updated":"2016-03-07 09:07:18.000000000","message":"ok, as far as it\u0027s intentional, it\u0027s fine for me.","commit_id":"de78ded7206aae7befc372941008d0b4497ae96d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c21e377f3cb6eeab080087d2408f7a340ad55dc6","unresolved":false,"context_lines":[{"line_number":508,"context_line":"class RyuIPv6Filter(object):"},{"line_number":509,"context_line":"    \"\"\"Use ryu to parse the packet and test if it\u0027s IPv6.\"\"\""},{"line_number":510,"context_line":"    def __call__(self, buf):"},{"line_number":511,"context_line":"        pkt \u003d ryu.lib.packet.packet.Packet(buf)"},{"line_number":512,"context_line":"        return (pkt.get_protocol(ryu.lib.packet.ipv6.ipv6) is not None)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_31c71847","line":511,"in_reply_to":"5aef4532_d12514af","updated":"2016-03-07 08:53:29.000000000","message":"In any case, the exception is caught by the Policy handle_packet method. It is then added to an exception list, and the scenario continues to run.\n\nI still think I want this exception propagated upwards, so that it would fail the test.","commit_id":"de78ded7206aae7befc372941008d0b4497ae96d"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"851d99b80d3184bdabd0a2bab0dea1217cb2d62a","unresolved":false,"context_lines":[{"line_number":508,"context_line":"class RyuIPv6Filter(object):"},{"line_number":509,"context_line":"    \"\"\"Use ryu to parse the packet and test if it\u0027s IPv6.\"\"\""},{"line_number":510,"context_line":"    def __call__(self, buf):"},{"line_number":511,"context_line":"        pkt \u003d ryu.lib.packet.packet.Packet(buf)"},{"line_number":512,"context_line":"        return (pkt.get_protocol(ryu.lib.packet.ipv6.ipv6) is not None)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_d12514af","line":511,"in_reply_to":"7af24918_734e98c2","updated":"2016-03-07 08:40:49.000000000","message":"In my opinion, we can try-catch the exception like what ofagent does, and print out the received packet data and by assertion. This is what we are doing in the common way.\n\nIf we do nothing but raise everything from ryu, it will break the unit test framework, which I do not suggest.","commit_id":"de78ded7206aae7befc372941008d0b4497ae96d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"05bbda346a0e1acd92789b6128ab576ca5e2cceb","unresolved":false,"context_lines":[{"line_number":508,"context_line":"class RyuIPv6Filter(object):"},{"line_number":509,"context_line":"    \"\"\"Use ryu to parse the packet and test if it\u0027s IPv6.\"\"\""},{"line_number":510,"context_line":"    def __call__(self, buf):"},{"line_number":511,"context_line":"        pkt \u003d ryu.lib.packet.packet.Packet(buf)"},{"line_number":512,"context_line":"        return (pkt.get_protocol(ryu.lib.packet.ipv6.ipv6) is not None)"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_734e98c2","line":511,"in_reply_to":"7af24918_b09496e8","updated":"2016-03-07 05:38:40.000000000","message":"You are correct. However, if an exception is raised, then unexpected data was received - in a test environment, this could mean that some host or the OVS sent a malformed packet. This either shows a bug in the hosts, OVS, or the virtual network. In any of these cases, I would like the test to fail.\n\nIf this code raises an exception, I want it to propagate all the way up to the testing I/S.","commit_id":"de78ded7206aae7befc372941008d0b4497ae96d"}]}
