)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ab0c7f12f0a0119eeb08129e0ed7eac0a8e941bc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mamduh \u003cmamduhala@nvidia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-08-18 12:40:10 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Update linux_net - Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new function \u0027_get_phys_port_name\u0027 for reading"},{"line_number":10,"context_line":"physical port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_9dec6c90","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":85},"updated":"2020-08-18 12:52:01.000000000","message":"you still need to wrap this.\n\ni asumen the perfromance boost you are refering too is pulling  ifname_pf_func \u003d _get_pf_func(pf_ifname) out of the loop.","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"aa70460591585ce67854295cc9aa7afb5f683a06","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mamduh \u003cmamduhala@nvidia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-08-18 12:40:10 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Update linux_net - Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new function \u0027_get_phys_port_name\u0027 for reading"},{"line_number":10,"context_line":"physical port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_4422f3a5","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":85},"in_reply_to":"9f560f44_9dec6c90","updated":"2020-08-19 06:09:00.000000000","message":"Done","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ab0c7f12f0a0119eeb08129e0ed7eac0a8e941bc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Update linux_net - Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new function \u0027_get_phys_port_name\u0027 for reading"},{"line_number":10,"context_line":"physical port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027"},{"line_number":11,"context_line":"to use the new function and decrease calls for \"_get_pf_func\"."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In addition to updating the unit test for linux_net and remove not"},{"line_number":14,"context_line":"needed mocks"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3fdbea4f48cb79ebfd03a4da21e2232ccafb7a76"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_9d162c55","line":14,"range":{"start_line":9,"start_character":0,"end_line":14,"end_character":12},"updated":"2020-08-18 12:52:01.000000000","message":"you also need to wrap this at 72 columns","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"aa70460591585ce67854295cc9aa7afb5f683a06","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Update linux_net - Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new function \u0027_get_phys_port_name\u0027 for reading"},{"line_number":10,"context_line":"physical port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027"},{"line_number":11,"context_line":"to use the new function and decrease calls for \"_get_pf_func\"."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In addition to updating the unit test for linux_net and remove not"},{"line_number":14,"context_line":"needed mocks"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3fdbea4f48cb79ebfd03a4da21e2232ccafb7a76"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_24253fac","line":14,"range":{"start_line":9,"start_character":0,"end_line":14,"end_character":12},"in_reply_to":"9f560f44_9d162c55","updated":"2020-08-19 06:09:00.000000000","message":"Done","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ab0c7f12f0a0119eeb08129e0ed7eac0a8e941bc","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In addition to updating the unit test for linux_net and remove not"},{"line_number":14,"context_line":"needed mocks"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3fdbea4f48cb79ebfd03a4da21e2232ccafb7a76"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_1df85c47","line":15,"updated":"2020-08-18 12:52:01.000000000","message":"you should also rebase your two ptaches into one chain since they conflict so please also add \nReleated-Bug: #\u003cthe bug number for your other change.\u003e\nso that we can track these as related if we backport them.","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"659da59e3c6c811489256407afe12bf0c5b70e31","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In addition to updating the unit test for linux_net and remove not"},{"line_number":14,"context_line":"needed mocks"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3fdbea4f48cb79ebfd03a4da21e2232ccafb7a76"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_84408b37","line":15,"in_reply_to":"9f560f44_1df85c47","updated":"2020-08-19 06:09:36.000000000","message":"Done","commit_id":"f4b4dfa5148668164d06b9b9a0a7a480f04e92e3"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds new function \u0027_get_phys_port_name\u0027 for reading physical"},{"line_number":10,"context_line":"port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027 to"},{"line_number":11,"context_line":"use the new function and decrease calls for \"_get_pf_func\"."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9f560f44_0eedc4b6","line":9,"updated":"2020-09-03 07:04:06.000000000","message":"and pulls out `_get_phys_switch_id` logic into its own function to allow code reuse","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor code of linux_net to more cleaner and increase performace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds new function \u0027_get_phys_port_name\u0027 for reading physical"},{"line_number":10,"context_line":"port name of the SR-IOV port, and refactors \u0027get_representor_port\u0027 to"},{"line_number":11,"context_line":"use the new function and decrease calls for \"_get_pf_func\"."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9f560f44_642f41a7","line":9,"in_reply_to":"9f560f44_0eedc4b6","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"}],"vif_plug_ovs/linux_net.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    VF number in the phys_port_name. That interface is the representor for"},{"line_number":240,"context_line":"    the requested VF."},{"line_number":241,"context_line":"    \"\"\""},{"line_number":242,"context_line":"    pf_path \u003d \"/sys/class/net/%s\" % pf_ifname"},{"line_number":243,"context_line":"    pf_sw_id_file \u003d os.path.join(pf_path, \"phys_switch_id\")"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    pf_sw_id \u003d None"},{"line_number":246,"context_line":"    try:"},{"line_number":247,"context_line":"        with open(pf_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":248,"context_line":"            pf_sw_id \u003d fd.readline().rstrip()"},{"line_number":249,"context_line":"    except (OSError, IOError):"},{"line_number":250,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    pf_subsystem_file \u003d os.path.join(pf_path, \"subsystem\")"},{"line_number":253,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_89125c57","line":250,"range":{"start_line":242,"start_character":4,"end_line":250,"end_character":76},"updated":"2020-08-19 14:27:44.000000000","message":"following my comment below,\nif we had _get_phys_switch_id(device) we could use it here as well.","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    VF number in the phys_port_name. That interface is the representor for"},{"line_number":240,"context_line":"    the requested VF."},{"line_number":241,"context_line":"    \"\"\""},{"line_number":242,"context_line":"    pf_path \u003d \"/sys/class/net/%s\" % pf_ifname"},{"line_number":243,"context_line":"    pf_sw_id_file \u003d os.path.join(pf_path, \"phys_switch_id\")"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    pf_sw_id \u003d None"},{"line_number":246,"context_line":"    try:"},{"line_number":247,"context_line":"        with open(pf_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":248,"context_line":"            pf_sw_id \u003d fd.readline().rstrip()"},{"line_number":249,"context_line":"    except (OSError, IOError):"},{"line_number":250,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    pf_subsystem_file \u003d os.path.join(pf_path, \"subsystem\")"},{"line_number":253,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_56866ebc","line":250,"range":{"start_line":242,"start_character":4,"end_line":250,"end_character":76},"in_reply_to":"9f560f44_89125c57","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    for device in devices:"},{"line_number":263,"context_line":"        device_sw_id_file \u003d \"/sys/class/net/%s/phys_switch_id\" % device"},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            with open(device_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":266,"context_line":"                device_sw_id \u003d fd.readline().rstrip()"},{"line_number":267,"context_line":"        except (OSError, IOError):"},{"line_number":268,"context_line":"            continue"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_ee65de1e","line":266,"range":{"start_line":263,"start_character":8,"end_line":266,"end_character":53},"updated":"2020-08-19 14:27:44.000000000","message":"I was wondering, \nsimilarly to _get_phys_port_name(device), can we have _get_phys_switch_id(device) for consistency ?\nit would make this method a tiny bit clearer","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    for device in devices:"},{"line_number":263,"context_line":"        device_sw_id_file \u003d \"/sys/class/net/%s/phys_switch_id\" % device"},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            with open(device_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":266,"context_line":"                device_sw_id \u003d fd.readline().rstrip()"},{"line_number":267,"context_line":"        except (OSError, IOError):"},{"line_number":268,"context_line":"            continue"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_3683faab","line":266,"range":{"start_line":263,"start_character":8,"end_line":266,"end_character":53},"in_reply_to":"9f560f44_ee65de1e","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"18532fd46e3fe47a52704deeb194ac0f3c8bebef","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    for device in devices:"},{"line_number":263,"context_line":"        device_sw_id_file \u003d \"/sys/class/net/%s/phys_switch_id\" % device"},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            with open(device_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":266,"context_line":"                device_sw_id \u003d fd.readline().rstrip()"},{"line_number":267,"context_line":"        except (OSError, IOError):"},{"line_number":268,"context_line":"            continue"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_fd51b20f","line":266,"range":{"start_line":263,"start_character":8,"end_line":266,"end_character":53},"in_reply_to":"9f560f44_ee65de1e","updated":"2020-08-25 16:21:52.000000000","message":"i suppose that will make it slightly more testable so im not against that. its not strictly required but you have identifed a posible reuse so i think it makes sense to pull it out.","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    for device in devices:"},{"line_number":263,"context_line":"        device_sw_id_file \u003d \"/sys/class/net/%s/phys_switch_id\" % device"},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            with open(device_sw_id_file, \u0027r\u0027) as fd:"},{"line_number":266,"context_line":"                device_sw_id \u003d fd.readline().rstrip()"},{"line_number":267,"context_line":"        except (OSError, IOError):"},{"line_number":268,"context_line":"            continue"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_b6c0aae2","line":266,"range":{"start_line":263,"start_character":8,"end_line":266,"end_character":53},"in_reply_to":"9f560f44_fd51b20f","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"78395223723772e21c64dadbcad15b1381bea447","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if device_sw_id \u003d\u003d \"\" or device_sw_id is None \\"},{"line_number":263,"context_line":"                    or device_sw_id !\u003d pf_sw_id:"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"},{"line_number":266,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_4e11a5ac","line":263,"range":{"start_line":262,"start_character":15,"end_line":263,"end_character":47},"updated":"2020-09-01 07:24:58.000000000","message":"nit: maybe better in parentheses","commit_id":"27d9e6228e2d27c436f6a61d2cfaf6ada02322b8"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"1cd3952cf6b2613c005ed915afb95104c4a585ca","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if device_sw_id \u003d\u003d \"\" or device_sw_id is None \\"},{"line_number":263,"context_line":"                    or device_sw_id !\u003d pf_sw_id:"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"},{"line_number":266,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_4ebb6571","line":263,"range":{"start_line":262,"start_character":15,"end_line":263,"end_character":47},"in_reply_to":"9f560f44_4e11a5ac","updated":"2020-09-01 07:39:40.000000000","message":"Done","commit_id":"27d9e6228e2d27c436f6a61d2cfaf6ada02322b8"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    for device in devices:"},{"line_number":259,"context_line":"        address_str, pf \u003d get_function_by_ifname(device)"},{"line_number":260,"context_line":"        if pf:"},{"line_number":261,"context_line":"            continue"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        device_path \u003d \"/sys/class/net/%s\" % device"},{"line_number":264,"context_line":"        device_sw_id_file \u003d os.path.join(device_path, \"phys_switch_id\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_fc6bf8ed","side":"PARENT","line":261,"range":{"start_line":259,"start_character":7,"end_line":261,"end_character":20},"updated":"2020-09-03 07:04:06.000000000","message":"you should call this out in the commit message.\n\nthis means that that netdevs associated with the PF will now be processed in the loop, however i believe its fine as the way we match on phys_sw_id and phys_port_name would still ensure correct behaviour.\n\nit simplifies the code and unit tests.\nand reduces io calls overall.","commit_id":"041ce67619074ee79226161aab8169f990e4c175"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        raise exception.RepresentorNotFound(ifname\u003dpf_ifname, vf_num\u003dvf_num)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    for device in devices:"},{"line_number":259,"context_line":"        address_str, pf \u003d get_function_by_ifname(device)"},{"line_number":260,"context_line":"        if pf:"},{"line_number":261,"context_line":"            continue"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        device_path \u003d \"/sys/class/net/%s\" % device"},{"line_number":264,"context_line":"        device_sw_id_file \u003d os.path.join(device_path, \"phys_switch_id\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_e90b2a28","side":"PARENT","line":261,"range":{"start_line":259,"start_character":7,"end_line":261,"end_character":20},"in_reply_to":"9f560f44_fc6bf8ed","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"041ce67619074ee79226161aab8169f990e4c175"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if (device_sw_id \u003d\u003d \"\" or device_sw_id is None or"},{"line_number":263,"context_line":"                    device_sw_id !\u003d pf_sw_id):"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_8132590e","line":262,"range":{"start_line":262,"start_character":16,"end_line":262,"end_character":37},"updated":"2020-09-03 07:04:06.000000000","message":"this condition was\u0027t before, i dont think its needed.\n\ndevice_sw_id !\u003d pf_sw_id covers it as in switchdev mode pf_sw_id is ensured to have a value.","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if (device_sw_id \u003d\u003d \"\" or device_sw_id is None or"},{"line_number":263,"context_line":"                    device_sw_id !\u003d pf_sw_id):"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_a912d260","line":262,"range":{"start_line":262,"start_character":16,"end_line":262,"end_character":37},"in_reply_to":"9f560f44_8132590e","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc787b37193e7ecd3d35bf6c69a728a2a59619ca","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if (device_sw_id \u003d\u003d \"\" or device_sw_id is None or"},{"line_number":263,"context_line":"                    device_sw_id !\u003d pf_sw_id):"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"},{"line_number":266,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_6bcd57b6","line":263,"range":{"start_line":262,"start_character":14,"end_line":263,"end_character":46},"updated":"2020-09-02 20:19:31.000000000","message":"nit you could make this simplere by doing\n\nif not device_sw_id and device_sw_id !\u003d pf_sw_id:\n\nthat woudl also avoid the need for wrapping and the perns","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    for device in devices:"},{"line_number":260,"context_line":"        try:"},{"line_number":261,"context_line":"            device_sw_id \u003d _get_phys_switch_id(device)"},{"line_number":262,"context_line":"            if (device_sw_id \u003d\u003d \"\" or device_sw_id is None or"},{"line_number":263,"context_line":"                    device_sw_id !\u003d pf_sw_id):"},{"line_number":264,"context_line":"                continue"},{"line_number":265,"context_line":"        except (OSError, IOError):"},{"line_number":266,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_89154e4c","line":263,"range":{"start_line":262,"start_character":14,"end_line":263,"end_character":46},"in_reply_to":"9f560f44_6bcd57b6","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1ac476490c395ccdeb92357910b636e6042b8c83","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"def _get_phys_port_name(ifname):"},{"line_number":379,"context_line":"    \"\"\"Get the interface name and return its phys_port_name"},{"line_number":380,"context_line":"    Get"},{"line_number":381,"context_line":"    :param ifname: The Interface name"},{"line_number":382,"context_line":"    :return: The phys_port_name of the given ifname"},{"line_number":383,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_10915647","line":380,"updated":"2020-09-03 15:00:28.000000000","message":"remove the Get","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"5d6cde37d69f7eea710114b00c747788dd59bd31","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"def _get_phys_port_name(ifname):"},{"line_number":379,"context_line":"    \"\"\"Get the interface name and return its phys_port_name"},{"line_number":380,"context_line":"    Get"},{"line_number":381,"context_line":"    :param ifname: The Interface name"},{"line_number":382,"context_line":"    :return: The phys_port_name of the given ifname"},{"line_number":383,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_ddb9b2cb","line":380,"in_reply_to":"9f560f44_10915647","updated":"2020-09-03 18:22:39.000000000","message":"Done","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1ac476490c395ccdeb92357910b636e6042b8c83","unresolved":false,"context_lines":[{"line_number":378,"context_line":"def _get_phys_port_name(ifname):"},{"line_number":379,"context_line":"    \"\"\"Get the interface name and return its phys_port_name"},{"line_number":380,"context_line":"    Get"},{"line_number":381,"context_line":"    :param ifname: The Interface name"},{"line_number":382,"context_line":"    :return: The phys_port_name of the given ifname"},{"line_number":383,"context_line":"    \"\"\""},{"line_number":384,"context_line":"    phys_port_name_path \u003d \"/sys/class/net/%s/phys_port_name\" % ifname"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_509bce64","line":381,"range":{"start_line":381,"start_character":22,"end_line":381,"end_character":32},"updated":"2020-09-03 15:00:28.000000000","message":"interface","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"5d6cde37d69f7eea710114b00c747788dd59bd31","unresolved":false,"context_lines":[{"line_number":378,"context_line":"def _get_phys_port_name(ifname):"},{"line_number":379,"context_line":"    \"\"\"Get the interface name and return its phys_port_name"},{"line_number":380,"context_line":"    Get"},{"line_number":381,"context_line":"    :param ifname: The Interface name"},{"line_number":382,"context_line":"    :return: The phys_port_name of the given ifname"},{"line_number":383,"context_line":"    \"\"\""},{"line_number":384,"context_line":"    phys_port_name_path \u003d \"/sys/class/net/%s/phys_port_name\" % ifname"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_3db1cee2","line":381,"range":{"start_line":381,"start_character":22,"end_line":381,"end_character":32},"in_reply_to":"9f560f44_509bce64","updated":"2020-09-03 18:22:39.000000000","message":"Done","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1ac476490c395ccdeb92357910b636e6042b8c83","unresolved":false,"context_lines":[{"line_number":392,"context_line":""},{"line_number":393,"context_line":"def _get_phys_switch_id(ifname):"},{"line_number":394,"context_line":"    \"\"\"Get the interface name and return its phys_switch_id"},{"line_number":395,"context_line":"    Get"},{"line_number":396,"context_line":"    :param ifname: The Interface name"},{"line_number":397,"context_line":"    :return: The phys_switch_id of the given ifname"},{"line_number":398,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_909c465c","line":395,"updated":"2020-09-03 15:00:28.000000000","message":"remove Get","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"5d6cde37d69f7eea710114b00c747788dd59bd31","unresolved":false,"context_lines":[{"line_number":392,"context_line":""},{"line_number":393,"context_line":"def _get_phys_switch_id(ifname):"},{"line_number":394,"context_line":"    \"\"\"Get the interface name and return its phys_switch_id"},{"line_number":395,"context_line":"    Get"},{"line_number":396,"context_line":"    :param ifname: The Interface name"},{"line_number":397,"context_line":"    :return: The phys_switch_id of the given ifname"},{"line_number":398,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_1db4cad0","line":395,"in_reply_to":"9f560f44_909c465c","updated":"2020-09-03 18:22:39.000000000","message":"Done","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"1ac476490c395ccdeb92357910b636e6042b8c83","unresolved":false,"context_lines":[{"line_number":393,"context_line":"def _get_phys_switch_id(ifname):"},{"line_number":394,"context_line":"    \"\"\"Get the interface name and return its phys_switch_id"},{"line_number":395,"context_line":"    Get"},{"line_number":396,"context_line":"    :param ifname: The Interface name"},{"line_number":397,"context_line":"    :return: The phys_switch_id of the given ifname"},{"line_number":398,"context_line":"    \"\"\""},{"line_number":399,"context_line":"    phys_port_name_path \u003d \"/sys/class/net/%s/phys_switch_id\" % ifname"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_d0a6beab","line":396,"range":{"start_line":396,"start_character":23,"end_line":396,"end_character":32},"updated":"2020-09-03 15:00:28.000000000","message":"interface","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"5d6cde37d69f7eea710114b00c747788dd59bd31","unresolved":false,"context_lines":[{"line_number":393,"context_line":"def _get_phys_switch_id(ifname):"},{"line_number":394,"context_line":"    \"\"\"Get the interface name and return its phys_switch_id"},{"line_number":395,"context_line":"    Get"},{"line_number":396,"context_line":"    :param ifname: The Interface name"},{"line_number":397,"context_line":"    :return: The phys_switch_id of the given ifname"},{"line_number":398,"context_line":"    \"\"\""},{"line_number":399,"context_line":"    phys_port_name_path \u003d \"/sys/class/net/%s/phys_switch_id\" % ifname"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_7dca264f","line":396,"range":{"start_line":396,"start_character":23,"end_line":396,"end_character":32},"in_reply_to":"9f560f44_d0a6beab","updated":"2020-09-03 18:22:39.000000000","message":"Done","commit_id":"f52f8232922c9607c30ff596c441dbfb429e4ee5"}],"vif_plug_ovs/tests/unit/test_linux_net.py":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":249,"context_line":"             (\"0000:0a:02.2\", False), (\"0000:0a:04.1\", False),"},{"line_number":250,"context_line":"             (\"0000:0a:04.2\", False)])"},{"line_number":251,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":252,"context_line":"            [\"p1\", \"p2\", \"pf1vf1\", \"pf1vf2\", \"pf2vf1\", \"pf2vf2\"])"},{"line_number":253,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname2\u0027, \u00272\u0027)"},{"line_number":254,"context_line":"        self.assertEqual(\u0027rep_pf2_vf_2\u0027, ifname)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6df8b3c3","line":252,"updated":"2020-08-19 14:27:44.000000000","message":"lets use the original values for rep names e.g VF1@PF1, vs2@pf1, pf2vf1, pf2vf2","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"             (\"0000:0a:02.2\", False), (\"0000:0a:04.1\", False),"},{"line_number":250,"context_line":"             (\"0000:0a:04.2\", False)])"},{"line_number":251,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":252,"context_line":"            [\"p1\", \"p2\", \"pf1vf1\", \"pf1vf2\", \"pf2vf1\", \"pf2vf2\"])"},{"line_number":253,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname2\u0027, \u00272\u0027)"},{"line_number":254,"context_line":"        self.assertEqual(\u0027rep_pf2_vf_2\u0027, ifname)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_365ada4f","line":252,"in_reply_to":"9f560f44_6df8b3c3","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"18532fd46e3fe47a52704deeb194ac0f3c8bebef","unresolved":false,"context_lines":[{"line_number":249,"context_line":"             (\"0000:0a:02.2\", False), (\"0000:0a:04.1\", False),"},{"line_number":250,"context_line":"             (\"0000:0a:04.2\", False)])"},{"line_number":251,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":252,"context_line":"            [\"p1\", \"p2\", \"pf1vf1\", \"pf1vf2\", \"pf2vf1\", \"pf2vf2\"])"},{"line_number":253,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname2\u0027, \u00272\u0027)"},{"line_number":254,"context_line":"        self.assertEqual(\u0027rep_pf2_vf_2\u0027, ifname)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_7d3802d2","line":252,"in_reply_to":"9f560f44_6df8b3c3","updated":"2020-08-25 16:21:52.000000000","message":"yep we cant assume the formmat used by any single vendor since this is generic shared code","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"             (\"0000:0a:02.2\", False), (\"0000:0a:04.1\", False),"},{"line_number":250,"context_line":"             (\"0000:0a:04.2\", False)])"},{"line_number":251,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":252,"context_line":"            [\"p1\", \"p2\", \"pf1vf1\", \"pf1vf2\", \"pf2vf1\", \"pf2vf2\"])"},{"line_number":253,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname2\u0027, \u00272\u0027)"},{"line_number":254,"context_line":"        self.assertEqual(\u0027rep_pf2_vf_2\u0027, ifname)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_96576627","line":252,"in_reply_to":"9f560f44_7d3802d2","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":276,"context_line":"             (\"0000:0a:02.1\", False),"},{"line_number":277,"context_line":"             (\"0000:0a:02.2\", False)])"},{"line_number":278,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":279,"context_line":"            [\"p0\", \"pf0vf1\", \"pf0vf2\"])"},{"line_number":280,"context_line":"        self.assertRaises("},{"line_number":281,"context_line":"            exception.RepresentorNotFound,"},{"line_number":282,"context_line":"            linux_net.get_representor_port,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_cdbe1fd3","line":279,"updated":"2020-08-19 14:27:44.000000000","message":"lets keep the original vf rep names (1,2)\n\nunfortunately there were multiple formats for vf rep names, so these tests try to cover all formats in one way or another","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"             (\"0000:0a:02.1\", False),"},{"line_number":277,"context_line":"             (\"0000:0a:02.2\", False)])"},{"line_number":278,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":279,"context_line":"            [\"p0\", \"pf0vf1\", \"pf0vf2\"])"},{"line_number":280,"context_line":"        self.assertRaises("},{"line_number":281,"context_line":"            exception.RepresentorNotFound,"},{"line_number":282,"context_line":"            linux_net.get_representor_port,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_f63d02de","line":279,"in_reply_to":"9f560f44_bd157a3f","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"             (\"0000:0a:02.1\", False),"},{"line_number":277,"context_line":"             (\"0000:0a:02.2\", False)])"},{"line_number":278,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":279,"context_line":"            [\"p0\", \"pf0vf1\", \"pf0vf2\"])"},{"line_number":280,"context_line":"        self.assertRaises("},{"line_number":281,"context_line":"            exception.RepresentorNotFound,"},{"line_number":282,"context_line":"            linux_net.get_representor_port,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_d62efea9","line":279,"in_reply_to":"9f560f44_cdbe1fd3","updated":"2020-08-31 08:56:13.000000000","message":"Done","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"18532fd46e3fe47a52704deeb194ac0f3c8bebef","unresolved":false,"context_lines":[{"line_number":276,"context_line":"             (\"0000:0a:02.1\", False),"},{"line_number":277,"context_line":"             (\"0000:0a:02.2\", False)])"},{"line_number":278,"context_line":"        mock__get_phys_port_name.side_effect \u003d ("},{"line_number":279,"context_line":"            [\"p0\", \"pf0vf1\", \"pf0vf2\"])"},{"line_number":280,"context_line":"        self.assertRaises("},{"line_number":281,"context_line":"            exception.RepresentorNotFound,"},{"line_number":282,"context_line":"            linux_net.get_representor_port,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_bd157a3f","line":279,"in_reply_to":"9f560f44_cdbe1fd3","updated":"2020-08-25 16:21:52.000000000","message":"yes this code is shared between mellonox and netornome and eventually Intel. the intel nics i thnk are still not in the market since some of there vdpa plans were rejected in the kernel but we have to support all of the differnt formats to be vendor neutral regardless.","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    def test__get_phys_port_name(self, mock_isfile, mock_open):"},{"line_number":415,"context_line":"        mock_open.return_value.__enter__ \u003d lambda s: s"},{"line_number":416,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":417,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf0vf0\u0027])"},{"line_number":418,"context_line":"        mock_isfile.side_effect \u003d [True]"},{"line_number":419,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"vf_ifname\")"},{"line_number":420,"context_line":"        self.assertEqual(phys_port_name, \u0027pf0vf0\u0027)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_49d164cd","line":418,"range":{"start_line":417,"start_character":0,"end_line":418,"end_character":40},"updated":"2020-08-19 14:27:44.000000000","message":"any reason not to use `return_value` attribute ?","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    def test__get_phys_port_name(self, mock_isfile, mock_open):"},{"line_number":415,"context_line":"        mock_open.return_value.__enter__ \u003d lambda s: s"},{"line_number":416,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":417,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf0vf0\u0027])"},{"line_number":418,"context_line":"        mock_isfile.side_effect \u003d [True]"},{"line_number":419,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"vf_ifname\")"},{"line_number":420,"context_line":"        self.assertEqual(phys_port_name, \u0027pf0vf0\u0027)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_36081a2c","line":418,"range":{"start_line":417,"start_character":0,"end_line":418,"end_character":40},"in_reply_to":"9f560f44_49d164cd","updated":"2020-08-31 08:56:13.000000000","message":"changed to return_value","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"c6d8d507da8eae2d44d30f9294bf740fba167a88","unresolved":false,"context_lines":[{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"},{"line_number":423,"context_line":"    def test__get_phys_port_name_not_found(self, mock_isfile):"},{"line_number":424,"context_line":"        mock_isfile.side_effect \u003d [False]"},{"line_number":425,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"vf_ifname\")"},{"line_number":426,"context_line":"        self.assertIsNone(phys_port_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_29d4f0bc","line":424,"range":{"start_line":424,"start_character":8,"end_line":424,"end_character":41},"updated":"2020-08-19 14:27:44.000000000","message":"same comment as above","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"0ce318f384635a6fb1c78b092ca52fd227e7e6b5","unresolved":false,"context_lines":[{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"},{"line_number":423,"context_line":"    def test__get_phys_port_name_not_found(self, mock_isfile):"},{"line_number":424,"context_line":"        mock_isfile.side_effect \u003d [False]"},{"line_number":425,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"vf_ifname\")"},{"line_number":426,"context_line":"        self.assertIsNone(phys_port_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_9605a617","line":424,"range":{"start_line":424,"start_character":8,"end_line":424,"end_character":41},"in_reply_to":"9f560f44_29d4f0bc","updated":"2020-08-31 08:56:13.000000000","message":"changed to return_value","commit_id":"aa08372c7407e97e44775b831be40df93dce6019"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dc787b37193e7ecd3d35bf6c69a728a2a59619ca","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @mock.patch(\u0027builtins.open\u0027)"},{"line_number":67,"context_line":"    @mock.patch(\"os.path.exists\")"},{"line_number":68,"context_line":"    def test__disable_ipv6(self, mock_exists, mock_open):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        exists_path \u003d \"/proc/sys/net/ipv6/conf/br0/disable_ipv6\""},{"line_number":71,"context_line":"        mock_exists.return_value \u003d False"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_ebb84712","side":"PARENT","line":69,"updated":"2020-09-02 20:19:31.000000000","message":"nit unrelated","commit_id":"041ce67619074ee79226161aab8169f990e4c175"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @mock.patch(\u0027builtins.open\u0027)"},{"line_number":67,"context_line":"    @mock.patch(\"os.path.exists\")"},{"line_number":68,"context_line":"    def test__disable_ipv6(self, mock_exists, mock_open):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        exists_path \u003d \"/proc/sys/net/ipv6/conf/br0/disable_ipv6\""},{"line_number":71,"context_line":"        mock_exists.return_value \u003d False"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_247549fb","side":"PARENT","line":69,"in_reply_to":"9f560f44_ebb84712","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"041ce67619074ee79226161aab8169f990e4c175"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":179,"context_line":"        ]"},{"line_number":180,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":181,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":182,"context_line":"        # PCI IDs mocked:"},{"line_number":183,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":184,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_7c5368e3","line":181,"updated":"2020-09-03 07:04:06.000000000","message":"can we just do: \nmock__get_phys_switch_id.return_value \u003d \u0027pf_sw_id\u0027 ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":179,"context_line":"        ]"},{"line_number":180,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":181,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":182,"context_line":"        # PCI IDs mocked:"},{"line_number":183,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":184,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_241b8973","line":181,"in_reply_to":"9f560f44_7c5368e3","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # PCI IDs mocked:"},{"line_number":183,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":184,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"},{"line_number":185,"context_line":"        mock_get_function_by_ifname.side_effect \u003d ("},{"line_number":186,"context_line":"            [(\"0000:0a:00.0\", True), (\"0000:0a:00.0\", True),"},{"line_number":187,"context_line":"             (\"0000:0a:02.1\", False), (\"0000:0a:02.2\", False)])"},{"line_number":188,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \"pf0vf1\", \"pf0vf2\"])"},{"line_number":189,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname\u0027, \u00272\u0027)"},{"line_number":190,"context_line":"        self.assertEqual(\u0027rep_vf_2\u0027, ifname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_1cd4ecba","line":187,"range":{"start_line":185,"start_character":7,"end_line":187,"end_character":63},"updated":"2020-09-03 07:04:06.000000000","message":"This is no longer called per device in the refactored logic. just for the pf_ifname in _get_pf_func() which you can mock here instead of get_function_by_ifname()\n\nother tests should be adjusted as well","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        # PCI IDs mocked:"},{"line_number":183,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":184,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"},{"line_number":185,"context_line":"        mock_get_function_by_ifname.side_effect \u003d ("},{"line_number":186,"context_line":"            [(\"0000:0a:00.0\", True), (\"0000:0a:00.0\", True),"},{"line_number":187,"context_line":"             (\"0000:0a:02.1\", False), (\"0000:0a:02.2\", False)])"},{"line_number":188,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \"pf0vf1\", \"pf0vf2\"])"},{"line_number":189,"context_line":"        ifname \u003d linux_net.get_representor_port(\u0027pf_ifname\u0027, \u00272\u0027)"},{"line_number":190,"context_line":"        self.assertEqual(\u0027rep_vf_2\u0027, ifname)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_84f415f3","line":187,"range":{"start_line":185,"start_character":7,"end_line":187,"end_character":63},"in_reply_to":"9f560f44_1cd4ecba","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            \u0027pf_ifname1\u0027, \u0027pf_ifname2\u0027, \u0027rep_pf1_vf_1\u0027, \u0027rep_pf1_vf_2\u0027,"},{"line_number":201,"context_line":"            \u0027rep_pf2_vf_1\u0027, \u0027rep_pf2_vf_2\u0027,"},{"line_number":202,"context_line":"        ]"},{"line_number":203,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":204,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027,"},{"line_number":205,"context_line":"             \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":206,"context_line":"        # PCI IDs mocked:"},{"line_number":207,"context_line":"        # PF1:    0000:0a:00.1    PF2:    0000:0a:00.2"},{"line_number":208,"context_line":"        # PF1VF1: 0000:0a:02.1    PF1VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_1cbfccfc","line":205,"range":{"start_line":203,"start_character":8,"end_line":205,"end_character":37},"updated":"2020-09-03 07:04:06.000000000","message":"can we just do: \nmock__get_phys_switch_id.return_value \u003d \u0027pf_sw_id\u0027 ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            \u0027pf_ifname1\u0027, \u0027pf_ifname2\u0027, \u0027rep_pf1_vf_1\u0027, \u0027rep_pf1_vf_2\u0027,"},{"line_number":201,"context_line":"            \u0027rep_pf2_vf_1\u0027, \u0027rep_pf2_vf_2\u0027,"},{"line_number":202,"context_line":"        ]"},{"line_number":203,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":204,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027,"},{"line_number":205,"context_line":"             \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":206,"context_line":"        # PCI IDs mocked:"},{"line_number":207,"context_line":"        # PF1:    0000:0a:00.1    PF2:    0000:0a:00.2"},{"line_number":208,"context_line":"        # PF1VF1: 0000:0a:02.1    PF1VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_e46a3119","line":205,"range":{"start_line":203,"start_character":8,"end_line":205,"end_character":37},"in_reply_to":"9f560f44_1cbfccfc","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":229,"context_line":"        ]"},{"line_number":230,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":231,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":232,"context_line":"        # PCI IDs mocked:"},{"line_number":233,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":234,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_5c4e6438","line":231,"updated":"2020-09-03 07:04:06.000000000","message":"can we just do: \nmock__get_phys_switch_id.return_value \u003d \u0027pf_sw_id\u0027 ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":229,"context_line":"        ]"},{"line_number":230,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":231,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":232,"context_line":"        # PCI IDs mocked:"},{"line_number":233,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":234,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_24ef09ea","line":231,"in_reply_to":"9f560f44_5c4e6438","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        mock_listdir.return_value \u003d ["},{"line_number":281,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":282,"context_line":"        ]"},{"line_number":283,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":284,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":285,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \u0027a\u0027, \u0027a\u0027])"},{"line_number":286,"context_line":"        # PCI IDs mocked:"},{"line_number":287,"context_line":"        # PF0:    0000:0a:00.0"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_3cf730d7","line":284,"range":{"start_line":283,"start_character":7,"end_line":284,"end_character":61},"updated":"2020-09-03 07:04:06.000000000","message":"can we just do: \nmock__get_phys_switch_id.return_value \u003d \u0027pf_sw_id\u0027 ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        mock_listdir.return_value \u003d ["},{"line_number":281,"context_line":"            \u0027pf_ifname\u0027, \u0027rep_vf_1\u0027, \u0027rep_vf_2\u0027"},{"line_number":282,"context_line":"        ]"},{"line_number":283,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":284,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":285,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \u0027a\u0027, \u0027a\u0027])"},{"line_number":286,"context_line":"        # PCI IDs mocked:"},{"line_number":287,"context_line":"        # PF0:    0000:0a:00.0"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_c4c8cd76","line":284,"range":{"start_line":283,"start_character":7,"end_line":284,"end_character":61},"in_reply_to":"9f560f44_3cf730d7","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        ]"},{"line_number":283,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":284,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":285,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \u0027a\u0027, \u0027a\u0027])"},{"line_number":286,"context_line":"        # PCI IDs mocked:"},{"line_number":287,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":288,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_bcdb401f","line":285,"range":{"start_line":285,"start_character":48,"end_line":285,"end_character":63},"updated":"2020-09-03 07:04:06.000000000","message":"this should be:\n[\u0027p0\u0027, \u00271\u0027, \u0027a\u0027]\n\nas refactored get_representor_port now reads phys_port_name of the PF in the devices loop.","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        ]"},{"line_number":283,"context_line":"        mock__get_phys_switch_id.side_effect \u003d ("},{"line_number":284,"context_line":"            [\u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027, \u0027pf_sw_id\u0027])"},{"line_number":285,"context_line":"        mock__get_phys_port_name.side_effect \u003d ([\u00271\u0027, \u0027a\u0027, \u0027a\u0027])"},{"line_number":286,"context_line":"        # PCI IDs mocked:"},{"line_number":287,"context_line":"        # PF0:    0000:0a:00.0"},{"line_number":288,"context_line":"        # PF0VF1: 0000:0a:02.1    PF0VF2: 0000:0a:02.2"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_04c3e558","line":285,"range":{"start_line":285,"start_character":48,"end_line":285,"end_character":63},"in_reply_to":"9f560f44_bcdb401f","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    def test__get_phys_switch_id(self, mock_isfile, mock_open):"},{"line_number":385,"context_line":"        mock_open.return_value.__enter__ \u003d lambda s: s"},{"line_number":386,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":387,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf_sw_id\u0027])"},{"line_number":388,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":389,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":390,"context_line":"        self.assertEqual(phys_port_name, \u0027pf_sw_id\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_5c2f8487","line":387,"range":{"start_line":387,"start_character":39,"end_line":387,"end_character":47},"updated":"2020-09-03 07:04:06.000000000","message":"nit: appreciate if you provide a real life example of switch ID","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    def test__get_phys_switch_id(self, mock_isfile, mock_open):"},{"line_number":385,"context_line":"        mock_open.return_value.__enter__ \u003d lambda s: s"},{"line_number":386,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":387,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf_sw_id\u0027])"},{"line_number":388,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":389,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":390,"context_line":"        self.assertEqual(phys_port_name, \u0027pf_sw_id\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_447afdef","line":387,"range":{"start_line":387,"start_character":39,"end_line":387,"end_character":47},"in_reply_to":"9f560f44_5c2f8487","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":387,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf_sw_id\u0027])"},{"line_number":388,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":389,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":390,"context_line":"        self.assertEqual(phys_port_name, \u0027pf_sw_id\u0027)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_5c44a447","line":389,"range":{"start_line":389,"start_character":35,"end_line":389,"end_character":54},"updated":"2020-09-03 07:04:06.000000000","message":"wrong method call ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":387,"context_line":"        readline_mock.side_effect \u003d ([\u0027pf_sw_id\u0027])"},{"line_number":388,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":389,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":390,"context_line":"        self.assertEqual(phys_port_name, \u0027pf_sw_id\u0027)"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_a48159c6","line":389,"range":{"start_line":389,"start_character":35,"end_line":389,"end_character":54},"in_reply_to":"9f560f44_5c44a447","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"4ee2fbea21a6cb3a9b3157a420d1075c51121eb9","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"},{"line_number":393,"context_line":"    def test__get_phys_switch_id_not_found(self, mock_isfile):"},{"line_number":394,"context_line":"        mock_isfile.return_value \u003d False"},{"line_number":395,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":396,"context_line":"        self.assertIsNone(phys_port_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_bc74e09d","line":395,"range":{"start_line":395,"start_character":8,"end_line":395,"end_character":64},"updated":"2020-09-03 07:04:06.000000000","message":"wrong method call ?","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":32296,"name":"Mamduh","email":"mamduhala@nvidia.com","username":"Mamduh"},"change_message_id":"f2ce399bfa2dec98c9a6020dbae20fd03f8d3cdd","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"},{"line_number":393,"context_line":"    def test__get_phys_switch_id_not_found(self, mock_isfile):"},{"line_number":394,"context_line":"        mock_isfile.return_value \u003d False"},{"line_number":395,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"ifname\")"},{"line_number":396,"context_line":"        self.assertIsNone(phys_port_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f560f44_848415d5","line":395,"range":{"start_line":395,"start_character":8,"end_line":395,"end_character":64},"in_reply_to":"9f560f44_bc74e09d","updated":"2020-09-03 09:16:17.000000000","message":"Done","commit_id":"403587dc3a2744aa387f5565e9798d3ba07a897f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"351decb620f91a2ed67a0a0f9fa1671da4a21a34","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        readline_mock.return_value \u003d \u0027pf0vf0\u0027"},{"line_number":336,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":337,"context_line":"        phys_port_name \u003d linux_net._get_phys_port_name(\"vf_ifname\")"},{"line_number":338,"context_line":"        self.assertEqual(phys_port_name, \u0027pf0vf0\u0027)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"},{"line_number":341,"context_line":"    def test__get_phys_port_name_not_found(self, mock_isfile):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_219896ca","line":338,"updated":"2020-10-05 14:08:08.000000000","message":"note to self:\nthe side effects of _get_phys_port_name are:\n - open /sys/class/net/vf_ifname/phys_port_name\n - read string\n - return string\n\nThis test doesn\u0027t check that the correct path is opened, I should investigate if it is possible to mock it more accurately.","commit_id":"76f7565b99e637d74878955a0033f35e9eb0e13f"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"351decb620f91a2ed67a0a0f9fa1671da4a21a34","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        readline_mock \u003d mock_open.return_value.readline"},{"line_number":351,"context_line":"        readline_mock.return_value \u003d \u002766e40000039b0398\u0027"},{"line_number":352,"context_line":"        mock_isfile.return_value \u003d True"},{"line_number":353,"context_line":"        phys_port_name \u003d linux_net._get_phys_switch_id(\"ifname\")"},{"line_number":354,"context_line":"        self.assertEqual(phys_port_name, \u002766e40000039b0398\u0027)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @mock.patch.object(os.path, \u0027isfile\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_e1b5fe33","line":353,"range":{"start_line":353,"start_character":8,"end_line":353,"end_character":22},"updated":"2020-10-05 14:08:08.000000000","message":"this should be phys_switch_id. Similar comments as earlier.","commit_id":"76f7565b99e637d74878955a0033f35e9eb0e13f"}]}
