)]}'
{"os_net_config/utils.py":[{"author":{"_account_id":21626,"name":"Ricardo","email":"rnoriega@redhat.com","username":"rnoriega"},"change_message_id":"3d4c73077d9eba0d5a5df2b0e63370a143af3687","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        with open(_SYS_CLASS_NET + \u0027/%s/address\u0027 % interface_name, \u0027r\u0027) as f:"},{"line_number":108,"context_line":"            address \u003d f.read().rstrip()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # If SR-IOV Virtual Functions (VF) are enalbed in an interface, there"},{"line_number":111,"context_line":"        # will be additional nics created for each VF. It has to be ignored in"},{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_da2a527e","line":110,"range":{"start_line":110,"start_character":47,"end_line":110,"end_character":54},"updated":"2016-12-29 12:12:11.000000000","message":"enabled","commit_id":"725ef6ed548aca7112dd63c9c8a3bcf8e0891ea8"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"ac7b2a876d094ff60333ea9ef8cb2bb9f5cd8013","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        with open(_SYS_CLASS_NET + \u0027/%s/address\u0027 % interface_name, \u0027r\u0027) as f:"},{"line_number":108,"context_line":"            address \u003d f.read().rstrip()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # If SR-IOV Virtual Functions (VF) are enalbed in an interface, there"},{"line_number":111,"context_line":"        # will be additional nics created for each VF. It has to be ignored in"},{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_f6e1e6d1","line":110,"range":{"start_line":110,"start_character":47,"end_line":110,"end_character":54},"in_reply_to":"ba5201f7_da2a527e","updated":"2016-12-30 04:58:44.000000000","message":"Done","commit_id":"725ef6ed548aca7112dd63c9c8a3bcf8e0891ea8"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"3f8c1cefb2436b9e84038ca564589d7cf993800f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"},{"line_number":114,"context_line":"        # ignored."},{"line_number":115,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":116,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if (has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address and"},{"line_number":119,"context_line":"                not is_sriov_vf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_a7946e37","line":116,"range":{"start_line":115,"start_character":0,"end_line":116,"end_character":50},"updated":"2017-01-02 17:04:49.000000000","message":"Can be collapsed into one line:\n\nis_sriov_vf \u003d os.path.isdir(_SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name)","commit_id":"b58a12e736aac7d678a654bb948155c5c36b8b82"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"87f2c37019fde8833c114e4bfb89e8caaa59ec0e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"},{"line_number":114,"context_line":"        # ignored."},{"line_number":115,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":116,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if (has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address and"},{"line_number":119,"context_line":"                not is_sriov_vf):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_d35bc22c","line":116,"range":{"start_line":115,"start_character":0,"end_line":116,"end_character":50},"in_reply_to":"ba5201f7_a7946e37","updated":"2017-01-04 06:18:04.000000000","message":"Sure, I was following \"device_dir\" as sample. It was also following same patter. I will change both in the next review.","commit_id":"b58a12e736aac7d678a654bb948155c5c36b8b82"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"84e5348040f9446a5a9d19bb65e6961e7ac8dbce","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        with open(_SYS_CLASS_NET + \u0027/%s/address\u0027 % interface_name, \u0027r\u0027) as f:"},{"line_number":108,"context_line":"            address \u003d f.read().rstrip()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # If SR-IOV Virtual Functions (VF) are enabled in an interface, there"},{"line_number":111,"context_line":"        # will be additional nics created for each VF. It has to be ignored in"},{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"},{"line_number":114,"context_line":"        # ignored."},{"line_number":115,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":116,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if (has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address and"},{"line_number":119,"context_line":"                not is_sriov_vf):"},{"line_number":120,"context_line":"            return True"},{"line_number":121,"context_line":"        else:"},{"line_number":122,"context_line":"            return False"},{"line_number":123,"context_line":"    except IOError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_ca64a6ba","line":120,"range":{"start_line":110,"start_character":0,"end_line":120,"end_character":23},"updated":"2017-01-23 09:43:37.000000000","message":"This is alright, but you could actually fail even faster. Leave the \"if has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address:\" as-is, but just return False if it\u0027s an sriov_vf:\n\n    vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name\n    if (os.path.isdir(vf_path_check)):\n        # If SR-IOV Virtual Functions (VF) are enabled in an interface, there\n        # will be additional nics created for each VF. It has to be ignored in\n        # the nic numbering. All the VFs will have a reference to the PF with\n        # directory name as \u0027physfn\u0027, if this directory is present it should be\n        # ignored.\n        return False\n\n    if has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address:\n        return True\n    else:\n        return False","commit_id":"3a0c8dabfa7ded08fec8aeebf5f432db1dbdc4e7"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"5ae414d609a4a79c6a81107847fc2ee578f4b1ce","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        with open(_SYS_CLASS_NET + \u0027/%s/address\u0027 % interface_name, \u0027r\u0027) as f:"},{"line_number":108,"context_line":"            address \u003d f.read().rstrip()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # If SR-IOV Virtual Functions (VF) are enabled in an interface, there"},{"line_number":111,"context_line":"        # will be additional nics created for each VF. It has to be ignored in"},{"line_number":112,"context_line":"        # the nic numbering. All the VFs will have a reference to the PF with"},{"line_number":113,"context_line":"        # directory name as \u0027physfn\u0027, if this directory is present it should be"},{"line_number":114,"context_line":"        # ignored."},{"line_number":115,"context_line":"        vf_path_check \u003d _SYS_CLASS_NET + \u0027/%s/device/physfn\u0027 % interface_name"},{"line_number":116,"context_line":"        is_sriov_vf \u003d os.path.isdir(vf_path_check)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if (has_device_dir and operstate \u003d\u003d \u0027up\u0027 and address and"},{"line_number":119,"context_line":"                not is_sriov_vf):"},{"line_number":120,"context_line":"            return True"},{"line_number":121,"context_line":"        else:"},{"line_number":122,"context_line":"            return False"},{"line_number":123,"context_line":"    except IOError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_831529e6","line":120,"range":{"start_line":110,"start_character":0,"end_line":120,"end_character":23},"in_reply_to":"5a3905b3_ca64a6ba","updated":"2017-01-23 10:32:31.000000000","message":"That\u0027s a good one. I will patch it up on a follow-up review.","commit_id":"3a0c8dabfa7ded08fec8aeebf5f432db1dbdc4e7"}]}
