)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"37d5d412df5264db83b3a793f8be882fa1f96175","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Opendaylight defines the \"binding:profile\" attribute as a string"},{"line_number":10,"context_line":"(see [1]), so in order to parse it we need to send it as one."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] https://github.com/opendaylight/neutron/blob/master/model/src/main/yang/neutron-binding.yang#L64"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I560a70eb94495d466b03271d67e9c9191bac0a0e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf8cb3f7_93ea0373","line":12,"updated":"2017-12-25 14:27:10.000000000","message":"Since the master blob changes please make sure you copy the permalink and reference that one.","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"3bb4eca242b7cc5c630a29d7510a7b64d132af79","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Opendaylight defines the \"binding:profile\" attribute as a string"},{"line_number":10,"context_line":"(see [1]), so in order to parse it we need to send it as one."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] https://github.com/opendaylight/neutron/blob/master/model/src/main/yang/neutron-binding.yang#L64"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I560a70eb94495d466b03271d67e9c9191bac0a0e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf8cb3f7_6484505f","line":12,"in_reply_to":"bf8cb3f7_93ea0373","updated":"2017-12-26 14:20:53.000000000","message":"Done","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"15c132d55ccbe0e4f44d36042cca29a2a5a75b2b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Pass binding:profile attribute as a string"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Opendaylight defines the \"binding:profile\" attribute as a string"},{"line_number":10,"context_line":"(see [1]), so in order to parse it we need to send it as one."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] https://github.com/opendaylight/neutron/blob/7dd96afe5bee07c5e1b8f4aa2bfd5d25193de684/model/src/main/yang/neutron-binding.yang#L64"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I560a70eb94495d466b03271d67e9c9191bac0a0e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bf8cb3f7_3109a530","line":11,"range":{"start_line":10,"start_character":61,"end_line":11,"end_character":0},"updated":"2017-12-26 21:03:49.000000000","message":"Also please mention that binding:profile is special. and it\u0027s value actually json formatted as string.","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"84e83cace2f1514438b5fd81611ab7843c36aefe","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Pass binding:profile attribute as a string"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Opendaylight defines the \"binding:profile\" attribute as a string"},{"line_number":10,"context_line":"(see [1]), so in order to parse it we need to send it as one."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[1] https://github.com/opendaylight/neutron/blob/7dd96afe5bee07c5e1b8f4aa2bfd5d25193de684/model/src/main/yang/neutron-binding.yang#L64"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I560a70eb94495d466b03271d67e9c9191bac0a0e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bf8cb3f7_16aa4fd1","line":11,"range":{"start_line":10,"start_character":61,"end_line":11,"end_character":0},"in_reply_to":"bf8cb3f7_3109a530","updated":"2017-12-27 08:59:22.000000000","message":"Done","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"}],"networking_odl/common/filters.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"b5cff472d410b217b7bb8be6a32284142b1d94a4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron_lib import constants as n_const"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_47f4c0cf","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":11},"updated":"2017-12-24 16:27:44.000000000","message":"please use from oslo_serialization import jsonutils instead","commit_id":"fd936819bf5c77d7a92156db2a6a01e36d9b875d"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c6e08997e8498feb574f35ead2b90b29a8046d79","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron_lib import constants as n_const"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf8cb3f7_42258bc1","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":11},"in_reply_to":"bf8cb3f7_47f4c0cf","updated":"2017-12-25 07:20:41.000000000","message":"Done","commit_id":"fd936819bf5c77d7a92156db2a6a01e36d9b875d"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"efee8529c8b227abc4bbaae0e1953ebe2378a0c6","unresolved":false,"context_lines":[{"line_number":99,"context_line":"def _filter_port_create(port):"},{"line_number":100,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":101,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":102,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":103,"context_line":"        port[\u0027binding:profile\u0027] \u003d jsonutils.dumps(port[\u0027binding:profile\u0027])"},{"line_number":104,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_15a81b75","line":103,"range":{"start_line":102,"start_character":4,"end_line":103,"end_character":74},"updated":"2017-12-25 08:30:19.000000000","message":"Will it be common that the key won\u0027t be present in the dictionary? \n\nIf it will be common you probably want to take out the if and put this inside a try/except","commit_id":"69377fd9ce766e1169ae1379f50888ef31d00362"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"99b685f27d266e5c03334fa4c2b18fd085078b05","unresolved":false,"context_lines":[{"line_number":99,"context_line":"def _filter_port_create(port):"},{"line_number":100,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":101,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":102,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":103,"context_line":"        port[\u0027binding:profile\u0027] \u003d jsonutils.dumps(port[\u0027binding:profile\u0027])"},{"line_number":104,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_b8060686","line":103,"range":{"start_line":102,"start_character":4,"end_line":103,"end_character":74},"in_reply_to":"bf8cb3f7_15a81b75","updated":"2017-12-25 10:58:03.000000000","message":"Done","commit_id":"69377fd9ce766e1169ae1379f50888ef31d00362"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"efee8529c8b227abc4bbaae0e1953ebe2378a0c6","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Filter out port attributes for an update operation.\"\"\""},{"line_number":109,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":110,"context_line":"                             \u0027project_id\u0027])"},{"line_number":111,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":112,"context_line":"        port[\u0027binding:profile\u0027] \u003d jsonutils.dumps(port[\u0027binding:profile\u0027])"},{"line_number":113,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_b5b84fc8","line":111,"updated":"2017-12-25 08:30:19.000000000","message":"same","commit_id":"69377fd9ce766e1169ae1379f50888ef31d00362"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"99b685f27d266e5c03334fa4c2b18fd085078b05","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Filter out port attributes for an update operation.\"\"\""},{"line_number":109,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":110,"context_line":"                             \u0027project_id\u0027])"},{"line_number":111,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":112,"context_line":"        port[\u0027binding:profile\u0027] \u003d jsonutils.dumps(port[\u0027binding:profile\u0027])"},{"line_number":113,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_78007e68","line":111,"in_reply_to":"bf8cb3f7_b5b84fc8","updated":"2017-12-25 10:58:03.000000000","message":"Done","commit_id":"69377fd9ce766e1169ae1379f50888ef31d00362"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"15c132d55ccbe0e4f44d36042cca29a2a5a75b2b","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _convert_value_to_str(dictionary, key):"},{"line_number":104,"context_line":"    try:"},{"line_number":105,"context_line":"        if dictionary[key] and type(dictionary[key]) !\u003d str:"},{"line_number":106,"context_line":"            # use jsonutils to convert unicode \u0026 ascii"},{"line_number":107,"context_line":"            dictionary[key] \u003d jsonutils.dumps(dictionary[key])"},{"line_number":108,"context_line":"    except KeyError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_94ff3f00","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":60},"updated":"2017-12-26 21:03:49.000000000","message":"Do we need this check?\nthe contract is that binding:profile is dictionary and its value is json value as neutron API contract. so we can safely assume it.","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"84e83cace2f1514438b5fd81611ab7843c36aefe","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _convert_value_to_str(dictionary, key):"},{"line_number":104,"context_line":"    try:"},{"line_number":105,"context_line":"        if dictionary[key] and type(dictionary[key]) !\u003d str:"},{"line_number":106,"context_line":"            # use jsonutils to convert unicode \u0026 ascii"},{"line_number":107,"context_line":"            dictionary[key] \u003d jsonutils.dumps(dictionary[key])"},{"line_number":108,"context_line":"    except KeyError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_969e5fb6","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":60},"in_reply_to":"bf8cb3f7_94ff3f00","updated":"2017-12-27 08:59:22.000000000","message":"Done","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"15c132d55ccbe0e4f44d36042cca29a2a5a75b2b","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":114,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":115,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":116,"context_line":"    _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _filter_port_update(port):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_5114694e","line":116,"range":{"start_line":116,"start_character":36,"end_line":116,"end_character":53},"updated":"2017-12-26 21:03:49.000000000","message":"Please add a comment that explains why binding:profile needs sepcial handle.","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"84e83cace2f1514438b5fd81611ab7843c36aefe","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":114,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":115,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":116,"context_line":"    _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _filter_port_update(port):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_36a51305","line":116,"range":{"start_line":116,"start_character":36,"end_line":116,"end_character":53},"in_reply_to":"bf8cb3f7_5114694e","updated":"2017-12-27 08:59:22.000000000","message":"Done","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"15c132d55ccbe0e4f44d36042cca29a2a5a75b2b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":122,"context_line":"                             \u0027project_id\u0027])"},{"line_number":123,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":124,"context_line":"    _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _filter_router_update(router):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_110ee13a","line":124,"range":{"start_line":124,"start_character":36,"end_line":124,"end_character":52},"updated":"2017-12-26 21:03:49.000000000","message":"ditto.","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"84e83cace2f1514438b5fd81611ab7843c36aefe","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":122,"context_line":"                             \u0027project_id\u0027])"},{"line_number":123,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":124,"context_line":"    _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _filter_router_update(router):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf8cb3f7_f6aecbe5","line":124,"range":{"start_line":124,"start_character":36,"end_line":124,"end_character":52},"in_reply_to":"bf8cb3f7_110ee13a","updated":"2017-12-27 08:59:22.000000000","message":"Done","commit_id":"53d992669c4fe6fa8ef285feb58e8f38f5136efa"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bcc8ce3f2f9da052551e7345948b76994046e5e9","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":113,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":114,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":115,"context_line":"    # binding:profile is defined as a dict that can hold several data"},{"line_number":116,"context_line":"    # type values e.g string or list of strings"},{"line_number":117,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":118,"context_line":"    # for specific attributes by their type"},{"line_number":119,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":120,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_57677226","line":118,"range":{"start_line":115,"start_character":4,"end_line":118,"end_character":43},"updated":"2017-12-27 12:42:50.000000000","message":"This much test is superfluous, you can just say something along the lines \"ODL expects binding:profile to be a string, not a dict\"","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    \"\"\"Filter out port attributes not required for a create.\"\"\""},{"line_number":113,"context_line":"    odl_utils.try_del(port, [\u0027status\u0027])"},{"line_number":114,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":115,"context_line":"    # binding:profile is defined as a dict that can hold several data"},{"line_number":116,"context_line":"    # type values e.g string or list of strings"},{"line_number":117,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":118,"context_line":"    # for specific attributes by their type"},{"line_number":119,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":120,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_7a361de9","line":118,"range":{"start_line":115,"start_character":4,"end_line":118,"end_character":43},"in_reply_to":"bf8cb3f7_57677226","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    # type values e.g string or list of strings"},{"line_number":117,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":118,"context_line":"    # for specific attributes by their type"},{"line_number":119,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":120,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_56ea17ac","line":119,"range":{"start_line":119,"start_character":4,"end_line":119,"end_character":35},"updated":"2017-12-27 09:41:10.000000000","message":"The if is not needed as you removed it in favor of the try/except inside the helper.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    # type values e.g string or list of strings"},{"line_number":117,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":118,"context_line":"    # for specific attributes by their type"},{"line_number":119,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":120,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_3a6175aa","line":119,"range":{"start_line":119,"start_character":4,"end_line":119,"end_character":35},"in_reply_to":"bf8cb3f7_56ea17ac","updated":"2017-12-27 14:09:33.000000000","message":"you\u0027re right, the default value is {} so the log wouldn\u0027t be \"contaminated\"","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # type values e.g string or list of strings"},{"line_number":130,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":131,"context_line":"    # for specific attributes by their type"},{"line_number":132,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":133,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_16cc8f5f","line":132,"updated":"2017-12-27 09:41:10.000000000","message":"same","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    # type values e.g string or list of strings"},{"line_number":130,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":131,"context_line":"    # for specific attributes by their type"},{"line_number":132,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":133,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_5a6479b9","line":132,"in_reply_to":"bf8cb3f7_16cc8f5f","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bcc8ce3f2f9da052551e7345948b76994046e5e9","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    \"\"\"Filter out port attributes for an update operation.\"\"\""},{"line_number":125,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":126,"context_line":"                             \u0027project_id\u0027])"},{"line_number":127,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":128,"context_line":"    # binding:profile is defined as a dict that can hold several data"},{"line_number":129,"context_line":"    # type values e.g string or list of strings"},{"line_number":130,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":131,"context_line":"    # for specific attributes by their type"},{"line_number":132,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":133,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def _filter_router_update(router):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_37642e22","line":133,"range":{"start_line":127,"start_character":4,"end_line":133,"end_character":58},"updated":"2017-12-27 12:42:50.000000000","message":"Just call _filter_port_create(port) instead of duplicating logic","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    \"\"\"Filter out port attributes for an update operation.\"\"\""},{"line_number":125,"context_line":"    odl_utils.try_del(port, [\u0027network_id\u0027, \u0027id\u0027, \u0027status\u0027, \u0027tenant_id\u0027,"},{"line_number":126,"context_line":"                             \u0027project_id\u0027])"},{"line_number":127,"context_line":"    _filter_unmapped_null(port, _PORT_UNMAPPED_KEYS)"},{"line_number":128,"context_line":"    # binding:profile is defined as a dict that can hold several data"},{"line_number":129,"context_line":"    # type values e.g string or list of strings"},{"line_number":130,"context_line":"    # therefore is sent as a json string and parsed in odl"},{"line_number":131,"context_line":"    # for specific attributes by their type"},{"line_number":132,"context_line":"    if port.get(\u0027binding:profile\u0027):"},{"line_number":133,"context_line":"        _convert_value_to_str(port, key\u003d\u0027binding:profile\u0027)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def _filter_router_update(router):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_7a4b7d58","line":133,"range":{"start_line":127,"start_character":4,"end_line":133,"end_character":58},"in_reply_to":"bf8cb3f7_37642e22","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"}],"networking_odl/tests/unit/common/test_filters.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"37d5d412df5264db83b3a793f8be882fa1f96175","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.assertEqual(n_const.PROTO_NAME_IPV6_ICMP_LEGACY,"},{"line_number":86,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_convert_port_binding_profile_to_string(self):"},{"line_number":89,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":90,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_53779bd5","line":88,"updated":"2017-12-25 14:27:10.000000000","message":"Could you break it apart into tests that test as little things as possible? \n\nMake sure to at least have one test for each:\n\n - _convert_value_to_string returns a string from a structure (ie: dict) that can be processed into valid JSON \n - _convert_value_to_string handles a structure that can\u0027t be serialized into JSON to return the expected string\n - _convert_value_to_string logs in case there is no key (use the fake logger fixture for this)\n\n - _filter_port_create is called with a port that has a \u0027binding:profile\u0027 that is a dict and that port ends up with a string\n - _filter_port_create is called with a port that has a \u0027binding:profile\u0027 that is not a valid structure that serializes to JSON and it does not break or is handled accordingly\n - _filter_port_create logs when the key \u0027binding:profile\u0027 does not exist\n\n - _filter_port_update is called with a port that has a \u0027binding:profile\u0027 that is a dict and that port ends up with a string\n - _filter_port_update is called with a port that has a \u0027binding:profile\u0027 that is not a valid structure that serializes to JSON and it does not break or is handled accordingly\n - _filter_port_update logs when the key \u0027binding:profile\u0027 does not exist","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"d81d67ead4d3b7499f53bb705c80f0423ae99b81","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.assertEqual(n_const.PROTO_NAME_IPV6_ICMP_LEGACY,"},{"line_number":86,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_convert_port_binding_profile_to_string(self):"},{"line_number":89,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":90,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_7605dbc1","line":88,"in_reply_to":"bf8cb3f7_043c64bd","updated":"2017-12-27 09:21:35.000000000","message":"1) OK\n2) With the fixture you are actually logging and you don\u0027t bind the test to the implementation.","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c4664e530e3c96c1b8e9a0eda2978ac5c223eb11","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.assertEqual(n_const.PROTO_NAME_IPV6_ICMP_LEGACY,"},{"line_number":86,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_convert_port_binding_profile_to_string(self):"},{"line_number":89,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":90,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_84795494","line":88,"in_reply_to":"bf8cb3f7_043c64bd","updated":"2017-12-26 14:14:51.000000000","message":"and why double validate in port update and create functions?","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"76d91868af8141fafb593f108d5ca75238fc5edd","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.assertEqual(n_const.PROTO_NAME_IPV6_ICMP_LEGACY,"},{"line_number":86,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_convert_port_binding_profile_to_string(self):"},{"line_number":89,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":90,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_043c64bd","line":88,"in_reply_to":"bf8cb3f7_53779bd5","updated":"2017-12-26 14:13:35.000000000","message":"I\u0027ve divided the test into smaller fragments.\n- I don\u0027t think we need to test for an invalid json, this is a python object, i don\u0027t see a valid scenario where this happens.\n- what is the benefit of using fixture instead of mock?\n-","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"d81d67ead4d3b7499f53bb705c80f0423ae99b81","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.assertEqual(n_const.PROTO_NAME_IPV6_ICMP_LEGACY,"},{"line_number":86,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_convert_port_binding_profile_to_string(self):"},{"line_number":89,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":90,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_d6a707a7","line":88,"in_reply_to":"bf8cb3f7_84795494","updated":"2017-12-27 09:21:35.000000000","message":"Because that\u0027s the new behavior for which you want to create contacts (the tests).","commit_id":"86ecfe3ff3b21c58817961a87cdca77ffea098c1"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from copy import deepcopy"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"from neutron.tests import base"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_5649b788","line":16,"updated":"2017-12-27 09:41:10.000000000","message":"better to import copy and then use copy.deepcopy\n\nAs recommended by the PEP8 and the Zen of Python","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from copy import deepcopy"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"from neutron.tests import base"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_3a2f3540","line":16,"in_reply_to":"bf8cb3f7_5649b788","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_convert_value_to_string(self):"},{"line_number":90,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]}}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"},{"line_number":92,"context_line":"        self.assertIs(type(port[\u0027binding:profile\u0027]), str)"},{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_16f56f83","line":90,"range":{"start_line":90,"start_character":14,"end_line":90,"end_character":67},"updated":"2017-12-27 09:41:10.000000000","message":"having this repeat in each test is not maintainable, better create a constant","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                             sgrule[\u0027protocol\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_convert_value_to_string(self):"},{"line_number":90,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]}}"},{"line_number":91,"context_line":"        filters._convert_value_to_str(port, \u0027binding:profile\u0027)"},{"line_number":92,"context_line":"        self.assertIs(type(port[\u0027binding:profile\u0027]), str)"},{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_5a3239a9","line":90,"range":{"start_line":90,"start_character":14,"end_line":90,"end_character":67},"in_reply_to":"bf8cb3f7_16f56f83","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e8851a5b2c96abf8d3c0d55deb03af9d306a68a8","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"},{"line_number":94,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_convert_value_to_string_other_param_unchaged(self):"},{"line_number":97,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_9956b829","line":96,"range":{"start_line":96,"start_character":4,"end_line":96,"end_character":64},"updated":"2018-01-03 09:30:51.000000000","message":"I think the test was worth having, you just didn\u0027t test anything inside before.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"},{"line_number":94,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_convert_value_to_string_other_param_unchaged(self):"},{"line_number":97,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_56a2174d","line":96,"updated":"2017-12-27 09:41:10.000000000","message":"this is not really testing anything","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c83b25d6a3efec0cd3bb08b0dd359b7491a48d29","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"},{"line_number":94,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_convert_value_to_string_other_param_unchaged(self):"},{"line_number":97,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_e206d01c","line":96,"range":{"start_line":96,"start_character":4,"end_line":96,"end_character":64},"in_reply_to":"9f91af0f_9956b829","updated":"2018-01-16 12:48:00.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.assertEqual(port[\u0027binding:profile\u0027],"},{"line_number":94,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_convert_value_to_string_other_param_unchaged(self):"},{"line_number":97,"context_line":"        port \u003d {\"binding:profile\": {\"capabilities\": [\"switchdev\"]},"},{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_fa28ed34","line":96,"in_reply_to":"bf8cb3f7_56a2174d","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_b69283f5","line":101,"range":{"start_line":101,"start_character":37,"end_line":101,"end_character":44},"updated":"2017-12-27 09:41:10.000000000","message":"where is the unicode testing part?","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"690a67b5c04da01ee6d016082e31b52787560dd0","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_7d1cd769","line":101,"range":{"start_line":101,"start_character":37,"end_line":101,"end_character":44},"in_reply_to":"7f96bb07_df0b717a","updated":"2018-01-23 13:52:04.000000000","message":"Ok, what I\u0027m saying is that on the python side you\u0027ll have this behavior. If you are still worried we can leave the test.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ba3287f078f4e69fa3c6116c82cfbd55b18f78e1","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_df0b717a","line":101,"range":{"start_line":101,"start_character":37,"end_line":101,"end_character":44},"in_reply_to":"9f91af0f_eccb84a2","updated":"2018-01-16 12:27:08.000000000","message":"The problem is on opendalyight side. There is a difference if you pass it as string or unicode string.\nThis is to make sure that we pass it as a string.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e8851a5b2c96abf8d3c0d55deb03af9d306a68a8","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_eccb84a2","line":101,"range":{"start_line":101,"start_character":37,"end_line":101,"end_character":44},"in_reply_to":"bf8cb3f7_9aec41f4","updated":"2018-01-03 09:30:51.000000000","message":"mmm not sure the test is needed, if you are using python3 all literal strings are unicode anyways so this test kinda doesn\u0027t make sense except in python2. \n\nIn either case I don\u0027t think this would create a problem.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                \"other_param\": [\"some\", \"values\"]}"},{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_9aec41f4","line":101,"range":{"start_line":101,"start_character":37,"end_line":101,"end_character":44},"in_reply_to":"bf8cb3f7_b69283f5","updated":"2017-12-27 14:09:33.000000000","message":"the purpose is to validate that unicode strings won\u0027t get translated to something like \u0027{u\"capabilities\": [u\"switchdev\"]}\u0027","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_366d1304","line":102,"range":{"start_line":102,"start_character":36,"end_line":102,"end_character":37},"updated":"2017-12-27 09:41:10.000000000","message":"why the unicode tags here and not anywhere else?","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.assertIsNot(type(port[\u0027other_param\u0027]), str)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_convert_value_to_string_unicode(self):"},{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_fab6adfa","line":102,"range":{"start_line":102,"start_character":36,"end_line":102,"end_character":37},"in_reply_to":"bf8cb3f7_366d1304","updated":"2017-12-27 14:09:33.000000000","message":"these are the values that are getting converted","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_96665f29","line":105,"range":{"start_line":105,"start_character":25,"end_line":105,"end_character":58},"updated":"2017-12-27 09:41:10.000000000","message":"it would be better if this part is constructed programatically from the dict above or the dict from this or something. \n\nperhaps reference to: https://stackoverflow.com/questions/988228/convert-a-string-representation-of-a-dictionary-to-a-dictionary","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        port \u003d {\"binding:profile\": {u\"capabilities\": [u\"switchdev\"]}}"},{"line_number":103,"context_line":"        filters._convert_value_to_str(port, \"binding:profile\")"},{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_dacba96f","line":105,"range":{"start_line":105,"start_character":25,"end_line":105,"end_character":58},"in_reply_to":"bf8cb3f7_96665f29","updated":"2017-12-27 14:09:33.000000000","message":"seems a bit excessive to use eval IMO, I\u0027ll put it as a constant","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_b64843cc","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":48},"updated":"2017-12-27 09:41:10.000000000","message":"make the test name more descriptive so it explains what it does, test_convert_value_to_string_missing_key_is_logged for example","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c83b25d6a3efec0cd3bb08b0dd359b7491a48d29","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":105,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_422f848d","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":48},"in_reply_to":"bf8cb3f7_b64843cc","updated":"2018-01-16 12:48:00.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_565f7771","line":111,"range":{"start_line":109,"start_character":7,"end_line":111,"end_character":49},"updated":"2017-12-27 09:41:10.000000000","message":"This is not testing what you intend to test. With this test anyone can put a log outside of the KeyError and it would still pass the test.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c83b25d6a3efec0cd3bb08b0dd359b7491a48d29","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_02a89cd8","line":111,"range":{"start_line":109,"start_character":7,"end_line":111,"end_character":49},"in_reply_to":"9f91af0f_8cff58a9","updated":"2018-01-16 12:48:00.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_9a9a016c","line":111,"range":{"start_line":109,"start_character":7,"end_line":111,"end_character":49},"in_reply_to":"bf8cb3f7_565f7771","updated":"2017-12-27 14:09:33.000000000","message":"this is checking that log-warning is called once, which is the case where an invalid key was passed.\nIt wouldn\u0027t pass because if someone would *add* another log-warning the test would fail by assert_called_once.\nif someone would replace (i.e remove and add another one) the log-warning the test would pass but I suspect it would be caught in a review ;)","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e8851a5b2c96abf8d3c0d55deb03af9d306a68a8","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def test_convert_value_to_string_missing_key(self):"},{"line_number":108,"context_line":"        port \u003d {}"},{"line_number":109,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_8cff58a9","line":111,"range":{"start_line":109,"start_character":7,"end_line":111,"end_character":49},"in_reply_to":"bf8cb3f7_9a9a016c","updated":"2018-01-03 09:30:51.000000000","message":"Right, but bare in mind that sometimes reviewers might not read all tests to see if the behavior is still the intended and then it might pass the review unnoticed... \n\nAnyways it would be better if the test was more deterministic.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":115,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":116,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_762b9bea","line":113,"range":{"start_line":113,"start_character":4,"end_line":113,"end_character":13},"updated":"2017-12-27 09:41:10.000000000","message":"why would you want this to be a member class?","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"c83b25d6a3efec0cd3bb08b0dd359b7491a48d29","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":115,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":116,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_c2add4e9","line":113,"range":{"start_line":113,"start_character":4,"end_line":113,"end_character":13},"in_reply_to":"9f91af0f_ac7d7c1d","updated":"2018-01-16 12:48:00.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e8851a5b2c96abf8d3c0d55deb03af9d306a68a8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":115,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":116,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_ac7d7c1d","line":113,"range":{"start_line":113,"start_character":4,"end_line":113,"end_character":13},"in_reply_to":"bf8cb3f7_3ab975cb","updated":"2018-01-03 09:30:51.000000000","message":"IMHO, module level is better in this case. The reasons are twofold. First, it still is under its namespace. Second, it is not really related to the class nor the object, as it is not something that would define an object from another nor something that needs to be shared across all objects of this class.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            filters._convert_value_to_str(port, \u0027invalid_key\u0027)"},{"line_number":111,"context_line":"            mock_log.warning.assert_called_once()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":114,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":115,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":116,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_3ab975cb","line":113,"range":{"start_line":113,"start_character":4,"end_line":113,"end_character":13},"in_reply_to":"bf8cb3f7_762b9bea","updated":"2017-12-27 14:09:33.000000000","message":"either that or global, I guess I prefer scoping down.","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        port \u003d deepcopy(self.FAKE_PORT)"},{"line_number":133,"context_line":"        func(port)"},{"line_number":134,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":135,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_filter_port_create_binding_profile_string(self):"},{"line_number":138,"context_line":"        self._filter_port_func_binding_profile_to_string("}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_96341ffd","line":135,"range":{"start_line":135,"start_character":25,"end_line":135,"end_character":58},"updated":"2017-12-27 09:41:10.000000000","message":"same comment as L105","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        port \u003d deepcopy(self.FAKE_PORT)"},{"line_number":133,"context_line":"        func(port)"},{"line_number":134,"context_line":"        self.assertEqual(port[\"binding:profile\"],"},{"line_number":135,"context_line":"                         \u0027{\"capabilities\": [\"switchdev\"]}\u0027)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_filter_port_create_binding_profile_string(self):"},{"line_number":138,"context_line":"        self._filter_port_func_binding_profile_to_string("}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_da79692f","line":135,"range":{"start_line":135,"start_character":25,"end_line":135,"end_character":58},"in_reply_to":"bf8cb3f7_96341ffd","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._filter_port_func_binding_profile_to_string("},{"line_number":143,"context_line":"            filters._filter_port_update)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _filter_port_func_binding_profile_missing(self, func):"},{"line_number":146,"context_line":"        port \u003d deepcopy(self.FAKE_PORT)"},{"line_number":147,"context_line":"        del port[\u0027binding:profile\u0027]"},{"line_number":148,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_1a391140","line":145,"range":{"start_line":145,"start_character":7,"end_line":145,"end_character":47},"updated":"2017-12-27 14:09:33.000000000","message":"these cases are covered by test_convert_value_to_string_missing_key","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"10b77d318198d606cd2c82282b0b8cefbe7ac7a7","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def _filter_port_func_binding_profile_missing(self, func):"},{"line_number":146,"context_line":"        port \u003d deepcopy(self.FAKE_PORT)"},{"line_number":147,"context_line":"        del port[\u0027binding:profile\u0027]"},{"line_number":148,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":149,"context_line":"            func(port)"},{"line_number":150,"context_line":"            self.assertFalse(mock_log.warning.called)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_filter_port_create_binding_profile_missing(self):"},{"line_number":153,"context_line":"        self._filter_port_func_binding_profile_missing("}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_16200fb0","line":150,"range":{"start_line":148,"start_character":8,"end_line":150,"end_character":53},"updated":"2017-12-27 09:41:10.000000000","message":"same comment as L109","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"802f15c819eafdd4da00cbabab5f7c3e7f22df0f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def _filter_port_func_binding_profile_missing(self, func):"},{"line_number":146,"context_line":"        port \u003d deepcopy(self.FAKE_PORT)"},{"line_number":147,"context_line":"        del port[\u0027binding:profile\u0027]"},{"line_number":148,"context_line":"        with mock.patch.object(filters, \u0027LOG\u0027) as mock_log:"},{"line_number":149,"context_line":"            func(port)"},{"line_number":150,"context_line":"            self.assertFalse(mock_log.warning.called)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def test_filter_port_create_binding_profile_missing(self):"},{"line_number":153,"context_line":"        self._filter_port_func_binding_profile_missing("}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_7a785d29","line":150,"range":{"start_line":148,"start_character":8,"end_line":150,"end_character":53},"in_reply_to":"bf8cb3f7_16200fb0","updated":"2017-12-27 14:09:33.000000000","message":"Done","commit_id":"90acf97cc497c139ee7c4843c697b66f9acdc564"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e8851a5b2c96abf8d3c0d55deb03af9d306a68a8","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestFilters(base.DietTestCase):"},{"line_number":26,"context_line":"    PROFILE \u003d {\"capabilities\": [\"switchdev\"]}"},{"line_number":27,"context_line":"    PROFILE_STR \u003d \u0027{\"capabilities\": [\"switchdev\"]}\u0027"},{"line_number":28,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":29,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":30,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":31,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"},{"line_number":32,"context_line":"                 \u0027binding:profile\u0027: {\"capabilities\": [\"switchdev\"]},"},{"line_number":33,"context_line":"                 \u0027fixed_ips\u0027: [],"},{"line_number":34,"context_line":"                 \u0027id\u0027: \u002772c56c48-e9b8-4dcf-b3a7-0813bb3bd839\u0027,"},{"line_number":35,"context_line":"                 \u0027security_groups\u0027: [],"},{"line_number":36,"context_line":"                 \u0027device_id\u0027: \u0027fake_device\u0027,"},{"line_number":37,"context_line":"                 \u0027name\u0027: \u0027\u0027,"},{"line_number":38,"context_line":"                 \u0027admin_state_up\u0027: True,"},{"line_number":39,"context_line":"                 \u0027network_id\u0027: \u0027c13bba05-eb07-45ba-ace2-765706b2d701\u0027,"},{"line_number":40,"context_line":"                 \u0027tenant_id\u0027: \u0027bad_tenant_id\u0027,"},{"line_number":41,"context_line":"                 \u0027binding:vif_details\u0027: {},"},{"line_number":42,"context_line":"                 \u0027binding:vnic_type\u0027: \u0027normal\u0027,"},{"line_number":43,"context_line":"                 \u0027binding:vif_type\u0027: \u0027unbound\u0027,"},{"line_number":44,"context_line":"                 \u0027mac_address\u0027: \u002712:34:56:78:21:b6\u0027}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _check_id(self, resource, project_id):"},{"line_number":47,"context_line":"        filters._populate_project_id_and_tenant_id(resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_19bdc864","line":44,"range":{"start_line":26,"start_character":3,"end_line":44,"end_character":52},"updated":"2018-01-03 09:30:51.000000000","message":"They don\u0027t need to be class members, you can make them module constants","commit_id":"686191a198a48e7c55fb7f693ea1bfc78b668d22"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"303a8843c1e09a497f264f753bcde36848e14cca","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestFilters(base.DietTestCase):"},{"line_number":26,"context_line":"    PROFILE \u003d {\"capabilities\": [\"switchdev\"]}"},{"line_number":27,"context_line":"    PROFILE_STR \u003d \u0027{\"capabilities\": [\"switchdev\"]}\u0027"},{"line_number":28,"context_line":"    FAKE_PORT \u003d {\u0027status\u0027: \u0027DOWN\u0027,"},{"line_number":29,"context_line":"                 \u0027binding:host_id\u0027: \u0027\u0027,"},{"line_number":30,"context_line":"                 \u0027allowed_address_pairs\u0027: [],"},{"line_number":31,"context_line":"                 \u0027device_owner\u0027: \u0027fake_owner\u0027,"},{"line_number":32,"context_line":"                 \u0027binding:profile\u0027: {\"capabilities\": [\"switchdev\"]},"},{"line_number":33,"context_line":"                 \u0027fixed_ips\u0027: [],"},{"line_number":34,"context_line":"                 \u0027id\u0027: \u002772c56c48-e9b8-4dcf-b3a7-0813bb3bd839\u0027,"},{"line_number":35,"context_line":"                 \u0027security_groups\u0027: [],"},{"line_number":36,"context_line":"                 \u0027device_id\u0027: \u0027fake_device\u0027,"},{"line_number":37,"context_line":"                 \u0027name\u0027: \u0027\u0027,"},{"line_number":38,"context_line":"                 \u0027admin_state_up\u0027: True,"},{"line_number":39,"context_line":"                 \u0027network_id\u0027: \u0027c13bba05-eb07-45ba-ace2-765706b2d701\u0027,"},{"line_number":40,"context_line":"                 \u0027tenant_id\u0027: \u0027bad_tenant_id\u0027,"},{"line_number":41,"context_line":"                 \u0027binding:vif_details\u0027: {},"},{"line_number":42,"context_line":"                 \u0027binding:vnic_type\u0027: \u0027normal\u0027,"},{"line_number":43,"context_line":"                 \u0027binding:vif_type\u0027: \u0027unbound\u0027,"},{"line_number":44,"context_line":"                 \u0027mac_address\u0027: \u002712:34:56:78:21:b6\u0027}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _check_id(self, resource, project_id):"},{"line_number":47,"context_line":"        filters._populate_project_id_and_tenant_id(resource)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_5dfd26af","line":44,"range":{"start_line":26,"start_character":3,"end_line":44,"end_character":52},"in_reply_to":"9f91af0f_19bdc864","updated":"2018-01-08 07:47:27.000000000","message":"Done","commit_id":"686191a198a48e7c55fb7f693ea1bfc78b668d22"}]}
