)]}'
{"os_net_config/utils.py":[{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"d571d4aeca58190467ab821f01874c87cb81e0f1","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                # address with ethtool."},{"line_number":422,"context_line":"                dpdk_devargs \u003d get_pci_address(ifname, noop)"},{"line_number":423,"context_line":"            else:"},{"line_number":424,"context_line":"                pci_addr \u003d get_stored_pci_address(ifname, noop)"},{"line_number":425,"context_line":"                if _is_vf(pci_addr):"},{"line_number":426,"context_line":"                    # For Mellanox devices the VFs bound with DPDK shall"},{"line_number":427,"context_line":"                    # be treated the same as VFs of other devices"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_ba8e7024","line":424,"range":{"start_line":424,"start_character":16,"end_line":424,"end_character":63},"updated":"2020-07-08 15:47:17.000000000","message":"I assume there is a good reason to set pci_addr even if the interface is not a vf and the dpdk_devargs are not set, otherwise you could just do:\nif _is_vf(pci_addr):\n    dpdk_devargs \u003d get_stored_pci_address(ifname, noop)","commit_id":"f7ad834087de5865203eee2da05b5ad8a26348d7"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"9083384a8ed1b4ad5b3233098b973f915d7ae681","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                # address with ethtool."},{"line_number":422,"context_line":"                dpdk_devargs \u003d get_pci_address(ifname, noop)"},{"line_number":423,"context_line":"            else:"},{"line_number":424,"context_line":"                pci_addr \u003d get_stored_pci_address(ifname, noop)"},{"line_number":425,"context_line":"                if _is_vf(pci_addr):"},{"line_number":426,"context_line":"                    # For Mellanox devices the VFs bound with DPDK shall"},{"line_number":427,"context_line":"                    # be treated the same as VFs of other devices"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_0f9c760c","line":424,"range":{"start_line":424,"start_character":16,"end_line":424,"end_character":63},"in_reply_to":"bf51134e_ba8e7024","updated":"2020-07-09 02:27:33.000000000","message":"In order to check the VF, we would need the pci address","commit_id":"f7ad834087de5865203eee2da05b5ad8a26348d7"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"9d9d1d7bc666a8c3373e1ecbbdfc41c649df8db1","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":173,"context_line":"    is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":174,"context_line":"    if is_sriov_vf:"},{"line_number":175,"context_line":"        return True"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # nic is not VF"},{"line_number":178,"context_line":"    return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"def _is_available_nic(interface_name, check_active\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_658b4abf","line":178,"range":{"start_line":174,"start_character":0,"end_line":178,"end_character":16},"updated":"2020-07-14 16:25:32.000000000","message":"Nit: this could be done in one line:\n\nreturn is_sriov_vf","commit_id":"5157fe74d1d7e4ec48f6479453974d6a54f595d7"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d4c1cde432ccd86a095dff0447a18a316f39c734","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    vf_path_check \u003d _SYS_BUS_PCI_DEV + \u0027/%s/physfn\u0027 % pci_address"},{"line_number":162,"context_line":"    is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":163,"context_line":"    return is_sriov_vf:"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"def _is_vf_by_name(interface_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_c8f18d6d","line":163,"updated":"2020-07-14 17:13:20.000000000","message":"pep8: E999 SyntaxError: invalid syntax","commit_id":"c4a5ab7eda366e4805007a737ebb4a2809493a0a"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d4c1cde432ccd86a095dff0447a18a316f39c734","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    return is_sriov_vf:"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"def _is_vf_by_name(interface_name):"},{"line_number":167,"context_line":"    vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":168,"context_line":"    is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":169,"context_line":"    return is_sriov_vf:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_a8f4195c","line":166,"updated":"2020-07-14 17:13:20.000000000","message":"pep8: E112 expected an indented block","commit_id":"c4a5ab7eda366e4805007a737ebb4a2809493a0a"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d4c1cde432ccd86a095dff0447a18a316f39c734","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    return is_sriov_vf:"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"def _is_available_nic(interface_name, check_active\u003dTrue):"},{"line_number":173,"context_line":"    try:"},{"line_number":174,"context_line":"        if interface_name \u003d\u003d \u0027lo\u0027:"},{"line_number":175,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_08e8a579","line":172,"updated":"2020-07-14 17:13:20.000000000","message":"pep8: E112 expected an indented block","commit_id":"c4a5ab7eda366e4805007a737ebb4a2809493a0a"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"1f75cb83537cbd88cbce6068447844a7d591b134","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            elif _is_vf_by_name(ifname):"},{"line_number":426,"context_line":"                # For Mellanox devices the VFs bound with DPDK shall"},{"line_number":427,"context_line":"                # be treated the same as VFs of other devices"},{"line_number":428,"context_line":"                dpdk_devargs \u003d get_pci_address(ifname, noop)"},{"line_number":429,"context_line":"        else:"},{"line_number":430,"context_line":"            logger.info(\"Getting stored PCI address as devarg\")"},{"line_number":431,"context_line":"            dpdk_devargs \u003d get_stored_pci_address(ifname, noop)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_6c05ee45","line":428,"updated":"2020-07-15 04:34:30.000000000","message":"I would recommend to add a else branch which will have log stating it as unexpected case. It should not reach here, but if it does for some reason (like the interface is not active during 2nd run), then it will result in exception of dpdk_devargs is not defined. Instead we can throw an exception with debug message.","commit_id":"e409ce0dd3a93f14dd7af7c4af1657ea41b88880"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"1d6e184517ffcdd1d35b87901b00e51e61232a8d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"_VPP_EXEC_FILE \u003d \u0027/etc/vpp/vpp-exec\u0027"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class UndefinedDevargsException(ValueError):"},{"line_number":63,"context_line":"    pass"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_a3581656","line":62,"updated":"2020-07-24 04:28:20.000000000","message":"Can we name it as InvalidInterfaceException?","commit_id":"6e8f6cec84e42224afbd6390a3ade9c736e9dbdc"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"fdf9d870287af97cd6433188e95fd602099c9b92","unresolved":false,"context_lines":[{"line_number":59,"context_line":"_VPP_EXEC_FILE \u003d \u0027/etc/vpp/vpp-exec\u0027"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class UndefinedDevargsException(ValueError):"},{"line_number":63,"context_line":"    pass"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_358ef931","line":62,"in_reply_to":"bf51134e_a3581656","updated":"2020-07-24 05:10:06.000000000","message":"Done","commit_id":"6e8f6cec84e42224afbd6390a3ade9c736e9dbdc"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"1d6e184517ffcdd1d35b87901b00e51e61232a8d","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                # be treated the same as VFs of other devices"},{"line_number":430,"context_line":"                dpdk_devargs \u003d get_pci_address(ifname, noop)"},{"line_number":431,"context_line":"            else:"},{"line_number":432,"context_line":"                logger.error(\"devargs is not set for %s\" % ifname)"},{"line_number":433,"context_line":"                msg \u003d (\"devargs is not set for %s\" % ifname)"},{"line_number":434,"context_line":"                raise UndefinedDevargsException(msg)"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_43701adb","line":432,"updated":"2020-07-24 04:28:20.000000000","message":"This function is supposed to return the devargs, throwing the error as \"devargs is not set\" does not meaning, because, this function is supposed to set it. I would put it as \"Unable to get devargs for interface %s\". WDYT?","commit_id":"6e8f6cec84e42224afbd6390a3ade9c736e9dbdc"},{"author":{"_account_id":18904,"name":"Karthik S","email":"ksundara@redhat.com","username":"karthiks"},"change_message_id":"fdf9d870287af97cd6433188e95fd602099c9b92","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                # be treated the same as VFs of other devices"},{"line_number":430,"context_line":"                dpdk_devargs \u003d get_pci_address(ifname, noop)"},{"line_number":431,"context_line":"            else:"},{"line_number":432,"context_line":"                logger.error(\"devargs is not set for %s\" % ifname)"},{"line_number":433,"context_line":"                msg \u003d (\"devargs is not set for %s\" % ifname)"},{"line_number":434,"context_line":"                raise UndefinedDevargsException(msg)"},{"line_number":435,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf51134e_5593ad5c","line":432,"in_reply_to":"bf51134e_43701adb","updated":"2020-07-24 05:10:06.000000000","message":"Done","commit_id":"6e8f6cec84e42224afbd6390a3ade9c736e9dbdc"}]}
