)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"973d4d9890f78320af66299c38c88e5d65474eb9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     waleed mousa \u003cwaleedm@mellanox.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-06-13 06:48:23 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Restructuring the method of vf-representor renaming"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I61c59e162bc5d15c063f52612e198d93f4433db1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_65658f1d","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":51},"updated":"2019-06-16 07:51:31.000000000","message":"This doesn\u0027t really express the change done in the commit, as rep-link-name.sh also changed. Also the logic for add_udev_rule_for_vf_representors.\n\nIt would also be helpful if you add a few sentences on why this change is needed. (i.e race condition on uplink representor rename)","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"}],"os_net_config/sriov_config.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f75d15fc1898b06827b747b0a6ecc270ddd473e6","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PORT\u003d\"$1\""},{"line_number":46,"context_line":"logger -p local3.info -i \"PORT is $PORT\""},{"line_number":47,"context_line":"echo \"NUMBER\u003d${PORT##pf*vf}\""},{"line_number":48,"context_line":"logger -p local3.info -i \"Representor vf NUMBER is \"${PORT##pf*vf}."},{"line_number":49,"context_line":"\u0027\u0027\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Create a queue for passing the udev network events"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_6a67b3ea","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":67},"updated":"2019-06-14 04:31:24.000000000","message":"I don\u0027t think we need logging for this simple script. It makesense with the old implementation","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"973d4d9890f78320af66299c38c88e5d65474eb9","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Create a queue for passing the udev network events"},{"line_number":52,"context_line":"vf_queue \u003d Queue.Queue()"},{"line_number":53,"context_line":"trigger_udev_rule \u003d False"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# File to contain the list of SR-IOV PF, VF and their configurations"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_c579dbc4","line":53,"range":{"start_line":53,"start_character":0,"end_line":53,"end_character":25},"updated":"2019-06-16 07:51:31.000000000","message":"Any chance to avoid this global ?\nIt is possible to propagate if a udev rule was indeed added (hence a udev rule retriggering is required)  from add_udev_rule()","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"973d4d9890f78320af66299c38c88e5d65474eb9","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                # will be filled with these events, So we need to clear it"},{"line_number":147,"context_line":"                # before the next iteration of next sriov_pf in order not"},{"line_number":148,"context_line":"                # to affect the logic of _wait_for_vf_creation method above"},{"line_number":149,"context_line":"                vf_queue.queue.clear()"},{"line_number":150,"context_line":"                add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":151,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":152,"context_line":"    if trigger_udev_rule:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_e5789fc4","line":149,"range":{"start_line":149,"start_character":16,"end_line":149,"end_character":38},"updated":"2019-06-16 07:51:31.000000000","message":"can we stop the observer and clear the queue after L#129 ?\n\nit seems that listening on triggered udev rules is only relevant for PCI VF enumeration.","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"26ba8077a573ed4554d735448b8dd69f818b7321","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                # will be filled with these events, So we need to clear it"},{"line_number":147,"context_line":"                # before the next iteration of next sriov_pf in order not"},{"line_number":148,"context_line":"                # to affect the logic of _wait_for_vf_creation method above"},{"line_number":149,"context_line":"                vf_queue.queue.clear()"},{"line_number":150,"context_line":"                add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":151,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":152,"context_line":"    if trigger_udev_rule:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_40b719f6","line":149,"range":{"start_line":149,"start_character":16,"end_line":149,"end_character":38},"in_reply_to":"9fb8cfa7_e5789fc4","updated":"2019-06-16 11:38:00.000000000","message":"it\u0027s not possible but lets discuss it on the new change","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"f75d15fc1898b06827b747b0a6ecc270ddd473e6","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                # Adding a udev rule to save the sriov_pf name"},{"line_number":141,"context_line":"                add_udev_rule_for_sriov_pf(item[\u0027name\u0027])"},{"line_number":142,"context_line":"                configure_switchdev(item[\u0027name\u0027])"},{"line_number":143,"context_line":"                # Clear the vf_queue,"},{"line_number":144,"context_line":"                # As moving to switchdev will remove the vfs and create"},{"line_number":145,"context_line":"                # vf-representros and uplink representor and the vf-queue"},{"line_number":146,"context_line":"                # will be filled with these events, So we need to clear it"},{"line_number":147,"context_line":"                # before the next iteration of next sriov_pf in order not"},{"line_number":148,"context_line":"                # to affect the logic of _wait_for_vf_creation method above"},{"line_number":149,"context_line":"                vf_queue.queue.clear()"},{"line_number":150,"context_line":"                add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":151,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":152,"context_line":"    if trigger_udev_rule:"},{"line_number":153,"context_line":"        # Trigger udev rules if there is new rules written"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_2a445b46","line":150,"range":{"start_line":143,"start_character":0,"end_line":150,"end_character":63},"updated":"2019-06-14 04:31:24.000000000","message":"split this to separate commit","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"26ba8077a573ed4554d735448b8dd69f818b7321","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                # Adding a udev rule to save the sriov_pf name"},{"line_number":141,"context_line":"                add_udev_rule_for_sriov_pf(item[\u0027name\u0027])"},{"line_number":142,"context_line":"                configure_switchdev(item[\u0027name\u0027])"},{"line_number":143,"context_line":"                # Clear the vf_queue,"},{"line_number":144,"context_line":"                # As moving to switchdev will remove the vfs and create"},{"line_number":145,"context_line":"                # vf-representros and uplink representor and the vf-queue"},{"line_number":146,"context_line":"                # will be filled with these events, So we need to clear it"},{"line_number":147,"context_line":"                # before the next iteration of next sriov_pf in order not"},{"line_number":148,"context_line":"                # to affect the logic of _wait_for_vf_creation method above"},{"line_number":149,"context_line":"                vf_queue.queue.clear()"},{"line_number":150,"context_line":"                add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":151,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":152,"context_line":"    if trigger_udev_rule:"},{"line_number":153,"context_line":"        # Trigger udev rules if there is new rules written"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_60beddd5","line":150,"range":{"start_line":143,"start_character":0,"end_line":150,"end_character":63},"in_reply_to":"9fb8cfa7_2a445b46","updated":"2019-06-16 11:38:00.000000000","message":"will do","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"fea94ace63f7d8bae3120d56d8177cceb919da96","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def add_udev_rule_for_vf_representors(pf_name):"},{"line_number":202,"context_line":"    phys_switch_id_path \u003d os.path.join(_SYS_CLASS_NET, pf_name,"},{"line_number":203,"context_line":"                                       \"phys_switch_id\")"},{"line_number":204,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_1d80baf4","line":201,"updated":"2019-06-14 12:27:20.000000000","message":"Can we make udev rule creations to be done only once for a os-net-config run, instead of running it on every reboot?","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"26ba8077a573ed4554d735448b8dd69f818b7321","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def add_udev_rule_for_vf_representors(pf_name):"},{"line_number":202,"context_line":"    phys_switch_id_path \u003d os.path.join(_SYS_CLASS_NET, pf_name,"},{"line_number":203,"context_line":"                                       \"phys_switch_id\")"},{"line_number":204,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_20db054f","line":201,"in_reply_to":"9fb8cfa7_1d80baf4","updated":"2019-06-16 11:38:00.000000000","message":"it will run it on every reboot but actually if nothing changed it will not write any new udev rule and so will not trigger it,\nBut I did this way in case of it\u0027s deleted or commented.\nBut do you think, should it be run only when running applying os-net-config changes?","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"a30ac33917376f70931cb5c3b36b0d0fca4936e9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def add_udev_rule_for_vf_representors(pf_name):"},{"line_number":202,"context_line":"    phys_switch_id_path \u003d os.path.join(_SYS_CLASS_NET, pf_name,"},{"line_number":203,"context_line":"                                       \"phys_switch_id\")"},{"line_number":204,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_66ced484","line":201,"in_reply_to":"9fb8cfa7_20db054f","updated":"2019-06-18 13:38:51.000000000","message":"Do you expect the rule to be deleted or commented? As this logic will be idempotent, it is fine to have it on reboot too.\n\nAlso it would be great if we add a comment on the file like  ifcfg files - \"# This file is created by os-net-config\".","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"ccb03281a40a0e91cb3a74288e8643c4c4ff7e55","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def add_udev_rule_for_vf_representors(pf_name):"},{"line_number":202,"context_line":"    phys_switch_id_path \u003d os.path.join(_SYS_CLASS_NET, pf_name,"},{"line_number":203,"context_line":"                                       \"phys_switch_id\")"},{"line_number":204,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_98c5535e","line":201,"in_reply_to":"9fb8cfa7_66ced484","updated":"2019-06-19 07:30:39.000000000","message":"Done","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"fea94ace63f7d8bae3120d56d8177cceb919da96","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                     \"its\u0027 vf-represent\" % pf_name)"},{"line_number":213,"context_line":"        return"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":216,"context_line":"                     \u0027\u003d\u003d\"%s\", ATTR{phys_port_name}\u003d\u003d\"pf%svf*\",\u0027\\"},{"line_number":217,"context_line":"                     \u0027IMPORT{program}\u003d\"%s \u0027\\"},{"line_number":218,"context_line":"                     \u0027$attr{phys_port_name}\" \u0027\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_7d853606","line":215,"updated":"2019-06-14 12:27:20.000000000","message":"It is going to be hard to manage the rules during update if there is any change. Assume during this deployment, this rule has been added to the file, during an update, if the rule is changed, then it will be added as duplicates. Though it will not affect this patch currently as this will be first feature deployment. \n\nIt would be better to delete the udev rule file when os-net-config is triggered, so that the rules will be written freshly on every os-net-config run. Not blocking this patch for it, but it is better to have a follow-up discussion about how to handle it.","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"a30ac33917376f70931cb5c3b36b0d0fca4936e9","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                     \"its\u0027 vf-represent\" % pf_name)"},{"line_number":213,"context_line":"        return"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":216,"context_line":"                     \u0027\u003d\u003d\"%s\", ATTR{phys_port_name}\u003d\u003d\"pf%svf*\",\u0027\\"},{"line_number":217,"context_line":"                     \u0027IMPORT{program}\u003d\"%s \u0027\\"},{"line_number":218,"context_line":"                     \u0027$attr{phys_port_name}\" \u0027\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_6620144b","line":215,"in_reply_to":"9fb8cfa7_40de393e","updated":"2019-06-18 13:38:51.000000000","message":"This is definitely need to be considered when there is a change in the rule at a later point and has to be validated.","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"26ba8077a573ed4554d735448b8dd69f818b7321","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                     \"its\u0027 vf-represent\" % pf_name)"},{"line_number":213,"context_line":"        return"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":216,"context_line":"                     \u0027\u003d\u003d\"%s\", ATTR{phys_port_name}\u003d\u003d\"pf%svf*\",\u0027\\"},{"line_number":217,"context_line":"                     \u0027IMPORT{program}\u003d\"%s \u0027\\"},{"line_number":218,"context_line":"                     \u0027$attr{phys_port_name}\" \u0027\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_40de393e","line":215,"in_reply_to":"9fb8cfa7_7d853606","updated":"2019-06-16 11:38:00.000000000","message":"I see, so if I\u0027m going to delete the file every time we apply the os-net-onfig changes and then recreate it so we need to change the udev file name also because it\u0027s already have old rules","commit_id":"992c9fed130b1e1bed6246cfb88abfc3e1068cc3"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"763c85588e51f198e2a595e9ea64496b10ace4b3","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                trigger_udev_rule \u003d trigger_udev_rule or \\"},{"line_number":140,"context_line":"                    add_udev_rule_for_sriov_pf(item[\u0027name\u0027])"},{"line_number":141,"context_line":"                configure_switchdev(item[\u0027name\u0027])"},{"line_number":142,"context_line":"                trigger_udev_rule \u003d trigger_udev_rule or \\"},{"line_number":143,"context_line":"                    add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":144,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":145,"context_line":"    if trigger_udev_rule:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_66ca5450","line":142,"range":{"start_line":142,"start_character":36,"end_line":142,"end_character":53},"updated":"2019-06-18 13:44:24.000000000","message":"if trigger_udev_rule is true then add_udev_rule_for_vf_representors will not be executed. Is this the expected behavior?","commit_id":"44c1bd725c87d7e9144f06481cb3060fb70f686d"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"ccb03281a40a0e91cb3a74288e8643c4c4ff7e55","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                trigger_udev_rule \u003d trigger_udev_rule or \\"},{"line_number":140,"context_line":"                    add_udev_rule_for_sriov_pf(item[\u0027name\u0027])"},{"line_number":141,"context_line":"                configure_switchdev(item[\u0027name\u0027])"},{"line_number":142,"context_line":"                trigger_udev_rule \u003d trigger_udev_rule or \\"},{"line_number":143,"context_line":"                    add_udev_rule_for_vf_representors(item[\u0027name\u0027])"},{"line_number":144,"context_line":"                if_up_interface(item[\u0027name\u0027])"},{"line_number":145,"context_line":"    if trigger_udev_rule:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_d8cbcb6f","line":142,"range":{"start_line":142,"start_character":36,"end_line":142,"end_character":53},"in_reply_to":"9fb8cfa7_66ca5450","updated":"2019-06-19 07:30:39.000000000","message":"you are right, I fixed it","commit_id":"44c1bd725c87d7e9144f06481cb3060fb70f686d"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"616c9b55d6d7ced1ce4e57dc14f8699919250927","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"logger \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":"_SYS_CLASS_NET \u003d \u0027/sys/class/net\u0027"},{"line_number":37,"context_line":"_UDEV_RULE_FILE \u003d \u0027/etc/udev/rules.d/80-persistent-os-net-config.rules\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# In order to keep VF representor name consistent specially after the upgrade"},{"line_number":40,"context_line":"# proccess, we should have a udev rule to handle that."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_a9724b7b","line":37,"updated":"2019-06-19 10:05:09.000000000","message":"Can we remove the older UDEV rules files?","commit_id":"8580717176409322397b1166fdb4f77b51f0aadf"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"01365518f888e36247437309bc20b3e251d9b3d5","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"logger \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":"_SYS_CLASS_NET \u003d \u0027/sys/class/net\u0027"},{"line_number":37,"context_line":"_UDEV_RULE_FILE \u003d \u0027/etc/udev/rules.d/80-persistent-os-net-config.rules\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# In order to keep VF representor name consistent specially after the upgrade"},{"line_number":40,"context_line":"# proccess, we should have a udev rule to handle that."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_c3267369","line":37,"in_reply_to":"9fb8cfa7_a9724b7b","updated":"2019-06-19 22:09:10.000000000","message":"Please do, I suspect it could cause problems to have the older udev rule run before the newer one. At the very least, it will cause confusion.","commit_id":"8580717176409322397b1166fdb4f77b51f0aadf"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"05d5538582c1839f8f98f7366a3aa1db55b8f1db","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        try:"},{"line_number":242,"context_line":"            os.remove(_OLD_UDEV_RULE_FILE)"},{"line_number":243,"context_line":"        except Exception as e:"},{"line_number":244,"context_line":"            logger.error(\u0027Exception removing old file %s: %s\u0027 % (_OLD_UDEV_RULE_FILE, e)"},{"line_number":245,"context_line":"    return trigger_udev_rule"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_e9e351a3","line":244,"updated":"2019-06-20 04:04:49.000000000","message":"Missing parentheses","commit_id":"f0c7e0feeb75903def6b500d7a6ce795d71b0535"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"0f2837c24077fb18f4b173c28980146d97f1c2b1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                # Adding a udev rule to save the sriov_pf name"},{"line_number":140,"context_line":"                trigger_udev_rule \u003d add_udev_rule_for_sriov_pf(item[\u0027name\u0027])\\"},{"line_number":141,"context_line":"                    or trigger_udev_rule"},{"line_number":142,"context_line":"                try:"},{"line_number":143,"context_line":"                    processutils.execute(\u0027systemctl\u0027, \u0027stop\u0027, \u0027NetworkManager\u0027)"},{"line_number":144,"context_line":"                except processutils.ProcessExecutionError:"},{"line_number":145,"context_line":"                    logger.error(\"Failed to stop NetworkManager service\")"},{"line_number":146,"context_line":"                    raise"},{"line_number":147,"context_line":"                logger.info(\"NetworkManager service stopped\")"},{"line_number":148,"context_line":"                configure_switchdev(item[\u0027name\u0027])"},{"line_number":149,"context_line":"                trigger_udev_rule \u003d add_udev_rule_for_vf_representors("},{"line_number":150,"context_line":"                    item[\u0027name\u0027]) or trigger_udev_rule"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_796a8ab3","line":147,"range":{"start_line":142,"start_character":0,"end_line":147,"end_character":61},"updated":"2019-06-25 06:20:13.000000000","message":"in centos, we don\u0027t have NetworkManager service so it will fail,\nI\u0027ll edit it to check firstly if the NetworkManager service enabled or not","commit_id":"2f42ed5f7d210912f20bf4ce0df7fb529e63879a"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"                # Adding a udev rule to make vf-representors unmanaged by"},{"line_number":142,"context_line":"                # NetworkManager"},{"line_number":143,"context_line":"                add_udev_rule_to_unmanage_vf_representors_by_nm()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                # Adding a udev rule to save the sriov_pf name"},{"line_number":146,"context_line":"                trigger_udev_rule \u003d add_udev_rule_for_sriov_pf(item[\u0027name\u0027])\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_bef1716d","line":143,"updated":"2019-06-30 10:25:38.000000000","message":"should this work like the below udev stuff ?, i.e\n\ntrigger_udev_rule \u003d add_udev_rule_to_unmanage_vf_representors_by_nm() or trigger_udev_rule","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"                # Adding a udev rule to make vf-representors unmanaged by"},{"line_number":142,"context_line":"                # NetworkManager"},{"line_number":143,"context_line":"                add_udev_rule_to_unmanage_vf_representors_by_nm()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                # Adding a udev rule to save the sriov_pf name"},{"line_number":146,"context_line":"                trigger_udev_rule \u003d add_udev_rule_for_sriov_pf(item[\u0027name\u0027])\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_01b6223f","line":143,"in_reply_to":"9fb8cfa7_bef1716d","updated":"2019-06-30 14:00:36.000000000","message":"no need to trigger because this rule is added before creating vf-representors","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        if phys_switch_id !\u003d \u0027\u0027:"},{"line_number":199,"context_line":"            logger.info(\"The interface %s is ready\" % pf_name)"},{"line_number":200,"context_line":"            return"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            logger.warning(\"The interface is %s not ready yet, Retrying...\""},{"line_number":203,"context_line":"                           % pf_name)"},{"line_number":204,"context_line":"        time.sleep(1)"},{"line_number":205,"context_line":"        timeout +\u003d 1"},{"line_number":206,"context_line":"    logger.error(\"Timeout to get the interface %s ready\" % pf_name)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_9e5cad7d","line":203,"range":{"start_line":201,"start_character":0,"end_line":203,"end_character":37},"updated":"2019-06-30 10:25:38.000000000","message":"do we need this else block ? you are already reporting failure on timeout","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                           % pf_name)"},{"line_number":204,"context_line":"        time.sleep(1)"},{"line_number":205,"context_line":"        timeout +\u003d 1"},{"line_number":206,"context_line":"    logger.error(\"Timeout to get the interface %s ready\" % pf_name)"},{"line_number":207,"context_line":"    raise"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_3e57c15a","line":206,"range":{"start_line":206,"start_character":18,"end_line":206,"end_character":55},"updated":"2019-06-30 10:25:38.000000000","message":"How about: Timeout while waiting for uplink representor %s.","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    timeout \u003d 10"},{"line_number":194,"context_line":"    uplink_rep_phys_switch_id_path \u003d \"/sys/class/net/%s/phys_switch_id\" \\"},{"line_number":195,"context_line":"                                     % pf_name"},{"line_number":196,"context_line":"    while(timeout !\u003d 0):"},{"line_number":197,"context_line":"        phys_switch_id \u003d get_file_data(uplink_rep_phys_switch_id_path)"},{"line_number":198,"context_line":"        if phys_switch_id !\u003d \u0027\u0027:"},{"line_number":199,"context_line":"            logger.info(\"The interface %s is ready\" % pf_name)"},{"line_number":200,"context_line":"            return"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            logger.warning(\"The interface is %s not ready yet, Retrying...\""},{"line_number":203,"context_line":"                           % pf_name)"},{"line_number":204,"context_line":"        time.sleep(1)"},{"line_number":205,"context_line":"        timeout +\u003d 1"},{"line_number":206,"context_line":"    logger.error(\"Timeout to get the interface %s ready\" % pf_name)"},{"line_number":207,"context_line":"    raise"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"def create_rep_link_name_script():"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_5ed715c0","line":207,"range":{"start_line":196,"start_character":4,"end_line":207,"end_character":9},"updated":"2019-06-30 10:25:38.000000000","message":"just a thought:\n\na for else statement may be more elegant here:\n\nfor i in range(MAX_RETRIES):\n    if get_file_data(....):\n        logger.info(\"Uplink representor %s ready\", pf_name)\n        break\n    sleep(1)\nelse:\n    log.error(\"Timeout while waiting for uplink representor %s.\", pf_name)\n    # Some more error handling, raise RuntimeError etc..","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        time.sleep(1)"},{"line_number":205,"context_line":"        timeout +\u003d 1"},{"line_number":206,"context_line":"    logger.error(\"Timeout to get the interface %s ready\" % pf_name)"},{"line_number":207,"context_line":"    raise"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"def create_rep_link_name_script():"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_5e52b568","line":207,"range":{"start_line":207,"start_character":4,"end_line":207,"end_character":9},"updated":"2019-06-30 10:25:38.000000000","message":"what is being raised here?","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    timeout \u003d 10"},{"line_number":194,"context_line":"    uplink_rep_phys_switch_id_path \u003d \"/sys/class/net/%s/phys_switch_id\" \\"},{"line_number":195,"context_line":"                                     % pf_name"},{"line_number":196,"context_line":"    while(timeout !\u003d 0):"},{"line_number":197,"context_line":"        phys_switch_id \u003d get_file_data(uplink_rep_phys_switch_id_path)"},{"line_number":198,"context_line":"        if phys_switch_id !\u003d \u0027\u0027:"},{"line_number":199,"context_line":"            logger.info(\"The interface %s is ready\" % pf_name)"},{"line_number":200,"context_line":"            return"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            logger.warning(\"The interface is %s not ready yet, Retrying...\""},{"line_number":203,"context_line":"                           % pf_name)"},{"line_number":204,"context_line":"        time.sleep(1)"},{"line_number":205,"context_line":"        timeout +\u003d 1"},{"line_number":206,"context_line":"    logger.error(\"Timeout to get the interface %s ready\" % pf_name)"},{"line_number":207,"context_line":"    raise"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"def create_rep_link_name_script():"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_6194be8b","line":207,"range":{"start_line":196,"start_character":4,"end_line":207,"end_character":9},"in_reply_to":"9fb8cfa7_5ed715c0","updated":"2019-06-30 14:00:36.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e8d490332a009ff1e9ad983aa5260a4c2fdd745b","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                                       \"phys_switch_id\")"},{"line_number":227,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"},{"line_number":228,"context_line":"    pf_pci \u003d get_pf_pci(pf_name)"},{"line_number":229,"context_line":"    pf_fun_num_match \u003d re.match(\u0027.*?([0-9]+)$\u0027, pf_pci)"},{"line_number":230,"context_line":"    if pf_fun_num_match:"},{"line_number":231,"context_line":"        pf_fun_num \u003d pf_fun_num_match.group(1)"},{"line_number":232,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_be9651ef","line":229,"range":{"start_line":229,"start_character":37,"end_line":229,"end_character":42},"updated":"2019-06-30 10:42:35.000000000","message":"1. you can use \\d instead of [0-9].\n2. it is better to compile the regex\n3. you can do it similar to the this [1]\n\n[1] - https://github.com/openstack/os-vif/blob/master/vif_plug_ovs/linux_net.py#L47","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                                       \"phys_switch_id\")"},{"line_number":227,"context_line":"    phys_switch_id \u003d get_file_data(phys_switch_id_path).strip()"},{"line_number":228,"context_line":"    pf_pci \u003d get_pf_pci(pf_name)"},{"line_number":229,"context_line":"    pf_fun_num_match \u003d re.match(\u0027.*?([0-9]+)$\u0027, pf_pci)"},{"line_number":230,"context_line":"    if pf_fun_num_match:"},{"line_number":231,"context_line":"        pf_fun_num \u003d pf_fun_num_match.group(1)"},{"line_number":232,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_41de5a6d","line":229,"range":{"start_line":229,"start_character":37,"end_line":229,"end_character":42},"in_reply_to":"9fb8cfa7_be9651ef","updated":"2019-06-30 14:00:36.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":251,"context_line":"                     \u0027!\u003d\"\", ATTR{phys_port_name}\u003d\u003d\"pf*vf*\", \u0027\\"},{"line_number":252,"context_line":"                     \u0027ENV{NM_UNMANAGED}\u003d\"1\"\u0027"},{"line_number":253,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def add_udev_rule(udev_data, udev_file):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_7e80d9bf","line":253,"updated":"2019-06-30 10:25:38.000000000","message":"return add_udev_rule(....) ?","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"2a1a5ee19336eecc2431d3a4ae15e04d576fe3bb","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":251,"context_line":"                     \u0027!\u003d\"\", ATTR{phys_port_name}\u003d\u003d\"pf*vf*\", \u0027\\"},{"line_number":252,"context_line":"                     \u0027ENV{NM_UNMANAGED}\u003d\"1\"\u0027"},{"line_number":253,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def add_udev_rule(udev_data, udev_file):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_b5f3cc08","line":253,"in_reply_to":"9fb8cfa7_018f0275","updated":"2019-07-01 07:27:08.000000000","message":"will be more consistent, same as the rest of the add_udev_*\nfunctions.\nThe caller can ignore the value.\nanyway, this poses no issue with the functionality of this commit.","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":251,"context_line":"                     \u0027!\u003d\"\", ATTR{phys_port_name}\u003d\u003d\"pf*vf*\", \u0027\\"},{"line_number":252,"context_line":"                     \u0027ENV{NM_UNMANAGED}\u003d\"1\"\u0027"},{"line_number":253,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def add_udev_rule(udev_data, udev_file):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_018f0275","line":253,"in_reply_to":"9fb8cfa7_7e80d9bf","updated":"2019-06-30 14:00:36.000000000","message":"don\u0027t care about the returned value, no need for trigger","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"2afe2d27d576bf0d5a79623f040734b4b43c58ac","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    udev_data_line \u003d \u0027SUBSYSTEM\u003d\u003d\"net\", ACTION\u003d\u003d\"add\", ATTR{phys_switch_id}\u0027\\"},{"line_number":251,"context_line":"                     \u0027!\u003d\"\", ATTR{phys_port_name}\u003d\u003d\"pf*vf*\", \u0027\\"},{"line_number":252,"context_line":"                     \u0027ENV{NM_UNMANAGED}\u003d\"1\"\u0027"},{"line_number":253,"context_line":"    add_udev_rule(udev_data_line, _UDEV_RULE_FILE)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def add_udev_rule(udev_data, udev_file):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_645ee377","line":253,"in_reply_to":"9fb8cfa7_b5f3cc08","updated":"2019-07-03 05:42:04.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":285,"context_line":"def trigger_udev_rules():"},{"line_number":286,"context_line":"    try:"},{"line_number":287,"context_line":"        processutils.execute(\u0027/usr/sbin/udevadm\u0027, \u0027trigger\u0027, \u0027--action\u003dadd\u0027,"},{"line_number":288,"context_line":"                             \u0027--attr-match\u003dsubsystem\u003dnet\u0027)"},{"line_number":289,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":290,"context_line":"        logger.error(\"Failed to trigger udev rules\")"},{"line_number":291,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_3e6ee12e","line":288,"updated":"2019-06-30 10:25:38.000000000","message":"nit: It may be useful to know if we triggered udev rule processing by adding a msg to the log .","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":285,"context_line":"def trigger_udev_rules():"},{"line_number":286,"context_line":"    try:"},{"line_number":287,"context_line":"        processutils.execute(\u0027/usr/sbin/udevadm\u0027, \u0027trigger\u0027, \u0027--action\u003dadd\u0027,"},{"line_number":288,"context_line":"                             \u0027--attr-match\u003dsubsystem\u003dnet\u0027)"},{"line_number":289,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":290,"context_line":"        logger.error(\"Failed to trigger udev rules\")"},{"line_number":291,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_218a4663","line":288,"in_reply_to":"9fb8cfa7_3e6ee12e","updated":"2019-06-30 14:00:36.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        raise"},{"line_number":310,"context_line":"    logger.info(\"Device pci/%s set to switchdev mode.\" % pf_pci)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    # WA to make sure that the uplink_rep is ready after moving to switchdev"},{"line_number":313,"context_line":"    _wait_for_uplink_rep_creation(pf_name)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_1edd1ddc","line":312,"range":{"start_line":312,"start_character":6,"end_line":312,"end_character":8},"updated":"2019-06-30 10:25:38.000000000","message":"can you elaborate in the comment why this is a workaround, will be useful for other developers?","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        raise"},{"line_number":310,"context_line":"    logger.info(\"Device pci/%s set to switchdev mode.\" % pf_pci)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    # WA to make sure that the uplink_rep is ready after moving to switchdev"},{"line_number":313,"context_line":"    _wait_for_uplink_rep_creation(pf_name)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_c1ea4a0d","line":312,"range":{"start_line":312,"start_character":6,"end_line":312,"end_character":8},"in_reply_to":"9fb8cfa7_1edd1ddc","updated":"2019-06-30 14:00:36.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"dda7835a03dfa80dc2fca0be147d293be73e1b09","unresolved":false,"context_lines":[{"line_number":318,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":319,"context_line":"        logger.error(\"Failed to enable hw-tc-offload\")"},{"line_number":320,"context_line":"        raise"},{"line_number":321,"context_line":"    logger.info(\"Enabled \\\"hw-tc-offload\\\" for PF %s.\" % pf_name)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"def run_ip_config_cmd(*cmd, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_fee1299c","line":321,"range":{"start_line":321,"start_character":4,"end_line":321,"end_character":65},"updated":"2019-06-30 10:25:38.000000000","message":"nit: this can be a part of the try except block after L#317","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":25241,"name":"waleed mousa","email":"waleedm@nvidia.com","username":"waleedm"},"change_message_id":"95320c15bf5726c6f6e64b1d6af67b2902e2293f","unresolved":false,"context_lines":[{"line_number":318,"context_line":"    except processutils.ProcessExecutionError:"},{"line_number":319,"context_line":"        logger.error(\"Failed to enable hw-tc-offload\")"},{"line_number":320,"context_line":"        raise"},{"line_number":321,"context_line":"    logger.info(\"Enabled \\\"hw-tc-offload\\\" for PF %s.\" % pf_name)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"def run_ip_config_cmd(*cmd, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fb8cfa7_e1ed0e25","line":321,"range":{"start_line":321,"start_character":4,"end_line":321,"end_character":65},"in_reply_to":"9fb8cfa7_fee1299c","updated":"2019-06-30 14:00:36.000000000","message":"Done","commit_id":"afe2ca52641f48519b110d5df94f9ed5b95c53c1"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"df1aa19b2034f45ca3bc7a83c9a1d9fe0a40392d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"_SYS_CLASS_NET \u003d \u0027/sys/class/net\u0027"},{"line_number":38,"context_line":"_UDEV_RULE_FILE \u003d \u0027/etc/udev/rules.d/80-persistent-os-net-config.rules\u0027"},{"line_number":39,"context_line":"MAX_RETRIES \u003d 10"},{"line_number":40,"context_line":"PF_FUNC_RE \u003d re.compile(r\"\\.(\\d+)$\", 0)"},{"line_number":41,"context_line":"# In order to keep VF representor name consistent specially after the upgrade"},{"line_number":42,"context_line":"# proccess, we should have a udev rule to handle that."},{"line_number":43,"context_line":"# The udev rule will rename the VF representor as \"\u003csriov_pf_name\u003e_\u003cvf_num\u003e\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fb8cfa7_d956912b","line":40,"updated":"2019-07-03 10:17:27.000000000","message":"nit: technically a PCI function is 3 bits long, so valid values are 0..7\n\nhowever this is good enough to capture the PCI function","commit_id":"188cbd2123f2d21e2b4f05b6aaa9fa8f19ef05ae"}]}
