)]}'
{"bin/i40e_sysfs_command":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2018 AT\u0026T Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_06b8e8c5","line":1,"updated":"2019-07-29 16:58:01.000000000","message":"This is specifically a \"VF trunk\" command. IMO, this should be in the file name.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2018 AT\u0026T Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_2be1199c","line":1,"in_reply_to":"7faddb67_06b8e8c5","updated":"2019-07-31 14:25:36.000000000","message":"Although right now, we use this commands for trunking only, however same command syntax is applicable for several other i40e driver commands as well, i.e. only the arguments change in those cases, for ex. for enabling port mirroring:-\n\nUsage: 1. VLANs to VF mirroring: $0 \u003cphy-device-name\u003e \u003cdest-vf-index\u003e \u003c\u0027vlan_mirror\u0027\u003e \u003c\u0027add\u0027|\u0027rem\u0027\u003e \u003cvlan_ranges_string\u003e\n\nUsage: 2. VF to VF mirroring: $0 \u003cphy-device-name\u003e \u003csrc-vf-index\u003e \u003c\u0027ingress_mirror\u0027|\u0027egress_mirror\u0027\u003e \u003c\u0027add\u0027|\u0027rem\u0027\u003e \u003cdest-vf-index\u003e\"\n\nLater on same bin file can be reused in sriov nic switch driver to leverage some other capability of i40e driver","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2018 AT\u0026T Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_464820cb","line":3,"range":{"start_line":3,"start_character":16,"end_line":3,"end_character":20},"updated":"2019-07-29 16:58:01.000000000","message":"nit: 2019","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"d57b83bafc02232caaba6e5370085ca61dcbfe1f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2018 AT\u0026T Corporation"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_c10e133a","line":3,"range":{"start_line":3,"start_character":16,"end_line":3,"end_character":20},"in_reply_to":"7faddb67_464820cb","updated":"2019-07-31 14:26:27.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if [ -f /sys/class/net/${1}/device/sriov/${2}/${3} ]"},{"line_number":23,"context_line":"then"},{"line_number":24,"context_line":"    echo ${4} ${5} \u003e /sys/class/net/${1}/device/sriov/${2}/${3}"},{"line_number":25,"context_line":"else"},{"line_number":26,"context_line":"    echo \"Invalid sysfs path: /sys/class/net/${1}/device/sriov/${2}/${3}\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"application/octet-stream","patch_set":64,"id":"3fa7e38b_650b32d4","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":63},"updated":"2020-02-18 10:35:23.000000000","message":"I would like someone else opinion on this.\n\nThis script is executing this line here (with the check in L22). Why don\u0027t you add the binary to rootwrap with the needed regular expression check instead of creating this new script?","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if [ -f /sys/class/net/${1}/device/sriov/${2}/${3} ]"},{"line_number":23,"context_line":"then"},{"line_number":24,"context_line":"    echo ${4} ${5} \u003e /sys/class/net/${1}/device/sriov/${2}/${3}"},{"line_number":25,"context_line":"else"},{"line_number":26,"context_line":"    echo \"Invalid sysfs path: /sys/class/net/${1}/device/sriov/${2}/${3}\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"application/octet-stream","patch_set":64,"id":"ff570b3c_51dfdd67","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":63},"in_reply_to":"1fa4df85_ff5b1184","updated":"2020-05-20 16:14:30.000000000","message":"No, what I was suggesting is to remove this script file and have a method making this call:\n\" echo ${4} ${5} \u003e /sys/class/net/${1}/device/sriov/${2}/${3}\"\n\nWhat you are doing here is just writing a file. That could be done natively in Python. Why do we need this script so?\n\nBTW, rootwrap is deprecated. Now we should use only privsep. But as commented, this could be done with python sys methods.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if [ -f /sys/class/net/${1}/device/sriov/${2}/${3} ]"},{"line_number":23,"context_line":"then"},{"line_number":24,"context_line":"    echo ${4} ${5} \u003e /sys/class/net/${1}/device/sriov/${2}/${3}"},{"line_number":25,"context_line":"else"},{"line_number":26,"context_line":"    echo \"Invalid sysfs path: /sys/class/net/${1}/device/sriov/${2}/${3}\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"application/octet-stream","patch_set":64,"id":"1fa4df85_ff5b1184","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":63},"in_reply_to":"3fa7e38b_650b32d4","updated":"2020-03-19 12:26:08.000000000","message":"This script is added already in rootwrap, i.e. https://review.opendev.org/#/c/665467/64/etc/neutron/rootwrap.d/sriovnicswitch-plugin.filters\n\nI had to add this script because earlier when we had tried adding the direct command to rootwrap filter (which goes like: \"echo add \u0027vlan-range-string\u0027 \u003e /sys/class/net/\u003cpf-name\u003e/device/sriov/\u003cvf-index\u003e/trunk\"), we encountered an issue with rootwrap filter that it didn\u0027t support either one of these expressions, i.e. redirection operator \"\u003e\" or backslash \"/\"....","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if [ -f /sys/class/net/${1}/device/sriov/${2}/${3} ]"},{"line_number":23,"context_line":"then"},{"line_number":24,"context_line":"    echo ${4} ${5} \u003e /sys/class/net/${1}/device/sriov/${2}/${3}"},{"line_number":25,"context_line":"else"},{"line_number":26,"context_line":"    echo \"Invalid sysfs path: /sys/class/net/${1}/device/sriov/${2}/${3}\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"application/octet-stream","patch_set":64,"id":"bf51134e_f5eb08d9","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":63},"in_reply_to":"ff570b3c_51dfdd67","updated":"2020-06-18 09:37:24.000000000","message":"ok, I will try to refactor the code to use privsep instead of rootwrap.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"}],"etc/neutron/rootwrap.d/sriovnicswitch-plugin.filters":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# sriov-agent"},{"line_number":12,"context_line":"# This is needed to allow sriov-agent (trunk plugin) to insert/remove vlan filter to the"},{"line_number":13,"context_line":"# target vf under /sys/class/net/[device-name]/device/sriov/[vf-index]/[trunk]"},{"line_number":14,"context_line":"i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?!.*\\.\\..*|.*\\/.*).*, [0-9]+, trunk, (?i)(add|rem), .*"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_26e084cc","line":14,"range":{"start_line":14,"start_character":133,"end_line":14,"end_character":135},"updated":"2019-07-29 16:58:01.000000000","message":"If this should be something like \"100-200\", IMO we should parse it.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# sriov-agent"},{"line_number":12,"context_line":"# This is needed to allow sriov-agent (trunk plugin) to insert/remove vlan filter to the"},{"line_number":13,"context_line":"# target vf under /sys/class/net/[device-name]/device/sriov/[vf-index]/[trunk]"},{"line_number":14,"context_line":"i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?!.*\\.\\..*|.*\\/.*).*, [0-9]+, trunk, (?i)(add|rem), .*"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_e6026c6f","line":14,"range":{"start_line":14,"start_character":80,"end_line":14,"end_character":101},"updated":"2019-07-29 16:58:01.000000000","message":"Is this the regex for a network device name? A bit complex","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# sriov-agent"},{"line_number":12,"context_line":"# This is needed to allow sriov-agent (trunk plugin) to insert/remove vlan filter to the"},{"line_number":13,"context_line":"# target vf under /sys/class/net/[device-name]/device/sriov/[vf-index]/[trunk]"},{"line_number":14,"context_line":"i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?!.*\\.\\..*|.*\\/.*).*, [0-9]+, trunk, (?i)(add|rem), .*"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_1da104f9","line":14,"range":{"start_line":14,"start_character":133,"end_line":14,"end_character":135},"in_reply_to":"7faddb67_26e084cc","updated":"2019-07-31 14:25:36.000000000","message":"This can be anything of this sort:-\n\n1. 9,18,27\n2. 9,18-27\n3. 9,18-27,36-45,54,63-72\n\nIn any case, we can\u0027t really ensure full validity of this vlan ranges string. I had used this regex earlier:-\n\nRANGE_REGEX \u003d r\"^([0-9]+(-[0-9]+)?)(,([0-9]+(-[0-9]+)?))*$\"\n\nHowever this also leaves out certain incorrect usages.\n\nAlso it seems harmless to me from security perspective as well, even if user provides any non-expected value here. It will simply be rejected by i40e driver\n\nWhat do you suggest?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# sriov-agent"},{"line_number":12,"context_line":"# This is needed to allow sriov-agent (trunk plugin) to insert/remove vlan filter to the"},{"line_number":13,"context_line":"# target vf under /sys/class/net/[device-name]/device/sriov/[vf-index]/[trunk]"},{"line_number":14,"context_line":"i40e_sysfs_command: RegExpFilter, i40e_sysfs_command, root, i40e_sysfs_command, (?!.*\\.\\..*|.*\\/.*).*, [0-9]+, trunk, (?i)(add|rem), .*"}],"source_content_type":"application/octet-stream","patch_set":18,"id":"7faddb67_1d2ee491","line":14,"range":{"start_line":14,"start_character":80,"end_line":14,"end_character":101},"in_reply_to":"7faddb67_e6026c6f","updated":"2019-07-31 14:25:36.000000000","message":"Yes, its for device name. This is to ensure that user is not able to insert \u0027/\u0027 or \u0027.\u0027 or \u0027..\u0027 characters in device name","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"}],"neutron/conf/plugins/ml2/drivers/mech_sriov/agent_common.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       \"See also: \""},{"line_number":82,"context_line":"                       \"https://docs.openstack.org/api-ref/placement/\""},{"line_number":83,"context_line":"                       \"#update-resource-provider-inventories\")),"},{"line_number":84,"context_line":"    cfg.StrOpt(\u0027nic_switch_driver\u0027, default\u003d\u0027i40e\u0027,"},{"line_number":85,"context_line":"           help\u003d_(\"Type of SR-IOV NIC Switch driver.\")),"},{"line_number":86,"context_line":"]"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_8598ae7c","line":84,"range":{"start_line":84,"start_character":45,"end_line":84,"end_character":49},"updated":"2020-02-18 10:35:23.000000000","message":"I have some concerns about:\n- The var name: \"nic_driver\" should be enough. Why switch?\n- In sake of having an agnostic default config, I would set this to None.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       \"See also: \""},{"line_number":82,"context_line":"                       \"https://docs.openstack.org/api-ref/placement/\""},{"line_number":83,"context_line":"                       \"#update-resource-provider-inventories\")),"},{"line_number":84,"context_line":"    cfg.StrOpt(\u0027nic_switch_driver\u0027, default\u003d\u0027i40e\u0027,"},{"line_number":85,"context_line":"           help\u003d_(\"Type of SR-IOV NIC Switch driver.\")),"},{"line_number":86,"context_line":"]"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_62046a16","line":84,"range":{"start_line":84,"start_character":45,"end_line":84,"end_character":49},"in_reply_to":"3fa7e38b_8598ae7c","updated":"2020-03-19 12:26:08.000000000","message":"Ok, I will rename to nic_driver. However in order to have a working sriov trunking functionality, we should have the default as whatever is available at the moment, which is \"i40e\".","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":574,"context_line":"                                    rp_inventory_defaults,"},{"line_number":575,"context_line":"                                    rp_hypervisors)"},{"line_number":576,"context_line":"        capabilities.notify_init_event("},{"line_number":577,"context_line":"            n_constants.AGENT_TYPE_NIC_SWITCH, agent)"},{"line_number":578,"context_line":"    except exc.SriovNicError:"},{"line_number":579,"context_line":"        LOG.exception(\"Agent Initialization Failed\")"},{"line_number":580,"context_line":"        raise SystemExit(1)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_e5e4020e","line":577,"updated":"2020-02-18 10:35:23.000000000","message":"Why this? AGENT_TYPE_NIC_SWITCH is for HW offload NICs. This is not related to this feature.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"8a8e06572a2b08271b552a7d7f526c143023a890","unresolved":false,"context_lines":[{"line_number":574,"context_line":"                                    rp_inventory_defaults,"},{"line_number":575,"context_line":"                                    rp_hypervisors)"},{"line_number":576,"context_line":"        capabilities.notify_init_event("},{"line_number":577,"context_line":"            n_constants.AGENT_TYPE_NIC_SWITCH, agent)"},{"line_number":578,"context_line":"    except exc.SriovNicError:"},{"line_number":579,"context_line":"        LOG.exception(\"Agent Initialization Failed\")"},{"line_number":580,"context_line":"        raise SystemExit(1)"}],"source_content_type":"text/x-python","patch_set":64,"id":"df33271e_f8c18782","line":577,"in_reply_to":"3fa7e38b_e5e4020e","updated":"2020-03-23 07:44:43.000000000","message":"Without this code, the trunk and subport related notifications don\u0027t even reach the sriov agent process. I verified it again today.\n\nI think AGENT_TYPE_NIC_SWITCH is agent type for sriov agent and not just HW offload NICs.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":28182,"name":"Jiaping LI","email":"lijiaping@yovole.com","username":"lijiaping"},"change_message_id":"260e613e773ce95784c1dc9eed714cc726218a4c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":50,"context_line":"    import exceptions as exc"},{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_819fee01","line":52,"updated":"2020-06-18 12:02:01.000000000","message":"not remove merge conflict code","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":50,"context_line":"    import exceptions as exc"},{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_bcddf443","line":52,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E225 missing whitespace around operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":50,"context_line":"    import exceptions as exc"},{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_5cd65829","line":52,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E227 missing whitespace around bitwise or shift operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":50,"context_line":"    import exceptions as exc"},{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_7cd35c39","line":52,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E999 SyntaxError: invalid syntax","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    import exceptions as exc"},{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_9ce0f0fc","line":53,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E402 module level import not at top of file","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_3cf1e4ce","line":54,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E225 missing whitespace around operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_dce1c8fe","line":54,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E225 missing whitespace around operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import eswitch_manager as esm"},{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_fce64c16","line":54,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E225 missing whitespace around operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_1cece0f1","line":55,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E402 module level import not at top of file","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_7cbcfcdb","line":56,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E225 missing whitespace around operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"from neutron.privileged.agent.linux import ip_lib as priv_ip_lib"},{"line_number":54,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":55,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent import sriov_nic_capabilities"},{"line_number":56,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e Add SR-IOV ML2 driver support for VLAN trunking."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_5cbf78cf","line":56,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E226 missing whitespace around arithmetic operator","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"}],"neutron/privileged/agent/linux/sysfs_lib.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib import exceptions as n_exc"},{"line_number":16,"context_line":"from neutron import privileged"},{"line_number":17,"context_line":"from oslo_concurrency import processutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_1cc5005c","line":16,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: H306: imports not in alphabetical order (neutron_lib.exceptions, neutron.privileged)","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \u0027/sys/class/net/\u0027 + pf_device + \u0027/device/sriov/\u0027 + \\"},{"line_number":25,"context_line":"        vf_index + reg_name"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":28,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":29,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":30,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_7ca19ca9","line":27,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027os\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        vf_index + reg_name"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":28,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":29,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":30,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"},{"line_number":31,"context_line":"                            (pf_device, vf_index, reg_name))"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_5ca498b9","line":28,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        processutils.execute(*cmd)"},{"line_number":37,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":38,"context_line":"        LOG.error(\"Exception while sysfs write. Exception: %s\", e)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"@privileged.sys_admin_pctxt.entrypoint"},{"line_number":41,"context_line":"def read_sysfs_path(pf_device, vf_index, reg_name):"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_bcab3487","line":38,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":38,"context_line":"        LOG.error(\"Exception while sysfs write. Exception: %s\", e)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"@privileged.sys_admin_pctxt.entrypoint"},{"line_number":41,"context_line":"def read_sysfs_path(pf_device, vf_index, reg_name):"},{"line_number":42,"context_line":"    \"\"\"read sysfs path\"\"\""},{"line_number":43,"context_line":"    sysfs_path \u003d \\"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_9cae3096","line":40,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        \u0027/sys/class/net/\u0027 + pf_device + \u0027/device/sriov/\u0027 + \\"},{"line_number":45,"context_line":"        vf_index + reg_name"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":48,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":49,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":50,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_fc948c46","line":47,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027os\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        vf_index + reg_name"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":48,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":49,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":50,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"},{"line_number":51,"context_line":"                            (pf_device, vf_index, reg_name))"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_dc8f082c","line":48,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    try:"},{"line_number":56,"context_line":"        return processutils.execute(*cmd)"},{"line_number":57,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":58,"context_line":"        LOG.error(\"Exception while sysfs read. Exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_3c9f2460","line":58,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib import exceptions as n_exc"},{"line_number":16,"context_line":"from neutron import privileged"},{"line_number":17,"context_line":"from oslo_concurrency import processutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_3c3f1dd7","line":16,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: H306: imports not in alphabetical order (neutron_lib.exceptions, neutron.privileged)","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \u0027/sys/class/net/\u0027 + pf_device + \u0027/device/sriov/\u0027 + \\"},{"line_number":25,"context_line":"        vf_index + reg_name"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":28,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":29,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":30,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_9c2589c5","line":27,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027os\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        vf_index + reg_name"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":28,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":29,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":30,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"},{"line_number":31,"context_line":"                            (pf_device, vf_index, reg_name))"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_7c2075b1","line":28,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    try:"},{"line_number":36,"context_line":"        processutils.execute(*cmd)"},{"line_number":37,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":38,"context_line":"        LOG.error(\"Exception while sysfs write. Exception: %s\", e)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"@privileged.sys_admin_pctxt.entrypoint"},{"line_number":41,"context_line":"def read_sysfs_path(pf_device, vf_index, reg_name):"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_dc2f019f","line":38,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":38,"context_line":"        LOG.error(\"Exception while sysfs write. Exception: %s\", e)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"@privileged.sys_admin_pctxt.entrypoint"},{"line_number":41,"context_line":"def read_sysfs_path(pf_device, vf_index, reg_name):"},{"line_number":42,"context_line":"    \"\"\"read sysfs path\"\"\""},{"line_number":43,"context_line":"    sysfs_path \u003d \\"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_bc2a0d8d","line":40,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: E302 expected 2 blank lines, found 1","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        \u0027/sys/class/net/\u0027 + pf_device + \u0027/device/sriov/\u0027 + \\"},{"line_number":45,"context_line":"        vf_index + reg_name"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":48,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":49,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":50,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_1c1b3981","line":47,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027os\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        vf_index + reg_name"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    if not os.path.exists(sysfs_path):"},{"line_number":48,"context_line":"        LOG.error(\"Invalid sysfs path\")"},{"line_number":49,"context_line":"        raise n_exc.Invalid(\"Invalid PF Device (%s) and/or \""},{"line_number":50,"context_line":"                            \"VF Index (%s) and/or Register (%s) combination\" %"},{"line_number":51,"context_line":"                            (pf_device, vf_index, reg_name))"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_fc1da573","line":48,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    try:"},{"line_number":56,"context_line":"        return processutils.execute(*cmd)"},{"line_number":57,"context_line":"    except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":58,"context_line":"        LOG.error(\"Exception while sysfs read. Exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_5c15b149","line":58,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027LOG\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"bb0e0751e0f861daaa0cfa206c8f196fb5edfc95","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron import privileged"},{"line_number":16,"context_line":"from neutron_lib import exceptions as n_exc"},{"line_number":17,"context_line":"import os"},{"line_number":18,"context_line":"from oslo_concurrency import processutils"},{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":75,"id":"bf51134e_8e4b7657","line":17,"updated":"2020-06-19 20:36:06.000000000","message":"pep8: I100 Import statements are in the wrong order. import os should be before from neutron_lib","commit_id":"8e4abdbfa40c965778550cb2e2f145d023703810"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5a36e2b7921f4daa7f585385df280750c803dd74","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":"from neutron import privileged"},{"line_number":17,"context_line":"from neutron_lib import exceptions as n_exc"},{"line_number":18,"context_line":"from oslo_concurrency import processutils"},{"line_number":19,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":78,"id":"bf51134e_599914c2","line":16,"updated":"2020-06-22 13:10:21.000000000","message":"pep8: H306: imports not in alphabetical order (os, neutron.privileged)","commit_id":"634df7f4b92722cc5eb49790d0a04a9c94b177ca"}],"neutron/services/trunk/drivers/base.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                      \"with network segmentation_id %(nw_vlan_id)s \","},{"line_number":220,"context_line":"                      {\u0027network\u0027: nw, \u0027port_id\u0027: port_id,"},{"line_number":221,"context_line":"                       \u0027nw_vlan_id\u0027: nw.segments[0][\u0027segmentation_id\u0027]})"},{"line_number":222,"context_line":"            if nw.segments[0][\u0027segmentation_id\u0027]:"},{"line_number":223,"context_line":"                self._port_by_id[port_id][\u0027nw_segmentation_id\u0027] \u003d \\"},{"line_number":224,"context_line":"                    nw.segments[0][\u0027segmentation_id\u0027]"},{"line_number":225,"context_line":"            # # TODO(deepaktiwari): as of now the NIC driver only allows to"},{"line_number":226,"context_line":"            # # put vlan filter if the port network is a flat type. For a vlan"},{"line_number":227,"context_line":"            # # type network port, it doesn;t allow to add more vlans to the"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_85fd0e72","line":224,"range":{"start_line":222,"start_character":13,"end_line":224,"end_character":53},"updated":"2020-02-18 10:35:23.000000000","message":"Is this some kind of lazy loading? Why don\u0027t you set it in \"put_port\"?","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                      \"with network segmentation_id %(nw_vlan_id)s \","},{"line_number":220,"context_line":"                      {\u0027network\u0027: nw, \u0027port_id\u0027: port_id,"},{"line_number":221,"context_line":"                       \u0027nw_vlan_id\u0027: nw.segments[0][\u0027segmentation_id\u0027]})"},{"line_number":222,"context_line":"            if nw.segments[0][\u0027segmentation_id\u0027]:"},{"line_number":223,"context_line":"                self._port_by_id[port_id][\u0027nw_segmentation_id\u0027] \u003d \\"},{"line_number":224,"context_line":"                    nw.segments[0][\u0027segmentation_id\u0027]"},{"line_number":225,"context_line":"            # # TODO(deepaktiwari): as of now the NIC driver only allows to"},{"line_number":226,"context_line":"            # # put vlan filter if the port network is a flat type. For a vlan"},{"line_number":227,"context_line":"            # # type network port, it doesn;t allow to add more vlans to the"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_a5e6f5ae","line":224,"range":{"start_line":222,"start_character":13,"end_line":224,"end_character":53},"in_reply_to":"3fa7e38b_85fd0e72","updated":"2020-03-19 12:26:08.000000000","message":"we need to get two objects (port and network). put_port only creates a new entry for a port without bothering abt the segmentation_id. Then as a second step, for segmentation_id value, network object is fetched","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return self._port_by_id[port_id]"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def get_trunk_for_subport(self, context, port_id):"},{"line_number":239,"context_line":"        \"\"\"Returns trunk if port_id is a subport, else None.\"\"\""},{"line_number":240,"context_line":"        trunk_port \u003d self._sub_port_id_to_trunk_port_id.get(port_id)"},{"line_number":241,"context_line":"        if trunk_port:"},{"line_number":242,"context_line":"            return self.get_trunk(context, trunk_port)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_45a95676","line":242,"range":{"start_line":238,"start_character":0,"end_line":242,"end_character":54},"updated":"2020-02-18 10:35:23.000000000","message":"nit: this should be in the original position, after \"get_trunk\"","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return self._port_by_id[port_id]"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def get_trunk_for_subport(self, context, port_id):"},{"line_number":239,"context_line":"        \"\"\"Returns trunk if port_id is a subport, else None.\"\"\""},{"line_number":240,"context_line":"        trunk_port \u003d self._sub_port_id_to_trunk_port_id.get(port_id)"},{"line_number":241,"context_line":"        if trunk_port:"},{"line_number":242,"context_line":"            return self.get_trunk(context, trunk_port)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_a531155b","line":242,"range":{"start_line":238,"start_character":0,"end_line":242,"end_character":54},"in_reply_to":"3fa7e38b_45a95676","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def put_trunk(self, port_id, trunk):"},{"line_number":175,"context_line":"        if port_id in self._trunk_by_port_id:"},{"line_number":176,"context_line":"            # already existed. expunge sub_port cross ref"},{"line_number":177,"context_line":"            self._sub_port_id_to_trunk_port_id \u003d {"},{"line_number":178,"context_line":"                s: p for s, p in self._sub_port_id_to_trunk_port_id.items()"},{"line_number":179,"context_line":"                if p !\u003d port_id}"},{"line_number":180,"context_line":"        self._trunk_by_port_id[port_id] \u003d trunk"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_4cb46280","line":177,"range":{"start_line":177,"start_character":17,"end_line":177,"end_character":46},"updated":"2020-05-20 16:14:30.000000000","message":"If \"get_trunk_for_subport\" is not being used, this variable is not needed","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def put_trunk(self, port_id, trunk):"},{"line_number":175,"context_line":"        if port_id in self._trunk_by_port_id:"},{"line_number":176,"context_line":"            # already existed. expunge sub_port cross ref"},{"line_number":177,"context_line":"            self._sub_port_id_to_trunk_port_id \u003d {"},{"line_number":178,"context_line":"                s: p for s, p in self._sub_port_id_to_trunk_port_id.items()"},{"line_number":179,"context_line":"                if p !\u003d port_id}"},{"line_number":180,"context_line":"        self._trunk_by_port_id[port_id] \u003d trunk"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_7ec6ad4b","line":177,"range":{"start_line":177,"start_character":17,"end_line":177,"end_character":46},"in_reply_to":"ff570b3c_4cb46280","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            return self.get_trunk(context, port_id)"},{"line_number":200,"context_line":"        return self._trunk_by_port_id[port_id]"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def get_trunk_for_subport(self, context, port_id):"},{"line_number":203,"context_line":"        \"\"\"Returns trunk if port_id is a subport, else None.\"\"\""},{"line_number":204,"context_line":"        trunk_port \u003d self._sub_port_id_to_trunk_port_id.get(port_id)"},{"line_number":205,"context_line":"        if trunk_port:"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_ec5d7679","line":202,"range":{"start_line":202,"start_character":8,"end_line":202,"end_character":29},"updated":"2020-05-20 16:14:30.000000000","message":"Where is this method being used?","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            return self.get_trunk(context, port_id)"},{"line_number":200,"context_line":"        return self._trunk_by_port_id[port_id]"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def get_trunk_for_subport(self, context, port_id):"},{"line_number":203,"context_line":"        \"\"\"Returns trunk if port_id is a subport, else None.\"\"\""},{"line_number":204,"context_line":"        trunk_port \u003d self._sub_port_id_to_trunk_port_id.get(port_id)"},{"line_number":205,"context_line":"        if trunk_port:"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_dec5393e","line":202,"range":{"start_line":202,"start_character":8,"end_line":202,"end_character":29},"in_reply_to":"ff570b3c_ec5d7679","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"}],"neutron/services/trunk/drivers/mech_sriov/agent/driver.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7f0b17bb601ed5df7ac5cdb8fc1f47fa776266c8","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, plumber\u003dNone, sriov_utils\u003dNone, trunk_api\u003dNone):"},{"line_number":46,"context_line":"        super(SriovTrunkDriver, self).__init__()"},{"line_number":47,"context_line":"        self.sriov_utils \u003d sriov_utils or sriov_utils.SriovNicUtils()"},{"line_number":48,"context_line":"        self._plumber \u003d plumber or trunk_plumber.Plumber()"},{"line_number":49,"context_line":"        self._tapi \u003d trunk_api or _TrunkAPI(trunk_rpc.TrunkStub())"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_2625a75c","line":47,"range":{"start_line":47,"start_character":27,"end_line":47,"end_character":53},"updated":"2019-07-16 01:07:05.000000000","message":"this is problematic, since keyword_argument and import are same name, incase sriov_utils argument is None, sriov_utils.SriovNicUtils() will return an error saying None type don\u0027t have attribute.","commit_id":"4f8a5379cafe8b506ed62cb6f1b38b12c38a795a"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"4da77813304e5504f3535ea01702a498c1730416","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, plumber\u003dNone, sriov_utils\u003dNone, trunk_api\u003dNone):"},{"line_number":46,"context_line":"        super(SriovTrunkDriver, self).__init__()"},{"line_number":47,"context_line":"        self.sriov_utils \u003d sriov_utils or sriov_utils.SriovNicUtils()"},{"line_number":48,"context_line":"        self._plumber \u003d plumber or trunk_plumber.Plumber()"},{"line_number":49,"context_line":"        self._tapi \u003d trunk_api or _TrunkAPI(trunk_rpc.TrunkStub())"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7faddb67_72a273fe","line":47,"range":{"start_line":47,"start_character":27,"end_line":47,"end_character":53},"in_reply_to":"7faddb67_2625a75c","updated":"2019-07-16 14:18:33.000000000","message":"This looks like some editing error. The first part is inadvertently put in there. Will remove it. Thanks for pointing out","commit_id":"4f8a5379cafe8b506ed62cb6f1b38b12c38a795a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4dbdb326bd8bb3356daae4b77a87e48c2d111656","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    to trigger backend SRIOV commands for trunks."},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, plumber\u003dNone, sriov_utils\u003dNone, trunk_api\u003dNone):"},{"line_number":46,"context_line":"        super(SriovTrunkDriver, self).__init__()"},{"line_number":47,"context_line":"        self.sriov_utils \u003d sriov_utils.SriovNicUtils()"},{"line_number":48,"context_line":"        self._plumber \u003d plumber or trunk_plumber.Plumber()"}],"source_content_type":"text/x-python","patch_set":12,"id":"7faddb67_39adbee8","line":45,"range":{"start_line":45,"start_character":37,"end_line":45,"end_character":54},"updated":"2019-07-16 18:24:16.000000000","message":"remove this, its not needed","commit_id":"b35f6d2b3b782bf583e6ebea0238265248f29ff1"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"e9ab3380b1686ba55fe7f72bf77ef392ca9344fc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    to trigger backend SRIOV commands for trunks."},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __init__(self, plumber\u003dNone, sriov_utils\u003dNone, trunk_api\u003dNone):"},{"line_number":46,"context_line":"        super(SriovTrunkDriver, self).__init__()"},{"line_number":47,"context_line":"        self.sriov_utils \u003d sriov_utils.SriovNicUtils()"},{"line_number":48,"context_line":"        self._plumber \u003d plumber or trunk_plumber.Plumber()"}],"source_content_type":"text/x-python","patch_set":12,"id":"7faddb67_616298da","line":45,"range":{"start_line":45,"start_character":37,"end_line":45,"end_character":54},"in_reply_to":"7faddb67_39adbee8","updated":"2019-07-16 22:08:19.000000000","message":"Later on, I realized why it was added in first place. To make it uniform (other class objects initialization in same routine) I add it back with changed name.......even though not very significant.....yet just to keep it as close to LB driver code (from where it is copied) as possible....","commit_id":"b35f6d2b3b782bf583e6ebea0238265248f29ff1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    @registry.receives(local_resources.PORT_DEVICE,"},{"line_number":93,"context_line":"                       [local_events.AFTER_UPDATE])"},{"line_number":94,"context_line":"    def agent_port_change(self, resource, event, trigger, payload\u003dNone):"},{"line_number":95,"context_line":"        \"\"\"The agent hath informed us thusly of a port update or create.\"\"\""},{"line_number":96,"context_line":"        port_id \u003d payload.latest_state[\u0027port_id\u0027]"},{"line_number":97,"context_line":"        trunk \u003d self._tapi.get_trunk(payload.context, port_id)"},{"line_number":98,"context_line":"        if trunk:"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_4f4353b0","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":25},"updated":"2019-07-29 16:58:01.000000000","message":"?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    @registry.receives(local_resources.PORT_DEVICE,"},{"line_number":93,"context_line":"                       [local_events.AFTER_UPDATE])"},{"line_number":94,"context_line":"    def agent_port_change(self, resource, event, trigger, payload\u003dNone):"},{"line_number":95,"context_line":"        \"\"\"The agent hath informed us thusly of a port update or create.\"\"\""},{"line_number":96,"context_line":"        port_id \u003d payload.latest_state[\u0027port_id\u0027]"},{"line_number":97,"context_line":"        trunk \u003d self._tapi.get_trunk(payload.context, port_id)"},{"line_number":98,"context_line":"        if trunk:"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_139b3318","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":25},"in_reply_to":"7faddb67_4f4353b0","updated":"2019-07-31 14:25:36.000000000","message":"hath - archaic third person singular present of have :)\nactually this is coming from corresponding linuxbridge function which is base for this sriov driver implementation....","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_6fcbaf52","line":129,"range":{"start_line":129,"start_character":40,"end_line":129,"end_character":49},"updated":"2019-07-29 16:58:01.000000000","message":"\"get_sriov_port_params\" can return None","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_0f923b4c","line":129,"updated":"2019-07-29 16:58:01.000000000","message":"If we hit this branch, what will be the status of \"self._tapi.put_trunk(trunk.port_id, trunk)\" \u003c-- this trunk??","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"543c9152c20fc684bdf15780b6e5087131d90eff","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_7acb6f52","line":129,"range":{"start_line":129,"start_character":15,"end_line":129,"end_character":64},"updated":"2019-07-29 17:46:26.000000000","message":"this conditional doesn\u0027t make sense, as segmentation id is int and src_vlans would be str ?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_f363f718","line":129,"in_reply_to":"7faddb67_0f923b4c","updated":"2019-07-31 14:25:36.000000000","message":"I will add the code to put trunk status to \"degraded\" state as is done in other similar error scenarios. That is how it is handled in linuxbridge driver.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_b369fff8","line":129,"range":{"start_line":129,"start_character":40,"end_line":129,"end_character":49},"in_reply_to":"7faddb67_6fcbaf52","updated":"2019-07-31 14:25:36.000000000","message":"Correct, I\u0027ll put additional checks before using those values","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                            t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_079c49be","line":129,"range":{"start_line":129,"start_character":15,"end_line":129,"end_character":64},"in_reply_to":"7faddb67_7acb6f52","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","},{"line_number":133,"context_line":"                              {\u0027sp_vlan\u0027: s.segmentation_id,"},{"line_number":134,"context_line":"                               \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":135,"context_line":"                raise Exception(_(\"Subport segmentation-id [%(sp_vlan)s] \""},{"line_number":136,"context_line":"                                  \"doesn\u0027t match with segmentation-id \""},{"line_number":137,"context_line":"                                  \"[%(sp_nw_vlan)s] of subport network\") %"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_8f786b2b","line":134,"range":{"start_line":130,"start_character":16,"end_line":134,"end_character":69},"updated":"2019-07-29 16:58:01.000000000","message":"Not needed if you have the next exception.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if s.segmentation_id !\u003d str(sp_params[\u0027src_vlans\u0027]):"},{"line_number":130,"context_line":"                LOG.exception(\"Subport segmentation-id %(sp_vlan)s doesn\u0027t \""},{"line_number":131,"context_line":"                              \"match with segmentation-id %(sp_nw_vlan)s of \""},{"line_number":132,"context_line":"                              \"subport network\","},{"line_number":133,"context_line":"                              {\u0027sp_vlan\u0027: s.segmentation_id,"},{"line_number":134,"context_line":"                               \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":135,"context_line":"                raise Exception(_(\"Subport segmentation-id [%(sp_vlan)s] \""},{"line_number":136,"context_line":"                                  \"doesn\u0027t match with segmentation-id \""},{"line_number":137,"context_line":"                                  \"[%(sp_nw_vlan)s] of subport network\") %"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_7d74b868","line":134,"range":{"start_line":130,"start_character":16,"end_line":134,"end_character":69},"in_reply_to":"7faddb67_8f786b2b","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                              \"subport network\","},{"line_number":133,"context_line":"                              {\u0027sp_vlan\u0027: s.segmentation_id,"},{"line_number":134,"context_line":"                               \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":135,"context_line":"                raise Exception(_(\"Subport segmentation-id [%(sp_vlan)s] \""},{"line_number":136,"context_line":"                                  \"doesn\u0027t match with segmentation-id \""},{"line_number":137,"context_line":"                                  \"[%(sp_nw_vlan)s] of subport network\") %"},{"line_number":138,"context_line":"                                {\u0027sp_vlan\u0027: s.segmentation_id,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_4f72734b","line":135,"range":{"start_line":135,"start_character":22,"end_line":135,"end_character":31},"updated":"2019-07-29 16:58:01.000000000","message":"Create a specific exception in https://review.opendev.org/#/c/665467/18/neutron/services/trunk/drivers/mech_sriov/agent/exceptions.py","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                              \"subport network\","},{"line_number":133,"context_line":"                              {\u0027sp_vlan\u0027: s.segmentation_id,"},{"line_number":134,"context_line":"                               \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":135,"context_line":"                raise Exception(_(\"Subport segmentation-id [%(sp_vlan)s] \""},{"line_number":136,"context_line":"                                  \"doesn\u0027t match with segmentation-id \""},{"line_number":137,"context_line":"                                  \"[%(sp_nw_vlan)s] of subport network\") %"},{"line_number":138,"context_line":"                                {\u0027sp_vlan\u0027: s.segmentation_id,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_16056111","line":135,"range":{"start_line":135,"start_character":22,"end_line":135,"end_character":31},"in_reply_to":"7faddb67_4f72734b","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                 \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            vlans_ranges_str \u003d \\"},{"line_number":142,"context_line":"                vlans_ranges_str + \",\" + str(sp_params[\u0027src_vlans\u0027])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            tp_params \u003d self.get_sriov_port_params(context, trunk.port_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_2fc5b73c","line":142,"range":{"start_line":142,"start_character":45,"end_line":142,"end_character":54},"updated":"2019-07-29 16:58:01.000000000","message":"ditto: \"get_sriov_port_params\" can return None","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                 \u0027sp_nw_vlan\u0027: sp_params[\u0027src_vlans\u0027]})"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            vlans_ranges_str \u003d \\"},{"line_number":142,"context_line":"                vlans_ranges_str + \",\" + str(sp_params[\u0027src_vlans\u0027])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        try:"},{"line_number":145,"context_line":"            tp_params \u003d self.get_sriov_port_params(context, trunk.port_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_162ec191","line":142,"range":{"start_line":142,"start_character":45,"end_line":142,"end_character":54},"in_reply_to":"7faddb67_2fc5b73c","updated":"2019-07-31 14:25:36.000000000","message":"will put checks","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            LOG.exception(\"Failure setting up subports for %s\", trunk.port_id)"},{"line_number":152,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":153,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":154,"context_line":"            return"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def unwire_trunk(self, context, trunk):"},{"line_number":157,"context_line":"        \"\"\"Unwire subports while keeping the server trunk status apprised.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_2f4ff7bd","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":18},"updated":"2019-07-29 16:58:01.000000000","message":"unneeded","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            LOG.exception(\"Failure setting up subports for %s\", trunk.port_id)"},{"line_number":152,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":153,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":154,"context_line":"            return"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def unwire_trunk(self, context, trunk):"},{"line_number":157,"context_line":"        \"\"\"Unwire subports while keeping the server trunk status apprised.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_1dd90456","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":18},"in_reply_to":"7faddb67_2f4ff7bd","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":169,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def delete_trunk_subport(self, context, trunk_id, subport):"},{"line_number":172,"context_line":"        \"\"\"Remove subport from trunk.\"\"\""},{"line_number":173,"context_line":"        LOG.debug(\"Deleting subport %(sub)s from trunk %(trunk)s\","},{"line_number":174,"context_line":"                  dict(sub\u003dsubport, trunk\u003dtrunk_id))"},{"line_number":175,"context_line":"        self._tapi.delete_trunk_subport(trunk_id, subport)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def get_sriov_port_params(self, context, port_id):"},{"line_number":178,"context_line":"        \"\"\"Fetch Sriov parameters for a given port_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_8f506b60","line":175,"range":{"start_line":171,"start_character":0,"end_line":175,"end_character":58},"updated":"2019-07-29 16:58:01.000000000","message":"Unneeded, _TrunkAPI provides log information","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":169,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def delete_trunk_subport(self, context, trunk_id, subport):"},{"line_number":172,"context_line":"        \"\"\"Remove subport from trunk.\"\"\""},{"line_number":173,"context_line":"        LOG.debug(\"Deleting subport %(sub)s from trunk %(trunk)s\","},{"line_number":174,"context_line":"                  dict(sub\u003dsubport, trunk\u003dtrunk_id))"},{"line_number":175,"context_line":"        self._tapi.delete_trunk_subport(trunk_id, subport)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def get_sriov_port_params(self, context, port_id):"},{"line_number":178,"context_line":"        \"\"\"Fetch Sriov parameters for a given port_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_fddd0814","line":175,"range":{"start_line":171,"start_character":0,"end_line":175,"end_character":58},"in_reply_to":"7faddb67_8f506b60","updated":"2019-07-31 14:25:36.000000000","message":"Earlier, there was some extra tasks being done during subport removal from trunk, that\u0027s why I had to create this new routine. However later on those were not required. So I will remove this routine now.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        port \u003d self._tapi.fetch_port(context, port_id)"},{"line_number":180,"context_line":"        if port:"},{"line_number":181,"context_line":"            return self.sriov_utils.get_sriov_port_params(port)"},{"line_number":182,"context_line":"        return None"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def trunk_on_host(self, context, trunk):"},{"line_number":185,"context_line":"        \"\"\"Returns true if trunk port VF is present on the host.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_cf8503d1","line":182,"range":{"start_line":182,"start_character":8,"end_line":182,"end_character":19},"updated":"2019-07-29 16:58:01.000000000","message":"unneeded","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        port \u003d self._tapi.fetch_port(context, port_id)"},{"line_number":180,"context_line":"        if port:"},{"line_number":181,"context_line":"            return self.sriov_utils.get_sriov_port_params(port)"},{"line_number":182,"context_line":"        return None"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def trunk_on_host(self, context, trunk):"},{"line_number":185,"context_line":"        \"\"\"Returns true if trunk port VF is present on the host.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_bdb23005","line":182,"range":{"start_line":182,"start_character":8,"end_line":182,"end_character":19},"in_reply_to":"7faddb67_cf8503d1","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        return False"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class _TrunkAPI(lb_trunk_driver._TrunkAPI):"},{"line_number":195,"context_line":"    \"\"\"Our secret stash of trunks stored by port ID. Tell no one.\"\"\""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def __init__(self, trunk_stub):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_6fdacfe9","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":41},"updated":"2019-07-29 16:58:01.000000000","message":"We should not import from other driver. Instead of this, we can create a abs class in trunk/drivers:\n\n@six.add_metaclass(abc.ABCMeta)\nTrunkAPI():\n...\n\n\nBut you should:\n- Implement the common methods.\n- Remove from this abs class those methods only used in Linux Bridge (and the same fro SRIOV).","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        return False"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class _TrunkAPI(lb_trunk_driver._TrunkAPI):"},{"line_number":195,"context_line":"    \"\"\"Our secret stash of trunks stored by port ID. Tell no one.\"\"\""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def __init__(self, trunk_stub):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_476001d0","line":194,"range":{"start_line":194,"start_character":16,"end_line":194,"end_character":41},"in_reply_to":"7faddb67_6fdacfe9","updated":"2019-07-31 14:25:36.000000000","message":"This class is a generic one which maintains a data store of trunks and subports. So ideally each of its routine is equally relevant to both LBDriver or SRIOV driver. So I am thinking to move this class to trunks/drivers/base.py as an normal class instead of an abstract class as you mentioned. I will keep all the routines in this base class itself, even if some of them might not be currently used in any one of the drivers, this is because they are relevant for both drivers and independent of them. This class can be used directly in both drivers. Do you agree with this approach?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":214,"context_line":"                t_const.TRUNK_DOWN_STATUS)"},{"line_number":215,"context_line":"        except Exception:"},{"line_number":216,"context_line":"            # something broke"},{"line_number":217,"context_line":"            LOG.exception(\"Failure unwiring subports for %s\", trunk.port_id)"},{"line_number":218,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":219,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_6531f258","line":216,"range":{"start_line":216,"start_character":12,"end_line":216,"end_character":29},"updated":"2020-02-18 10:35:23.000000000","message":"Do we need this? (same comment in other lines)","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":214,"context_line":"                t_const.TRUNK_DOWN_STATUS)"},{"line_number":215,"context_line":"        except Exception:"},{"line_number":216,"context_line":"            # something broke"},{"line_number":217,"context_line":"            LOG.exception(\"Failure unwiring subports for %s\", trunk.port_id)"},{"line_number":218,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":219,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_022256a5","line":216,"range":{"start_line":216,"start_character":12,"end_line":216,"end_character":29},"in_reply_to":"3fa7e38b_6531f258","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def trunk_on_host(self, context, trunk):"},{"line_number":230,"context_line":"        \"\"\"Returns true if trunk port VF is present on the host.\"\"\""},{"line_number":231,"context_line":"        # ToDo visit later"},{"line_number":232,"context_line":"        host \u003d cfg.CONF.host"},{"line_number":233,"context_line":"        tp \u003d self._tapi.get_port(context, trunk.port_id)"},{"line_number":234,"context_line":"        if tp and tp[\u0027port\u0027][\u0027bindings\u0027][0][\u0027host\u0027] \u003d\u003d host:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_8522ee0d","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":26},"updated":"2020-02-18 10:35:23.000000000","message":"?","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def trunk_on_host(self, context, trunk):"},{"line_number":230,"context_line":"        \"\"\"Returns true if trunk port VF is present on the host.\"\"\""},{"line_number":231,"context_line":"        # ToDo visit later"},{"line_number":232,"context_line":"        host \u003d cfg.CONF.host"},{"line_number":233,"context_line":"        tp \u003d self._tapi.get_port(context, trunk.port_id)"},{"line_number":234,"context_line":"        if tp and tp[\u0027port\u0027][\u0027bindings\u0027][0][\u0027host\u0027] \u003d\u003d host:"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_8235e6dc","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":26},"in_reply_to":"3fa7e38b_8522ee0d","updated":"2020-03-19 12:26:08.000000000","message":"forgot to remove this comment after implementing the routine. Will remove it","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                     {\u0027trunk_id\u0027: trunk.id, \u0027event_type\u0027: event_type,"},{"line_number":66,"context_line":"                      \u0027tp_id\u0027: trunk.port_id})"},{"line_number":67,"context_line":"            if event_type in (events.UPDATED, events.CREATED):"},{"line_number":68,"context_line":"                self._tapi.put_trunk(trunk.port_id, trunk)"},{"line_number":69,"context_line":"                self.wire_trunk(context, trunk)"},{"line_number":70,"context_line":"            elif event_type \u003d\u003d events.DELETED:"},{"line_number":71,"context_line":"                self.unwire_trunk(context, trunk)"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_8ed4af49","line":68,"updated":"2020-05-20 16:14:30.000000000","message":"+1 to handle the existence or not of the trunk inside the method.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            LOG.info(\"Trunk %s not present on this host\", trunk.port_id)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":"        self._tapi.bind_subports_to_host(context, trunk)"},{"line_number":117,"context_line":"        vlans_ranges_str \u003d \"\""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        for s in trunk.sub_ports:"},{"line_number":120,"context_line":"            LOG.info(\"wire_trunk subport (%s)\", s)"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_2e4e4337","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":24},"updated":"2020-05-20 16:14:30.000000000","message":"please, do not handle a list of items with a string. Use a list and then, in \"apply_vlan_filter\", format them.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # network port, we append trunk port vlan also to vlan list allowed"},{"line_number":157,"context_line":"        # to pass through the trunk port."},{"line_number":158,"context_line":"        if tp_params[\u0027nw_segmentation_id\u0027] and \\"},{"line_number":159,"context_line":"           tp_params[\u0027nw_segmentation_id\u0027] !\u003d \u00270\u0027:"},{"line_number":160,"context_line":"            LOG.info(\"wire_trunk tp_params[\u0027nw_seg_id\u0027] (%s)\","},{"line_number":161,"context_line":"                     tp_params[\u0027nw_segmentation_id\u0027])"},{"line_number":162,"context_line":"            vlans_ranges_str \u003d self._append_vlan_str(vlans_ranges_str,"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_ce822700","line":159,"range":{"start_line":159,"start_character":11,"end_line":159,"end_character":49},"updated":"2020-05-20 16:14:30.000000000","message":"1) Why comparing it to a string? This comes from a network segment and should be an integer. In any case, you should also force the type to int when assigning this value.\n\n2) when the seg_id is going to be 0? This is not a valid VLAN tag","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # network port, we append trunk port vlan also to vlan list allowed"},{"line_number":157,"context_line":"        # to pass through the trunk port."},{"line_number":158,"context_line":"        if tp_params[\u0027nw_segmentation_id\u0027] and \\"},{"line_number":159,"context_line":"           tp_params[\u0027nw_segmentation_id\u0027] !\u003d \u00270\u0027:"},{"line_number":160,"context_line":"            LOG.info(\"wire_trunk tp_params[\u0027nw_seg_id\u0027] (%s)\","},{"line_number":161,"context_line":"                     tp_params[\u0027nw_segmentation_id\u0027])"},{"line_number":162,"context_line":"            vlans_ranges_str \u003d self._append_vlan_str(vlans_ranges_str,"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_fe647d4b","line":159,"range":{"start_line":159,"start_character":11,"end_line":159,"end_character":49},"in_reply_to":"ff570b3c_ce822700","updated":"2020-06-18 09:37:24.000000000","message":"1. Yes this is from neutron.objects.network.Network.get_object routine in trunk/rpc/server.py file. And this is string only. This code is verified in our lab.\n\n2. For trunk ports (for a flat provider network or a vlan type provider network with 0 segmentation-id) the segmentation_id tag is \u00270\u0027.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            return"},{"line_number":181,"context_line":"        tp_params \u003d self.get_sriov_port_params(context, trunk.port_id)"},{"line_number":182,"context_line":"        if not tp_params:"},{"line_number":183,"context_line":"            # something broke"},{"line_number":184,"context_line":"            LOG.exception(\"Failure fetching trunk port parameters for \""},{"line_number":185,"context_line":"                          \"trunk port-id: %(tp_id)s.\","},{"line_number":186,"context_line":"                          {\u0027tp_id\u0027: trunk.port_id})"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_2c100e4e","line":183,"range":{"start_line":183,"start_character":11,"end_line":183,"end_character":29},"updated":"2020-05-20 16:14:30.000000000","message":"?? We don\u0027t need this comment","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            return"},{"line_number":181,"context_line":"        tp_params \u003d self.get_sriov_port_params(context, trunk.port_id)"},{"line_number":182,"context_line":"        if not tp_params:"},{"line_number":183,"context_line":"            # something broke"},{"line_number":184,"context_line":"            LOG.exception(\"Failure fetching trunk port parameters for \""},{"line_number":185,"context_line":"                          \"trunk port-id: %(tp_id)s.\","},{"line_number":186,"context_line":"                          {\u0027tp_id\u0027: trunk.port_id})"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_3e5f1573","line":183,"range":{"start_line":183,"start_character":11,"end_line":183,"end_character":29},"in_reply_to":"ff570b3c_2c100e4e","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":196,"context_line":"                t_const.TRUNK_DOWN_STATUS)"},{"line_number":197,"context_line":"        except Exception:"},{"line_number":198,"context_line":"            # something broke"},{"line_number":199,"context_line":"            LOG.exception(\"Failure unwiring subports for %s\", trunk.port_id)"},{"line_number":200,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":201,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_4c15823f","line":198,"range":{"start_line":198,"start_character":12,"end_line":198,"end_character":29},"updated":"2020-05-20 16:14:30.000000000","message":"??","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":196,"context_line":"                t_const.TRUNK_DOWN_STATUS)"},{"line_number":197,"context_line":"        except Exception:"},{"line_number":198,"context_line":"            # something broke"},{"line_number":199,"context_line":"            LOG.exception(\"Failure unwiring subports for %s\", trunk.port_id)"},{"line_number":200,"context_line":"            self._tapi.set_trunk_status(context, trunk,"},{"line_number":201,"context_line":"                                        t_const.TRUNK_DEGRADED_STATUS)"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_de4ff9ba","line":198,"range":{"start_line":198,"start_character":12,"end_line":198,"end_character":29},"in_reply_to":"ff570b3c_4c15823f","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        port \u003d self._tapi.get_port(context, port_id)"},{"line_number":206,"context_line":"        if port and port[\u0027port\u0027]:"},{"line_number":207,"context_line":"            port_params \u003d self.sriov_utils.get_sriov_port_params(port[\u0027port\u0027])"},{"line_number":208,"context_line":"            port_params[\u0027nw_segmentation_id\u0027] \u003d port[\u0027nw_segmentation_id\u0027]"},{"line_number":209,"context_line":"            return port_params"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def trunk_on_host(self, context, trunk):"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_6c16864b","line":208,"range":{"start_line":208,"start_character":12,"end_line":208,"end_character":23},"updated":"2020-05-20 16:14:30.000000000","message":"\"port_params\" could be None, you need to handle this","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        port \u003d self._tapi.get_port(context, port_id)"},{"line_number":206,"context_line":"        if port and port[\u0027port\u0027]:"},{"line_number":207,"context_line":"            port_params \u003d self.sriov_utils.get_sriov_port_params(port[\u0027port\u0027])"},{"line_number":208,"context_line":"            port_params[\u0027nw_segmentation_id\u0027] \u003d port[\u0027nw_segmentation_id\u0027]"},{"line_number":209,"context_line":"            return port_params"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def trunk_on_host(self, context, trunk):"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_7efead38","line":208,"range":{"start_line":208,"start_character":12,"end_line":208,"end_character":23},"in_reply_to":"ff570b3c_6c16864b","updated":"2020-06-18 09:37:24.000000000","message":"Although the get_sriov_port_params would is not returning none but I will put a check","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    def _append_vlan_str(self, vlans_ranges_str, vlan_str):"},{"line_number":220,"context_line":"        vlan \u003d str(vlan_str)"},{"line_number":221,"context_line":"        if vlan \u003d\u003d \u00270\u0027:"},{"line_number":222,"context_line":"            vlan \u003d constants.VLAN_RANGE"},{"line_number":223,"context_line":"        return (vlans_ranges_str + \",\" + vlan) if vlans_ranges_str else vlan"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_eed72bbe","line":222,"updated":"2020-05-20 16:14:30.000000000","message":"If this condition happens (I don\u0027t know when), you can\u0027t merge this string with \"vlans_ranges_str\". It doesn\u0027t make sense.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    def _append_vlan_str(self, vlans_ranges_str, vlan_str):"},{"line_number":220,"context_line":"        vlan \u003d str(vlan_str)"},{"line_number":221,"context_line":"        if vlan \u003d\u003d \u00270\u0027:"},{"line_number":222,"context_line":"            vlan \u003d constants.VLAN_RANGE"},{"line_number":223,"context_line":"        return (vlans_ranges_str + \",\" + vlan) if vlans_ranges_str else vlan"}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_7e5a2d50","line":222,"in_reply_to":"ff570b3c_eed72bbe","updated":"2020-06-18 09:37:24.000000000","message":"This will happen when any of the subport network is of type flat provider. Yes it doesn\u0027t make sense appending vlan_ranges_str with whole vlan range. But it still works with the driver. Anyways I\u0027ll update the code","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.services.trunk.drivers import base as trunk_driver"},{"line_number":24,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent import exceptions \\"},{"line_number":25,"context_line":"    as trunk_exc"},{"line_number":26,"context_line":"from neutron.services.trunk.drivers.mech_sriov import constants"},{"line_number":27,"context_line":"from neutron.services.trunk.drivers.mech_sriov import utils as sriov_utils"},{"line_number":28,"context_line":"from neutron.services.trunk.rpc import agent as trunk_rpc"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_3c1c4411","line":26,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F811 redefinition of unused \u0027constants\u0027 from line 17","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if sp_params[\u0027nw_segmentation_id\u0027] \u003d\u003d 0:"},{"line_number":140,"context_line":"                vlan_list.append("},{"line_number":141,"context_line":"                    range(constants.MIN_VLAN_TAG,constants.MAX_VLAN_TAG + 1))"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                vlan_list.append(sp_params[\u0027nw_segmentation_id\u0027])"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_1c17c0ef","line":141,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E231 missing whitespace after \u0027,\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.services.trunk.drivers import base as trunk_driver"},{"line_number":24,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent import exceptions \\"},{"line_number":25,"context_line":"    as trunk_exc"},{"line_number":26,"context_line":"from neutron.services.trunk.drivers.mech_sriov import constants"},{"line_number":27,"context_line":"from neutron.services.trunk.drivers.mech_sriov import utils as sriov_utils"},{"line_number":28,"context_line":"from neutron.services.trunk.rpc import agent as trunk_rpc"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_1f004b01","line":26,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F811 redefinition of unused \u0027constants\u0027 from line 17","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if sp_params[\u0027nw_segmentation_id\u0027] \u003d\u003d 0:"},{"line_number":140,"context_line":"                vlan_list.append("},{"line_number":141,"context_line":"                    range(constants.MIN_VLAN_TAG,constants.MAX_VLAN_TAG + 1))"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                vlan_list.append(sp_params[\u0027nw_segmentation_id\u0027])"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_ff02b708","line":141,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: E231 missing whitespace after \u0027,\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"}],"neutron/services/trunk/drivers/mech_sriov/agent/plumber_base.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class TrunkPlumberBase(object):"},{"line_number":22,"context_line":"    \"\"\"Defines stable abstract interface for Sriov Agent Plumber.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_e515e296","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":31},"updated":"2020-02-18 10:35:23.000000000","message":"class TrunkPlumberBase(object, metaclass\u003dabc.ABCMeta):","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class TrunkPlumberBase(object):"},{"line_number":22,"context_line":"    \"\"\"Defines stable abstract interface for Sriov Agent Plumber.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_718ca1d6","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":31},"in_reply_to":"1fa4df85_62a0eaf5","updated":"2020-05-20 16:14:30.000000000","message":"Please, don\u0027t use six anymore. Use the py3 way.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class TrunkPlumberBase(object):"},{"line_number":22,"context_line":"    \"\"\"Defines stable abstract interface for Sriov Agent Plumber.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_62a0eaf5","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":31},"in_reply_to":"3fa7e38b_e515e296","updated":"2020-03-19 12:26:08.000000000","message":"I see that at all other places in existing neutron code its the same syntax (i.e. @six.add_metaclass(abc.ABCMeta)) which has been followed. Should I change it here?","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class TrunkPlumberBase(object):"},{"line_number":22,"context_line":"    \"\"\"Defines stable abstract interface for Sriov Agent Plumber.\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_3222efbb","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":31},"in_reply_to":"ff570b3c_718ca1d6","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"}],"neutron/services/trunk/drivers/mech_sriov/agent/plumbers/i40e.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def apply_vlan_filter(self, port_params, vlans_ranges_str):"},{"line_number":41,"context_line":"        \"\"\"Idempotent wiring for a trunk\u0027s subports."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        LOG.info(\"vlans_ranges_str (%s)\", vlans_ranges_str)"},{"line_number":45,"context_line":"        if not port_params:"},{"line_number":46,"context_line":"            LOG.error(\"Invalid port_params\")"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_912055f9","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":11},"updated":"2020-05-20 16:14:30.000000000","message":"micro nit: can you put this in L43?","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def apply_vlan_filter(self, port_params, vlans_ranges_str):"},{"line_number":41,"context_line":"        \"\"\"Idempotent wiring for a trunk\u0027s subports."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        LOG.info(\"vlans_ranges_str (%s)\", vlans_ranges_str)"},{"line_number":45,"context_line":"        if not port_params:"},{"line_number":46,"context_line":"            LOG.error(\"Invalid port_params\")"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_cdbadb08","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":11},"in_reply_to":"ff570b3c_912055f9","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \"\"\"Idempotent wiring for a trunk\u0027s subports."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        LOG.info(\"vlans_ranges_str (%s)\", vlans_ranges_str)"},{"line_number":45,"context_line":"        if not port_params:"},{"line_number":46,"context_line":"            LOG.error(\"Invalid port_params\")"},{"line_number":47,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_51587d86","line":44,"range":{"start_line":44,"start_character":18,"end_line":44,"end_character":34},"updated":"2020-05-20 16:14:30.000000000","message":"Because this is going to be a INFO message, I would suggest to rephrase it","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \"\"\"Idempotent wiring for a trunk\u0027s subports."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        LOG.info(\"vlans_ranges_str (%s)\", vlans_ranges_str)"},{"line_number":45,"context_line":"        if not port_params:"},{"line_number":46,"context_line":"            LOG.error(\"Invalid port_params\")"},{"line_number":47,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_edbd1f03","line":44,"range":{"start_line":44,"start_character":18,"end_line":44,"end_character":34},"in_reply_to":"ff570b3c_51587d86","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                   \u0027port_params\u0027: port_params,"},{"line_number":83,"context_line":"                   \u0027vlans_ranges_str\u0027: vlans_ranges_str})"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        commit_cmd \u003d [\u0027i40e_sysfs_command\u0027,"},{"line_number":86,"context_line":"                      port_params[\u0027pf_device\u0027],"},{"line_number":87,"context_line":"                      port_params[\u0027vf_index\u0027],"},{"line_number":88,"context_line":"                      \u0027trunk\u0027,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_c57786d2","line":85,"updated":"2020-02-18 10:35:23.000000000","message":"As commented in the script, this could be directly the binary with the needed checks done in the script.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                   \u0027port_params\u0027: port_params,"},{"line_number":83,"context_line":"                   \u0027vlans_ranges_str\u0027: vlans_ranges_str})"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        commit_cmd \u003d [\u0027i40e_sysfs_command\u0027,"},{"line_number":86,"context_line":"                      port_params[\u0027pf_device\u0027],"},{"line_number":87,"context_line":"                      port_params[\u0027vf_index\u0027],"},{"line_number":88,"context_line":"                      \u0027trunk\u0027,"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_02a57604","line":85,"in_reply_to":"3fa7e38b_c57786d2","updated":"2020-03-19 12:26:08.000000000","message":"Replied in the original comment","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":97,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":98,"context_line":"                      \"Exception: %s\", e)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _port_lock(self, port_dev):"},{"line_number":102,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_459636f1","line":99,"updated":"2020-02-18 10:35:23.000000000","message":"And is ok returning from this exception??","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":97,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":98,"context_line":"                      \"Exception: %s\", e)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _port_lock(self, port_dev):"},{"line_number":102,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_020ed68c","line":99,"in_reply_to":"3fa7e38b_459636f1","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                      \"Exception: %s\", e)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _port_lock(self, port_dev):"},{"line_number":102,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"},{"line_number":103,"context_line":"        return lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _get_pf_vf_name(self, pf_device, vf_index):"},{"line_number":106,"context_line":"        \"\"\"Convert pf_device/vf_index into device name format.\"\"\""}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_45e15697","line":103,"range":{"start_line":101,"start_character":33,"end_line":103,"end_character":69},"updated":"2020-02-18 10:35:23.000000000","message":"Do you really need this?\n\nIn L52 you can directly use .lock\n\n  with lockutils.lock(\u0027trunk-%s\u0027 % port_dev):","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                      \"Exception: %s\", e)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _port_lock(self, port_dev):"},{"line_number":102,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"},{"line_number":103,"context_line":"        return lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _get_pf_vf_name(self, pf_device, vf_index):"},{"line_number":106,"context_line":"        \"\"\"Convert pf_device/vf_index into device name format.\"\"\""}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_42e92e18","line":103,"range":{"start_line":101,"start_character":33,"end_line":103,"end_character":69},"in_reply_to":"3fa7e38b_45e15697","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if not (pf_device and vf_index):"},{"line_number":108,"context_line":"            LOG.warning(\"Invalid pf_device and/or vf_index, \""},{"line_number":109,"context_line":"                        \"will lead to incorrect tap device name\")"},{"line_number":110,"context_line":"        pf_vf_name \u003d (constants.VF_DEVICE_PREFIX +"},{"line_number":111,"context_line":"                      pf_device[:constants.RESOURCE_ID_LENGTH] +"},{"line_number":112,"context_line":"                      vf_index)"},{"line_number":113,"context_line":"        return pf_vf_name"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_e58642b8","line":110,"range":{"start_line":110,"start_character":8,"end_line":110,"end_character":18},"updated":"2020-02-18 10:35:23.000000000","message":"return (constants.....","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if not (pf_device and vf_index):"},{"line_number":108,"context_line":"            LOG.warning(\"Invalid pf_device and/or vf_index, \""},{"line_number":109,"context_line":"                        \"will lead to incorrect tap device name\")"},{"line_number":110,"context_line":"        pf_vf_name \u003d (constants.VF_DEVICE_PREFIX +"},{"line_number":111,"context_line":"                      pf_device[:constants.RESOURCE_ID_LENGTH] +"},{"line_number":112,"context_line":"                      vf_index)"},{"line_number":113,"context_line":"        return pf_vf_name"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_a2b58233","line":110,"range":{"start_line":110,"start_character":8,"end_line":110,"end_character":18},"in_reply_to":"3fa7e38b_e58642b8","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            self._execute_sysfs_command("},{"line_number":56,"context_line":"                \u0027rem\u0027,"},{"line_number":57,"context_line":"                port_params,"},{"line_number":58,"context_line":"                constants.VLAN_RANGE)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            if vlans_ranges_str:"},{"line_number":61,"context_line":"                self._execute_sysfs_command("}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_312fc688","line":58,"range":{"start_line":58,"start_character":26,"end_line":58,"end_character":36},"updated":"2020-05-20 16:14:30.000000000","message":"1) This name is misleading.\n\n2) This should be something private to this plumber.\n\n3) If I\u0027m not wrong, with this operation you are removing any VLAN on a VF, and should be \"0-4095\" (according to L77). But this is not the info stored in this constant.\n\n4) Is that correct? To wire a new subport you first need to delete any VLAN on this VF. That will imply some short of network breakdown for the existing ports.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            self._execute_sysfs_command("},{"line_number":56,"context_line":"                \u0027rem\u0027,"},{"line_number":57,"context_line":"                port_params,"},{"line_number":58,"context_line":"                constants.VLAN_RANGE)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            if vlans_ranges_str:"},{"line_number":61,"context_line":"                self._execute_sysfs_command("}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_9f4dbbc6","line":58,"range":{"start_line":58,"start_character":26,"end_line":58,"end_character":36},"in_reply_to":"ff570b3c_312fc688","updated":"2020-06-18 09:37:24.000000000","message":"1. Name updated\n2. Done\n3. Done\n4. Yes, that is correct. But, with privsep and python lib routines, I will try to do away with this logic to remove all vlans for a new subport addition.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron.agent.linux import utils"},{"line_number":16,"context_line":"from neutron.privileged.agent.linux import sysfs_lib"},{"line_number":17,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent import plumber_base"},{"line_number":18,"context_line":"from neutron.services.trunk.drivers.mech_sriov import constants"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_bcb694f9","line":15,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F401 \u0027neutron.agent.linux.utils\u0027 imported but unused","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                    for range_item in ranges_str.split(\u0027,\u0027)), [])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def apply_vlan_filter(self, port_params, vlan_list):"},{"line_number":77,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        # Add VLAN tags 2,4,5,10-20 on VF3 on PF p2p1, for filtering, ex."}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_9cb910eb","line":76,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: E303 too many blank lines (2)","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"},{"line_number":105,"context_line":"        with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX):"},{"line_number":106,"context_line":"            # lock scoped to trunk device so two diffs don\u0027t interleave"},{"line_number":107,"context_line":"            active_vlan_list \u003d get_list_from_ranges_str("},{"line_number":108,"context_line":"                sysfs_lib.read_sysfs_path("},{"line_number":109,"context_line":"                    port_params[\u0027pf_device\u0027],"},{"line_number":110,"context_line":"                    port_params[\u0027vf_index\u0027],"}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_fccf6c7c","line":107,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027get_list_from_ranges_str\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                    port_params[\u0027vf_index\u0027],"},{"line_number":111,"context_line":"                    \u0027trunk\u0027))"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"            vlans_to_add_str \u003d get_ranges_str_from_list("},{"line_number":114,"context_line":"                list(set(vlan_list) - set(active_vlan_list)))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"            vlans_to_rem_str \u003d get_ranges_str_from_list("}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_dcca686c","line":113,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027get_ranges_str_from_list\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"59d41d8af2f41f6c0f3d5b78afb8fa5d84b3cda4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            vlans_to_add_str \u003d get_ranges_str_from_list("},{"line_number":114,"context_line":"                list(set(vlan_list) - set(active_vlan_list)))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"            vlans_to_rem_str \u003d get_ranges_str_from_list("},{"line_number":117,"context_line":"                list(set(active_vlan_list) - set(vlan_list)))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            LOG.info(\"vlans_to_add_str %(vlans_to_add_str)s, \""}],"source_content_type":"text/x-python","patch_set":73,"id":"bf51134e_3cca846c","line":116,"updated":"2020-06-18 13:48:11.000000000","message":"pep8: F821 undefined name \u0027get_ranges_str_from_list\u0027","commit_id":"1051131d810f9b4da2aeed7538db07e8deb7b39e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron.agent.linux import utils"},{"line_number":16,"context_line":"from neutron.privileged.agent.linux import sysfs_lib"},{"line_number":17,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent import plumber_base"},{"line_number":18,"context_line":"from neutron.services.trunk.drivers.mech_sriov import constants"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_3c18bd7f","line":15,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F401 \u0027neutron.agent.linux.utils\u0027 imported but unused","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                    for range_item in ranges_str.split(\u0027,\u0027)), [])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def apply_vlan_filter(self, port_params, vlan_list):"},{"line_number":77,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        # Add VLAN tags 2,4,5,10-20 on VF3 on PF p2p1, for filtering, ex."}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_9c0e2939","line":76,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: E303 too many blank lines (2)","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        lock_name \u003d \u0027trunk-%s\u0027 % port_dev"},{"line_number":105,"context_line":"        with lockutils.lock(lock_name, runtime.SYNCHRONIZED_PREFIX):"},{"line_number":106,"context_line":"            # lock scoped to trunk device so two diffs don\u0027t interleave"},{"line_number":107,"context_line":"            active_vlan_list \u003d get_list_from_ranges_str("},{"line_number":108,"context_line":"                sysfs_lib.read_sysfs_path("},{"line_number":109,"context_line":"                    port_params[\u0027pf_device\u0027],"},{"line_number":110,"context_line":"                    port_params[\u0027vf_index\u0027],"}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_7c09952f","line":107,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027get_list_from_ranges_str\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                    port_params[\u0027vf_index\u0027],"},{"line_number":111,"context_line":"                    \u0027trunk\u0027))"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"            vlans_to_add_str \u003d get_ranges_str_from_list("},{"line_number":114,"context_line":"                list(set(vlan_list) - set(active_vlan_list)))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"            vlans_to_rem_str \u003d get_ranges_str_from_list("}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_dc08a12d","line":113,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027get_ranges_str_from_list\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"05d4a798cc47aa633157468e2e2365911cdd45a3","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            vlans_to_add_str \u003d get_ranges_str_from_list("},{"line_number":114,"context_line":"                list(set(vlan_list) - set(active_vlan_list)))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"            vlans_to_rem_str \u003d get_ranges_str_from_list("},{"line_number":117,"context_line":"                list(set(active_vlan_list) - set(vlan_list)))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            LOG.info(\"vlans_to_add_str %(vlans_to_add_str)s, \""}],"source_content_type":"text/x-python","patch_set":74,"id":"bf51134e_bc032d0f","line":116,"updated":"2020-06-18 18:45:32.000000000","message":"pep8: F821 undefined name \u0027get_ranges_str_from_list\u0027","commit_id":"410bbda53188fce218bc5e3a715ff35196092d72"}],"neutron/services/trunk/drivers/mech_sriov/agent/trunk_plumber.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"270dc38876c0fec0b4f386dbcf67d4d70afd69ea","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    interface (i.e. a trunk or subport)."},{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def __init__(self, namespace\u003dNone, sriov_utils\u003dNone):"},{"line_number":34,"context_line":"        self.namespace \u003d namespace"},{"line_number":35,"context_line":"        self.sriov_utils \u003d sriov_utils"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_7579e4c5","line":33,"range":{"start_line":33,"start_character":39,"end_line":33,"end_character":55},"updated":"2019-07-17 23:02:57.000000000","message":"this is not needed as there will one and only one utils for each driver. I feel this is useless","commit_id":"1c2df259eb81b862e3c2d37f945b179bd32791f1"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    interface (i.e. a trunk or subport)."},{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def __init__(self, namespace\u003dNone, sriov_utils\u003dNone):"},{"line_number":34,"context_line":"        self.namespace \u003d namespace"},{"line_number":35,"context_line":"        self.sriov_utils \u003d sriov_utils"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_a82b4180","line":33,"range":{"start_line":33,"start_character":39,"end_line":33,"end_character":55},"in_reply_to":"7faddb67_7579e4c5","updated":"2019-07-22 22:13:33.000000000","message":"Ok, will remove it","commit_id":"1c2df259eb81b862e3c2d37f945b179bd32791f1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        with self._port_lock(port_dev):"},{"line_number":51,"context_line":"            # lock scoped to trunk device so two diffs don\u0027t interleave"},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                LOG.info(\"Trunk invoking execute_sysfs_command REM\")"},{"line_number":54,"context_line":"                self.sriov_utils.execute_sysfs_command("},{"line_number":55,"context_line":"                    \u0027rem\u0027,"},{"line_number":56,"context_line":"                    port_params,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_4f3033e9","line":53,"updated":"2019-07-29 16:58:01.000000000","message":"We already have a debug message in execute_sysfs_command","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        with self._port_lock(port_dev):"},{"line_number":51,"context_line":"            # lock scoped to trunk device so two diffs don\u0027t interleave"},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                LOG.info(\"Trunk invoking execute_sysfs_command REM\")"},{"line_number":54,"context_line":"                self.sriov_utils.execute_sysfs_command("},{"line_number":55,"context_line":"                    \u0027rem\u0027,"},{"line_number":56,"context_line":"                    port_params,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_a7953589","line":53,"in_reply_to":"7faddb67_4f3033e9","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                    port_params,"},{"line_number":57,"context_line":"                    constants.VLAN_RANGE)"},{"line_number":58,"context_line":"            except Exception:"},{"line_number":59,"context_line":"                LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":60,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":61,"context_line":"                    raise trunk_exc.SriovNicSwitchDriverInvocationError("},{"line_number":62,"context_line":"                        pf_device\u003dport_params[\u0027pf_device\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_0f2b1b82","line":59,"updated":"2019-07-29 16:58:01.000000000","message":"The exception message is enough","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                    port_params,"},{"line_number":57,"context_line":"                    constants.VLAN_RANGE)"},{"line_number":58,"context_line":"            except Exception:"},{"line_number":59,"context_line":"                LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":60,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":61,"context_line":"                    raise trunk_exc.SriovNicSwitchDriverInvocationError("},{"line_number":62,"context_line":"                        pf_device\u003dport_params[\u0027pf_device\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_478ec179","line":59,"in_reply_to":"7faddb67_0f2b1b82","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            if vlans_ranges_str:"},{"line_number":68,"context_line":"                try:"},{"line_number":69,"context_line":"                    LOG.info(\"Trunk invoking execute_sysfs_command ADD\")"},{"line_number":70,"context_line":"                    self.sriov_utils.execute_sysfs_command("},{"line_number":71,"context_line":"                        \u0027add\u0027,"},{"line_number":72,"context_line":"                        port_params,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_2f35b7da","line":69,"updated":"2019-07-29 16:58:01.000000000","message":"We already have a debug message in execute_sysfs_command","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            if vlans_ranges_str:"},{"line_number":68,"context_line":"                try:"},{"line_number":69,"context_line":"                    LOG.info(\"Trunk invoking execute_sysfs_command ADD\")"},{"line_number":70,"context_line":"                    self.sriov_utils.execute_sysfs_command("},{"line_number":71,"context_line":"                        \u0027add\u0027,"},{"line_number":72,"context_line":"                        port_params,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_07ea090e","line":69,"in_reply_to":"7faddb67_2f35b7da","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                        \u0027add\u0027,"},{"line_number":72,"context_line":"                        port_params,"},{"line_number":73,"context_line":"                        vlans_ranges_str)"},{"line_number":74,"context_line":"                except Exception:"},{"line_number":75,"context_line":"                    LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":76,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":77,"context_line":"                        raise trunk_exc.SriovNicSwitchDriverInvocationError("}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_6f12cf5a","line":74,"range":{"start_line":74,"start_character":16,"end_line":74,"end_character":33},"updated":"2019-07-29 16:58:01.000000000","message":"In execute_sysfs_command you are blocking almost any possible exception. Which one should you have here?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                        \u0027add\u0027,"},{"line_number":72,"context_line":"                        port_params,"},{"line_number":73,"context_line":"                        vlans_ranges_str)"},{"line_number":74,"context_line":"                except Exception:"},{"line_number":75,"context_line":"                    LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":76,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":77,"context_line":"                        raise trunk_exc.SriovNicSwitchDriverInvocationError("}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_4751e1d8","line":74,"range":{"start_line":74,"start_character":16,"end_line":74,"end_character":33},"in_reply_to":"7faddb67_6f12cf5a","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        port_params,"},{"line_number":73,"context_line":"                        vlans_ranges_str)"},{"line_number":74,"context_line":"                except Exception:"},{"line_number":75,"context_line":"                    LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":76,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":77,"context_line":"                        raise trunk_exc.SriovNicSwitchDriverInvocationError("},{"line_number":78,"context_line":"                            pf_device\u003dport_params[\u0027pf_device\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_0f50fb09","line":75,"updated":"2019-07-29 16:58:01.000000000","message":"ditto","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                        port_params,"},{"line_number":73,"context_line":"                        vlans_ranges_str)"},{"line_number":74,"context_line":"                except Exception:"},{"line_number":75,"context_line":"                    LOG.error(\"Trunk error in invoking execute_sysfs_command\")"},{"line_number":76,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":77,"context_line":"                        raise trunk_exc.SriovNicSwitchDriverInvocationError("},{"line_number":78,"context_line":"                            pf_device\u003dport_params[\u0027pf_device\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_674e5d39","line":75,"in_reply_to":"7faddb67_0f50fb09","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"}],"neutron/services/trunk/drivers/mech_sriov/constants.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"500b1658a6cee7aa343840b91bdd3306d80946c0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_d8a0f6f6","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2019-07-19 07:18:37.000000000","message":"nit: time machine :-)","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_4855edf9","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"in_reply_to":"7faddb67_d8a0f6f6","updated":"2019-07-22 22:13:33.000000000","message":"Corrected :)","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"VF_DEVICE_PREFIX \u003d \u0027vfdev-\u0027"},{"line_number":16,"context_line":"VLAN_RANGE \u003d \u00270-4095\u0027"},{"line_number":17,"context_line":"RESOURCE_ID_LENGTH \u003d \u002711\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_e96f9ff9","line":16,"updated":"2019-07-29 16:58:01.000000000","message":"1) Is that correct? The vlan min tag is 1, and the max 4094. 0 and 4095 are reserverd.\n\n2) You should build this string using MIN_VLAN_TAG and MAX_VLAN_TAG","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"VF_DEVICE_PREFIX \u003d \u0027vfdev-\u0027"},{"line_number":16,"context_line":"VLAN_RANGE \u003d \u00270-4095\u0027"},{"line_number":17,"context_line":"RESOURCE_ID_LENGTH \u003d \u002711\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_21a7e70d","line":16,"in_reply_to":"7faddb67_e96f9ff9","updated":"2019-07-31 14:25:36.000000000","message":"1. I agree that valid vlan ids are from 1-4094, however this range string is used to clear the vlan filter from a VF, so it includes both 0 as well as 4095.\n\n2. Sure, I will use the MIN_VLAN_TAG and MAX_VLAN_TAG to construct this VLAN_RANGE string.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"}],"neutron/services/trunk/drivers/mech_sriov/driver.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"500b1658a6cee7aa343840b91bdd3306d80946c0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_98a6fe0e","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2019-07-19 07:18:37.000000000","message":"nit: ditto","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_685a292b","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"7faddb67_98a6fe0e","updated":"2019-07-22 22:13:33.000000000","message":"corrected","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"SUPPORTED_INTERFACES \u003d ("},{"line_number":28,"context_line":"    portbindings.VIF_TYPE_HW_VEB,"},{"line_number":29,"context_line":"    portbindings.VIF_TYPE_HOSTDEV_PHY,"},{"line_number":30,"context_line":")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"SUPPORTED_SEGMENTATION_TYPES \u003d ("}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_cee507de","line":29,"range":{"start_line":29,"start_character":17,"end_line":29,"end_character":37},"updated":"2020-05-20 16:14:30.000000000","message":"question: is it possible to create a VLAN trunk port on a physical device? I though that was only possible over virtual functions.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"SUPPORTED_INTERFACES \u003d ("},{"line_number":28,"context_line":"    portbindings.VIF_TYPE_HW_VEB,"},{"line_number":29,"context_line":"    portbindings.VIF_TYPE_HOSTDEV_PHY,"},{"line_number":30,"context_line":")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"SUPPORTED_SEGMENTATION_TYPES \u003d ("}],"source_content_type":"text/x-python","patch_set":70,"id":"ff570b3c_6d558ffa","line":29,"range":{"start_line":29,"start_character":17,"end_line":29,"end_character":37},"in_reply_to":"ff570b3c_cee507de","updated":"2020-06-18 09:37:24.000000000","message":"You are correct, its not possible to create a trunk port on a physical device yet. The SR-IOV driver also only supports it for VFs. I will remove this constant, it was added due to my confusion.","commit_id":"9abd86cf58c4418c743a8c70af56028ae0e3e143"}],"neutron/services/trunk/drivers/mech_sriov/utils.py":[{"author":{"_account_id":29254,"name":"Luna Das","email":"luna.das@att.com","username":"ld366r"},"change_message_id":"8094ccdbb67265eca49a5d106b5ba1edde629f8f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    #"},{"line_number":37,"context_line":"    def __init__(self):"},{"line_number":38,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    #"},{"line_number":42,"context_line":"    # Returns specified key-value affilation, if it exists."}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_666814ba","line":39,"updated":"2019-06-18 13:20:25.000000000","message":"Is this explicit return statement really needed .By default it should return None.","commit_id":"6ef3b5057cb5bcedeeed8098dd0c3005304b5a17"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"98d25695b321a1740f2722e62d4c8f866191d96b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        A VF is associated with an VF number, which ip link command uses to"},{"line_number":127,"context_line":"        configure it. This can be obtained from the PCI device filesystem."},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        VIRTFN_RE \u003d re.compile(\"virtfn(\\\\d+)\")"},{"line_number":130,"context_line":"        virtfns_path \u003d \"/sys/bus/pci/devices/%s/physfn/virtfn*\" % (pci_addr)"},{"line_number":131,"context_line":"        vf_num \u003d None"},{"line_number":132,"context_line":"        LOG.debug(\"Trunking: pci_addr: %(pci_addr)s \""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_c323a504","line":129,"range":{"start_line":129,"start_character":32,"end_line":129,"end_character":45},"updated":"2019-07-10 23:14:20.000000000","message":"r\u0027 was added for a regex string, otherwise pep8 flake will complain.","commit_id":"4fc656a4ced3442d88c681fb335d19a4b733fec2"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"aee0569996309426268b6b21725bec17d1ca88e0","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        A VF is associated with an VF number, which ip link command uses to"},{"line_number":127,"context_line":"        configure it. This can be obtained from the PCI device filesystem."},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        VIRTFN_RE \u003d re.compile(\"virtfn(\\\\d+)\")"},{"line_number":130,"context_line":"        virtfns_path \u003d \"/sys/bus/pci/devices/%s/physfn/virtfn*\" % (pci_addr)"},{"line_number":131,"context_line":"        vf_num \u003d None"},{"line_number":132,"context_line":"        LOG.debug(\"Trunking: pci_addr: %(pci_addr)s \""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_0a7a2687","line":129,"range":{"start_line":129,"start_character":32,"end_line":129,"end_character":45},"in_reply_to":"7faddb67_c323a504","updated":"2019-07-11 14:28:59.000000000","message":"For that only I had put \\\\. If u see right now the pep8 failure is not due to this. it is due to try_catch_except bandit issue. I\u0027ll fix that as well...","commit_id":"4fc656a4ced3442d88c681fb335d19a4b733fec2"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"500b1658a6cee7aa343840b91bdd3306d80946c0","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class SriovNicUtils(object):"},{"line_number":35,"context_line":"    #"},{"line_number":36,"context_line":"    # Initializes internal state for specified # keys"},{"line_number":37,"context_line":"    #"},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_f8b6123e","line":37,"range":{"start_line":35,"start_character":4,"end_line":37,"end_character":5},"updated":"2019-07-19 07:18:37.000000000","message":"nit1: this should be inside the method\nnit2: __init__ now just logs something, so the comment is about something else.","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class SriovNicUtils(object):"},{"line_number":35,"context_line":"    #"},{"line_number":36,"context_line":"    # Initializes internal state for specified # keys"},{"line_number":37,"context_line":"    #"},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_c861ddd5","line":37,"range":{"start_line":35,"start_character":4,"end_line":37,"end_character":5},"in_reply_to":"7faddb67_f8b6123e","updated":"2019-07-22 22:13:33.000000000","message":"Done","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"500b1658a6cee7aa343840b91bdd3306d80946c0","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    #"},{"line_number":42,"context_line":"    # Returns specified key-value affilation, if it exists."},{"line_number":43,"context_line":"    #"},{"line_number":44,"context_line":"    def execute_sysfs_command(self, command, port_params,"},{"line_number":45,"context_line":"                              vlans_ranges_str):"},{"line_number":46,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_787c6271","line":43,"range":{"start_line":41,"start_character":4,"end_line":43,"end_character":5},"updated":"2019-07-19 07:18:37.000000000","message":"nit1: this should be comment inside the method\nnit2: this comment is not in sync with the method (the method just return, without any key-value affiliation....)","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    #"},{"line_number":42,"context_line":"    # Returns specified key-value affilation, if it exists."},{"line_number":43,"context_line":"    #"},{"line_number":44,"context_line":"    def execute_sysfs_command(self, command, port_params,"},{"line_number":45,"context_line":"                              vlans_ranges_str):"},{"line_number":46,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_8899a5d1","line":43,"range":{"start_line":41,"start_character":4,"end_line":43,"end_character":5},"in_reply_to":"7faddb67_787c6271","updated":"2019-07-22 22:13:33.000000000","message":"Done","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"500b1658a6cee7aa343840b91bdd3306d80946c0","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.info(\"Trunking executing sysfs_command %(command)s\","},{"line_number":73,"context_line":"                     {\u0027command\u0027: commit_cmd})"},{"line_number":74,"context_line":"            utils.execute(commit_cmd, run_as_root\u003dTrue)"},{"line_number":75,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":76,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":77,"context_line":"                      \"Exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_78f1c200","line":74,"range":{"start_line":74,"start_character":12,"end_line":74,"end_character":55},"updated":"2019-07-19 07:18:37.000000000","message":"I am not sure but we have priviliged for the kind of commands that need extra priviliges, or am I wrong?","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"5b09445850b069e680c6bba32b32eb780ab7cc9c","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.info(\"Trunking executing sysfs_command %(command)s\","},{"line_number":73,"context_line":"                     {\u0027command\u0027: commit_cmd})"},{"line_number":74,"context_line":"            utils.execute(commit_cmd, run_as_root\u003dTrue)"},{"line_number":75,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":76,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":77,"context_line":"                      \"Exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7faddb67_087cd51e","line":74,"range":{"start_line":74,"start_character":12,"end_line":74,"end_character":55},"in_reply_to":"7faddb67_78f1c200","updated":"2019-07-22 22:13:33.000000000","message":"I added the binary and the rootwrap filters neccessary to run this sysfs binary command. Thanks for pointing this out, I had missed it by mistake.","commit_id":"ae67cec869941300240710157c9743de7d503997"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":70,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":71,"context_line":"                      \"Exception: %s\", e)"},{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_sysfs_netdev_path(self, pci_addr, pf_interface):"},{"line_number":75,"context_line":"        \"\"\"Get the sysfs path based on the PCI address of the device."}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_8f0dcb36","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":18},"updated":"2019-07-29 16:58:01.000000000","message":"Is that OK? We are \"hiding\" almost every possible exception here. Do you really want this?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        except (OSError, RuntimeError, IndexError, ValueError) as e:"},{"line_number":70,"context_line":"            LOG.error(\"Exception while executing Sysfs command \""},{"line_number":71,"context_line":"                      \"Exception: %s\", e)"},{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_sysfs_netdev_path(self, pci_addr, pf_interface):"},{"line_number":75,"context_line":"        \"\"\"Get the sysfs path based on the PCI address of the device."}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_81ffbba9","line":72,"range":{"start_line":72,"start_character":12,"end_line":72,"end_character":18},"in_reply_to":"7faddb67_8f0dcb36","updated":"2019-07-31 14:25:36.000000000","message":"Yes, in spite of sysfs call failure, we want the flow to continue as usual. Any errors shall be logged and can be detected by operator.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            return \"/sys/bus/pci/devices/%s/physfn/net\" % pci_addr"},{"line_number":82,"context_line":"        return \"/sys/bus/pci/devices/%s/net\" % pci_addr"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def get_ifname_by_pci_address(self, pci_addr, pf_interface\u003dFalse):"},{"line_number":85,"context_line":"        \"\"\"Get the interface name based on a VF\u0027s pci address."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        The returned interface name is either the parent PF\u0027s or that of"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_34e66e46","line":84,"updated":"2019-07-29 16:58:01.000000000","message":"NOTE (not for this patch): those methods are in os-vif and nova. We should implement in a future, a common library","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            return \"/sys/bus/pci/devices/%s/physfn/net\" % pci_addr"},{"line_number":82,"context_line":"        return \"/sys/bus/pci/devices/%s/net\" % pci_addr"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def get_ifname_by_pci_address(self, pci_addr, pf_interface\u003dFalse):"},{"line_number":85,"context_line":"        \"\"\"Get the interface name based on a VF\u0027s pci address."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        The returned interface name is either the parent PF\u0027s or that of"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_e1f78f8a","line":84,"in_reply_to":"7faddb67_34e66e46","updated":"2019-07-31 14:25:36.000000000","message":"Yes, that would be a better approach","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            dev_info \u003d os.listdir(dev_path)"},{"line_number":93,"context_line":"            return dev_info.pop()"},{"line_number":94,"context_line":"        except Exception:"},{"line_number":95,"context_line":"            raise trunk_exc.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def get_mac_by_pci_address(self, pci_addr, pf_interface\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_d424bab1","line":94,"range":{"start_line":94,"start_character":15,"end_line":94,"end_character":24},"updated":"2019-07-29 16:58:01.000000000","message":"nit: this exception is too wide","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            dev_info \u003d os.listdir(dev_path)"},{"line_number":93,"context_line":"            return dev_info.pop()"},{"line_number":94,"context_line":"        except Exception:"},{"line_number":95,"context_line":"            raise trunk_exc.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def get_mac_by_pci_address(self, pci_addr, pf_interface\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_c13ff322","line":94,"range":{"start_line":94,"start_character":15,"end_line":94,"end_character":24},"in_reply_to":"7faddb67_d424bab1","updated":"2019-07-31 14:25:36.000000000","message":"This routine is copied from nova, and I think the intention is any exception in reading the dev path is translated to PciDeviceNotFound exception","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                    vf_num \u003d t.group(1)"},{"line_number":135,"context_line":"                    break"},{"line_number":136,"context_line":"        except Exception:"},{"line_number":137,"context_line":"            LOG.info(\"Trunk: exception ignored while searching for \""},{"line_number":138,"context_line":"                     \"pci: %(pci_addr)s in virtfns_path: %(virtfns_path)s\","},{"line_number":139,"context_line":"                     {\u0027pci_addr\u0027: pci_addr,"},{"line_number":140,"context_line":"                      \u0027virtfns_path\u0027: virtfns_path})"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_b4349e4b","line":137,"range":{"start_line":137,"start_character":16,"end_line":137,"end_character":20},"updated":"2019-07-29 16:58:01.000000000","message":"nit: should this be info or debug?","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                    vf_num \u003d t.group(1)"},{"line_number":135,"context_line":"                    break"},{"line_number":136,"context_line":"        except Exception:"},{"line_number":137,"context_line":"            LOG.info(\"Trunk: exception ignored while searching for \""},{"line_number":138,"context_line":"                     \"pci: %(pci_addr)s in virtfns_path: %(virtfns_path)s\","},{"line_number":139,"context_line":"                     {\u0027pci_addr\u0027: pci_addr,"},{"line_number":140,"context_line":"                      \u0027virtfns_path\u0027: virtfns_path})"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_a11bd7c7","line":137,"range":{"start_line":137,"start_character":16,"end_line":137,"end_character":20},"in_reply_to":"7faddb67_b4349e4b","updated":"2019-07-31 14:25:36.000000000","message":"I think info should be fine here; indicating there was some exception while searching for the pci.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      \u0027virtfns_path\u0027: virtfns_path})"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if vf_num is None:"},{"line_number":143,"context_line":"            LOG.warning(\"Trunking: No net device was found for \""},{"line_number":144,"context_line":"                        \"pci: %(pci_addr)s \""},{"line_number":145,"context_line":"                        \"virtfns_path: %(virtfns_path)s\","},{"line_number":146,"context_line":"                        {\u0027pci_addr\u0027: pci_addr,"},{"line_number":147,"context_line":"                         \u0027virtfns_path\u0027: virtfns_path})"},{"line_number":148,"context_line":"            raise trunk_exc.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":149,"context_line":"        return vf_num"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_d4103aab","line":147,"range":{"start_line":143,"start_character":12,"end_line":147,"end_character":55},"updated":"2019-07-29 16:58:01.000000000","message":"With the information provided by the PciDeviceNotFoundById (pci_addr), IMO this is enough. We don\u0027t need this warning message.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                      \u0027virtfns_path\u0027: virtfns_path})"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if vf_num is None:"},{"line_number":143,"context_line":"            LOG.warning(\"Trunking: No net device was found for \""},{"line_number":144,"context_line":"                        \"pci: %(pci_addr)s \""},{"line_number":145,"context_line":"                        \"virtfns_path: %(virtfns_path)s\","},{"line_number":146,"context_line":"                        {\u0027pci_addr\u0027: pci_addr,"},{"line_number":147,"context_line":"                         \u0027virtfns_path\u0027: virtfns_path})"},{"line_number":148,"context_line":"            raise trunk_exc.PciDeviceNotFoundById(id\u003dpci_addr)"},{"line_number":149,"context_line":"        return vf_num"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_61cddf2f","line":147,"range":{"start_line":143,"start_character":12,"end_line":147,"end_character":55},"in_reply_to":"7faddb67_d4103aab","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"\"\"Returns a dict of common SRIOV parameters for a given SRIOV port"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        LOG.debug(\"Trunking: sriov_port %(id)s; \","},{"line_number":184,"context_line":"                  {\u0027id\u0027: sriov_port[\u0027id\u0027]})"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        port_mac \u003d sriov_port[\u0027mac_address\u0027]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_9422c200","line":184,"range":{"start_line":183,"start_character":7,"end_line":184,"end_character":43},"updated":"2019-07-29 16:58:01.000000000","message":"We should provide better debug information. L211 is enough","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        \"\"\"Returns a dict of common SRIOV parameters for a given SRIOV port"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        LOG.debug(\"Trunking: sriov_port %(id)s; \","},{"line_number":184,"context_line":"                  {\u0027id\u0027: sriov_port[\u0027id\u0027]})"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        port_mac \u003d sriov_port[\u0027mac_address\u0027]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_41f1c36a","line":184,"range":{"start_line":183,"start_character":7,"end_line":184,"end_character":43},"in_reply_to":"7faddb67_9422c200","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            pci_slot \u003d sriov_port[portbindings.PROFILE].get(\u0027pci_slot\u0027)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        if sriov_port.get(portbindings.VIF_DETAILS):"},{"line_number":195,"context_line":"            src_vlans \u003d sriov_port[portbindings.VIF_DETAILS].get(\u0027vlan\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        LOG.debug(\"Trunking: pci_slot %(pci_slot)s; \""},{"line_number":198,"context_line":"                  \"src_vlans %(src_vlans)s; \","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_cf02e36f","line":195,"range":{"start_line":195,"start_character":12,"end_line":195,"end_character":21},"updated":"2019-07-29 16:58:01.000000000","message":"If I\u0027m not wrong, this is a single value (number). This should be src_vlan","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            pci_slot \u003d sriov_port[portbindings.PROFILE].get(\u0027pci_slot\u0027)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        if sriov_port.get(portbindings.VIF_DETAILS):"},{"line_number":195,"context_line":"            src_vlans \u003d sriov_port[portbindings.VIF_DETAILS].get(\u0027vlan\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        LOG.debug(\"Trunking: pci_slot %(pci_slot)s; \""},{"line_number":198,"context_line":"                  \"src_vlans %(src_vlans)s; \","}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_21ecc78d","line":195,"range":{"start_line":195,"start_character":12,"end_line":195,"end_character":21},"in_reply_to":"7faddb67_cf02e36f","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        if sriov_port.get(portbindings.VIF_DETAILS):"},{"line_number":195,"context_line":"            src_vlans \u003d sriov_port[portbindings.VIF_DETAILS].get(\u0027vlan\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        LOG.debug(\"Trunking: pci_slot %(pci_slot)s; \""},{"line_number":198,"context_line":"                  \"src_vlans %(src_vlans)s; \","},{"line_number":199,"context_line":"                  {\u0027pci_slot\u0027: pci_slot,"},{"line_number":200,"context_line":"                   \u0027src_vlans\u0027: src_vlans})"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_541c4ac0","line":197,"updated":"2019-07-29 16:58:01.000000000","message":"ditto","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        if sriov_port.get(portbindings.VIF_DETAILS):"},{"line_number":195,"context_line":"            src_vlans \u003d sriov_port[portbindings.VIF_DETAILS].get(\u0027vlan\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        LOG.debug(\"Trunking: pci_slot %(pci_slot)s; \""},{"line_number":198,"context_line":"                  \"src_vlans %(src_vlans)s; \","},{"line_number":199,"context_line":"                  {\u0027pci_slot\u0027: pci_slot,"},{"line_number":200,"context_line":"                   \u0027src_vlans\u0027: src_vlans})"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_a18c37d7","line":197,"in_reply_to":"7faddb67_541c4ac0","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"88e42dc99f09dce464e2ac60e67980d6cf39adb9","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                 \"port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, \""},{"line_number":213,"context_line":"                 \"VF-Index %(vf_index)s, PF-Device %(pf_device)s, \""},{"line_number":214,"context_line":"                 \"src_vlans %(src_vlans)s; \","},{"line_number":215,"context_line":"                 {\u0027id\u0027: sriov_port[\u0027id\u0027],"},{"line_number":216,"context_line":"                  \u0027port_mac\u0027: port_mac,"},{"line_number":217,"context_line":"                  \u0027pci_slot\u0027: pci_slot,"},{"line_number":218,"context_line":"                  \u0027vf_index\u0027: vf_index,"},{"line_number":219,"context_line":"                  \u0027pf_device\u0027: pf_device,"},{"line_number":220,"context_line":"                  \u0027src_vlans\u0027: src_vlans})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        return {\u0027mac\u0027: port_mac, \u0027pci_slot\u0027: pci_slot,"},{"line_number":223,"context_line":"                \u0027vf_index\u0027: vf_index, \u0027pf_device\u0027: pf_device,"},{"line_number":224,"context_line":"                \u0027src_vlans\u0027: src_vlans}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_efb79fd7","line":224,"range":{"start_line":215,"start_character":16,"end_line":224,"end_character":39},"updated":"2019-07-29 16:58:01.000000000","message":"You are using almost the same dict. You can create this dict, use it in the message and then return it.","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"1857aed3ac54867d9fba09ec6696ffde18f1c32f","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                 \"port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, \""},{"line_number":213,"context_line":"                 \"VF-Index %(vf_index)s, PF-Device %(pf_device)s, \""},{"line_number":214,"context_line":"                 \"src_vlans %(src_vlans)s; \","},{"line_number":215,"context_line":"                 {\u0027id\u0027: sriov_port[\u0027id\u0027],"},{"line_number":216,"context_line":"                  \u0027port_mac\u0027: port_mac,"},{"line_number":217,"context_line":"                  \u0027pci_slot\u0027: pci_slot,"},{"line_number":218,"context_line":"                  \u0027vf_index\u0027: vf_index,"},{"line_number":219,"context_line":"                  \u0027pf_device\u0027: pf_device,"},{"line_number":220,"context_line":"                  \u0027src_vlans\u0027: src_vlans})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        return {\u0027mac\u0027: port_mac, \u0027pci_slot\u0027: pci_slot,"},{"line_number":223,"context_line":"                \u0027vf_index\u0027: vf_index, \u0027pf_device\u0027: pf_device,"},{"line_number":224,"context_line":"                \u0027src_vlans\u0027: src_vlans}"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_8156db29","line":224,"range":{"start_line":215,"start_character":16,"end_line":224,"end_character":39},"in_reply_to":"7faddb67_efb79fd7","updated":"2019-07-31 14:25:36.000000000","message":"Done","commit_id":"6af7469a8209ec74e05326d255a01193ba00104f"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"91f51e37587c9cf787a2f1cdadef21f1fd51cf78","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                              vlans_ranges_str):"},{"line_number":39,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Add VLAN tags 2,4,5,10-20 on VF3 on PF p2p1, for filtering, ex."},{"line_number":42,"context_line":"        echo add 2,4,5,10-20 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Remove VLAN tags 5,11-13 on VF3 on PF p2p1, ex."},{"line_number":45,"context_line":"        echo rem 5,11-13 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Remove all VLANs on VF3 on PF p2p1, ex."},{"line_number":48,"context_line":"        echo rem 0-4095 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        LOG.debug(\"Trunking sysfs command params %(command)s, \""},{"line_number":51,"context_line":"                  \"port_params %(port_params)s, \""}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_3039cfa2","line":48,"range":{"start_line":41,"start_character":7,"end_line":48,"end_character":66},"updated":"2019-11-11 15:46:48.000000000","message":"are these files generated when working with upstream intel driver ?\n\nor are these out of tree, vendor specific generated sysfs files ?\n\nto my understanding there is no consensus in kernel about SR-IOV trunk API for SR-IOV legacy (correct me if im wrong)\n\nreason im asking is that im unsure about the community approach towards pushing this in neutron instead of a 3rd party module.","commit_id":"2fcc26326fb5825935f696c53b536fa94f39ea2d"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"2eb056c8b2c09e035d75ec1ff90b181afe053b7d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                              vlans_ranges_str):"},{"line_number":39,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Add VLAN tags 2,4,5,10-20 on VF3 on PF p2p1, for filtering, ex."},{"line_number":42,"context_line":"        echo add 2,4,5,10-20 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Remove VLAN tags 5,11-13 on VF3 on PF p2p1, ex."},{"line_number":45,"context_line":"        echo rem 5,11-13 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Remove all VLANs on VF3 on PF p2p1, ex."},{"line_number":48,"context_line":"        echo rem 0-4095 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        LOG.debug(\"Trunking sysfs command params %(command)s, \""},{"line_number":51,"context_line":"                  \"port_params %(port_params)s, \""}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_d9fba345","line":48,"range":{"start_line":41,"start_character":7,"end_line":48,"end_character":66},"in_reply_to":"3fa7e38b_3039cfa2","updated":"2019-12-03 20:22:55.000000000","message":"These are *NOT* auto-generated files but written as per the interface exposed by Intel i40e driver. This i40e driver is nothing but SR-IOV legacy driver above a certain version, i.e. anything above 2.7.11 support sysfs:-\n\nhttps://downloadcenter.intel.com/download/24411/Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connections-Under-Linux-\n\nIts not agreed upon in kernel yet, but that shouldn\u0027t stop us from leveraging and integrating what\u0027s available at the moment. Other NICs can also add their code to driver.\n\nThe interface for TrunkPlumber class is a generic one, I can its implementation a dynamically loadable module via Stevedor. Later on other NIC vendors can either support same sysfs interface of SR-IOV driver and a consensus is made in Kernel about this. Otherwise they can implement this pluggable module and load it via the setup.conf endpoints?","commit_id":"2fcc26326fb5825935f696c53b536fa94f39ea2d"},{"author":{"_account_id":28714,"name":"Adrian Chiris","email":"adrianc@nvidia.com","username":"adrianc"},"change_message_id":"05746c3a04be4db188434aa25306d5681d76347a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                              vlans_ranges_str):"},{"line_number":39,"context_line":"        \"\"\"Execute the SRIOV NIC Switch Driver\u0027s SysFs command."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Add VLAN tags 2,4,5,10-20 on VF3 on PF p2p1, for filtering, ex."},{"line_number":42,"context_line":"        echo add 2,4,5,10-20 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # Remove VLAN tags 5,11-13 on VF3 on PF p2p1, ex."},{"line_number":45,"context_line":"        echo rem 5,11-13 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Remove all VLANs on VF3 on PF p2p1, ex."},{"line_number":48,"context_line":"        echo rem 0-4095 \u003e /sys/class/net/p2p1/device/sriov/3/trunk"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        LOG.debug(\"Trunking sysfs command params %(command)s, \""},{"line_number":51,"context_line":"                  \"port_params %(port_params)s, \""}],"source_content_type":"text/x-python","patch_set":57,"id":"3fa7e38b_d4958132","line":48,"range":{"start_line":41,"start_character":7,"end_line":48,"end_character":66},"in_reply_to":"3fa7e38b_d9fba345","updated":"2020-01-21 16:53:56.000000000","message":"Hi,\nApologies for the delay.\ni agree it should not stop integrating whats available. IMO only the API + stevedore module loading should be part of neutron, the vendor specific implementation (i40e related) should be out of tree in a separate python package.\n\nonce a consensus is reached in kernel, and there is upstream kernel support, a vendor agnostic implementation can be added to neutron.\n\nThats only my opinion, i see this feature was open for quite a while and im not sure what was agreed with neutron drivers team about it.","commit_id":"2fcc26326fb5825935f696c53b536fa94f39ea2d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SriovNicUtils(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_2cdace76","line":31,"updated":"2020-05-20 16:14:30.000000000","message":"nit: except for get_sriov_port_params, all those methods come from Nova and os-vif. Maybe in a future we need to make use of a common library, maybe os-vif","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SriovNicUtils(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _get_sysfs_netdev_path(self, pci_addr, pf_interface):"},{"line_number":37,"context_line":"        \"\"\"Get the sysfs path based on the PCI address of the device."}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_3174e9ce","line":34,"range":{"start_line":33,"start_character":23,"end_line":34,"end_character":47},"updated":"2020-05-20 16:14:30.000000000","message":"We don\u0027t need this message.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SriovNicUtils(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        LOG.debug(\"SriovNicUtils: init called\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _get_sysfs_netdev_path(self, pci_addr, pf_interface):"},{"line_number":37,"context_line":"        \"\"\"Get the sysfs path based on the PCI address of the device."}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_4d5d2be8","line":34,"range":{"start_line":33,"start_character":23,"end_line":34,"end_character":47},"in_reply_to":"ff570b3c_3174e9ce","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5b3f1dc0fdf500c4e9caecd06d4d2a028edd7769","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        LOG.info(\"Trunk SRIOV: port params: \""},{"line_number":168,"context_line":"                 \"port %(id)s, MAC %(mac)s, PCI %(pci_slot)s, \""},{"line_number":169,"context_line":"                 \"VF-Index %(vf_index)s, PF-Device %(pf_device)s, \""},{"line_number":170,"context_line":"                 \"src_vlan %(src_vlan)s; \", param_dict)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return param_dict"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_1113a567","line":170,"range":{"start_line":170,"start_character":39,"end_line":170,"end_character":40},"updated":"2020-05-20 16:14:30.000000000","message":"nit: to remove","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"449e706b62159944156eb8d9cdeb983d14b045e3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        LOG.info(\"Trunk SRIOV: port params: \""},{"line_number":168,"context_line":"                 \"port %(id)s, MAC %(mac)s, PCI %(pci_slot)s, \""},{"line_number":169,"context_line":"                 \"VF-Index %(vf_index)s, PF-Device %(pf_device)s, \""},{"line_number":170,"context_line":"                 \"src_vlan %(src_vlan)s; \", param_dict)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return param_dict"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff570b3c_6d262f6b","line":170,"range":{"start_line":170,"start_character":39,"end_line":170,"end_character":40},"in_reply_to":"ff570b3c_1113a567","updated":"2020-06-18 09:37:24.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"}],"neutron/services/trunk/rpc/agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d2a8bae1a1a65eff5d92d966b99be0213a0ebd8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"class TrunkStub(object):"},{"line_number":76,"context_line":"    \"\"\"Stub proxy code for agent-\u003eserver communication.\"\"\""},{"line_number":77,"context_line":"    # API HISTORY"},{"line_number":78,"context_line":"    #   1.0 - initial version"},{"line_number":79,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":64,"id":"3fa7e38b_2589ba28","line":78,"updated":"2020-02-18 10:35:23.000000000","message":"Because you are adding two new methods, you should bump the version.","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"},{"author":{"_account_id":27589,"name":"Deepak Tiwari","email":"deepak.tiwari@aricent.com","username":"deepak.tiwari"},"change_message_id":"328ef76802c85f13c2036e789893f66912f377b0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"class TrunkStub(object):"},{"line_number":76,"context_line":"    \"\"\"Stub proxy code for agent-\u003eserver communication.\"\"\""},{"line_number":77,"context_line":"    # API HISTORY"},{"line_number":78,"context_line":"    #   1.0 - initial version"},{"line_number":79,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":64,"id":"1fa4df85_028336ce","line":78,"in_reply_to":"3fa7e38b_2589ba28","updated":"2020-03-19 12:26:08.000000000","message":"Done","commit_id":"615a14bf6d0aa9f5268a82c78cc9eaa4f59c335e"}],"neutron/services/trunk/rules.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a77e603dc1794bb438148a97507614202f248ac0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        # (namely it is bound). Bound ports may be used as trunk parents or"},{"line_number":90,"context_line":"        # subports, but that depends on the underlying driver in charge."},{"line_number":91,"context_line":"        if not self.can_be_trunked_or_untrunked(context):"},{"line_number":92,"context_line":"            if parent_port:"},{"line_number":93,"context_line":"                raise trunk_exc.ParentPortInUse(port_id\u003dself.port_id)"},{"line_number":94,"context_line":"            else:"},{"line_number":95,"context_line":"                # if the port is being used as subport in a trunk, check if it"}],"source_content_type":"text/x-python","patch_set":88,"id":"9f560f44_2ec40840","line":92,"updated":"2020-09-03 06:52:08.000000000","message":"pep8: R1720: Unnecessary \"else\" after \"raise\" (no-else-raise)","commit_id":"af6a1940aba7992d99664bcd6b8306e79ff06eec"}],"neutron/tests/unit/services/trunk/drivers/mech_sriov/agent/plumbers/test_i40e.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"cd63208e0064f047b39043641bf710442c7321df","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"from oslo_utils import uuidutils"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.objects import trunk"}],"source_content_type":"text/x-python","patch_set":80,"id":"9f560f44_5703df0f","line":15,"updated":"2020-07-29 21:44:49.000000000","message":"pep8: N347: Test code must not import mock library","commit_id":"0806a77e09f62fd220ff6e3c28e307126f3066b4"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"1965e4a468f8db721bedd422ae52fea7e4d612f9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from neutron.objects import trunk"},{"line_number":18,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent.plumbers import i40e"},{"line_number":19,"context_line":"from neutron.tests import base"},{"line_number":20,"context_line":"from unittest import mock"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class i40ePlumberTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":81,"id":"9f560f44_77bf9560","line":20,"updated":"2020-08-05 21:04:57.000000000","message":"pep8: I100 Import statements are in the wrong order. from unittest should be before from neutron.tests","commit_id":"01f5a92299e40ebe730d73fbc181bef2fb47d91f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"0f427568a94a72e8c77376d55e55e9f550219232","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_utils import uuidutils"},{"line_number":16,"context_line":"from unittest import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.objects import trunk"},{"line_number":19,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent.plumbers import i40e"}],"source_content_type":"text/x-python","patch_set":83,"id":"9f560f44_35ffd067","line":16,"updated":"2020-08-06 08:42:45.000000000","message":"pep8: I100 Import statements are in the wrong order. from unittest should be before from oslo_utils","commit_id":"55e6743baf3201082beaf2eddd598cdc820cce0f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"b6a75d4bf1323d981dda808f567c08fdc0a8700a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":"from unittest import mock"},{"line_number":15,"context_line":"from oslo_utils import uuidutils"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron.objects import trunk"},{"line_number":18,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent.plumbers import i40e"}],"source_content_type":"text/x-python","patch_set":84,"id":"9f560f44_69f691d9","line":15,"updated":"2020-08-06 12:31:06.000000000","message":"pep8: H306: imports not in alphabetical order (unittest.mock, oslo_utils.uuidutils)","commit_id":"358e74a76eb17a4900ac449c752c789b88c32f9e"}],"neutron/tests/unit/services/trunk/drivers/mech_sriov/agent/test_driver.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"ade6d0757577f32c660f2fd92225a94c4c394e34","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class SriovTrunkDriverTestCase(base.BaseTestCase):"},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(SriovTrunkDriverTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.plumber \u003d mock.create_autospec(trunk_plumber.Plumber())"},{"line_number":32,"context_line":"        self.stub \u003d mock.create_autospec(driver.trunk_rpc.TrunkStub())"},{"line_number":33,"context_line":"        self.tapi \u003d mock.create_autospec(trunk_driver.TrunkAPI(self.stub))"},{"line_number":34,"context_line":"        self.std \u003d driver.SriovTrunkDriver("},{"line_number":35,"context_line":"            plumber\u003dself.plumber, trunk_api\u003dself.tapi)"},{"line_number":36,"context_line":"        self.trunk \u003d trunk.Trunk(id\u003duuidutils.generate_uuid(),"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_1f523813","line":33,"range":{"start_line":31,"start_character":0,"end_line":33,"end_character":74},"updated":"2019-10-29 12:42:27.000000000","message":"I think there needs to be an elaboration in these mocks so that later, when a segmentation ID is requested from the resultant trunk, one can be provided.  Right now many of the unit tests for SriovTrunkDriverTestCase are failing because the segmentation ID returned is \"MagicMock name\u003d\u0027mock.get_port().__getitem__()\u0027\" which I am guessing comes from one of these mocks.","commit_id":"4951c3f5f86400b5794e97892a28a9909b5eb601"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"cd63208e0064f047b39043641bf710442c7321df","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"from neutron_lib.callbacks import events as cb_events"},{"line_number":17,"context_line":"from neutron_lib.services.trunk import constants as t_const"},{"line_number":18,"context_line":"from oslo_utils import uuidutils"}],"source_content_type":"text/x-python","patch_set":80,"id":"9f560f44_7708a32b","line":15,"updated":"2020-07-29 21:44:49.000000000","message":"pep8: N347: Test code must not import mock library","commit_id":"0806a77e09f62fd220ff6e3c28e307126f3066b4"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"1965e4a468f8db721bedd422ae52fea7e4d612f9","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent import driver"},{"line_number":23,"context_line":"from neutron.services.trunk.drivers.mech_sriov.agent.plumbers import i40e"},{"line_number":24,"context_line":"from neutron.tests import base"},{"line_number":25,"context_line":"from unittest import mock"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SriovTrunkDriverTestCase(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":81,"id":"9f560f44_178d79d2","line":25,"updated":"2020-08-05 21:04:57.000000000","message":"pep8: I100 Import statements are in the wrong order. from unittest should be before from neutron.tests","commit_id":"01f5a92299e40ebe730d73fbc181bef2fb47d91f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"0f427568a94a72e8c77376d55e55e9f550219232","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from neutron_lib.callbacks import events as cb_events"},{"line_number":16,"context_line":"from neutron_lib.services.trunk import constants as t_const"},{"line_number":17,"context_line":"from oslo_utils import uuidutils"},{"line_number":18,"context_line":"from unittest import mock"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.api.rpc.callbacks import events"},{"line_number":21,"context_line":"from neutron.objects import trunk"}],"source_content_type":"text/x-python","patch_set":83,"id":"9f560f44_d50bf48a","line":18,"updated":"2020-08-06 08:42:45.000000000","message":"pep8: I100 Import statements are in the wrong order. from unittest should be before from oslo_utils","commit_id":"55e6743baf3201082beaf2eddd598cdc820cce0f"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"b6a75d4bf1323d981dda808f567c08fdc0a8700a","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib.callbacks import events as cb_events"},{"line_number":16,"context_line":"from neutron_lib.services.trunk import constants as t_const"},{"line_number":17,"context_line":"from unittest import mock"},{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.api.rpc.callbacks import events"}],"source_content_type":"text/x-python","patch_set":84,"id":"9f560f44_29113905","line":17,"updated":"2020-08-06 12:31:06.000000000","message":"pep8: I100 Import statements are in the wrong order. from unittest should be before from neutron_lib.services.trunk","commit_id":"358e74a76eb17a4900ac449c752c789b88c32f9e"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"b6a75d4bf1323d981dda808f567c08fdc0a8700a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from neutron_lib.callbacks import events as cb_events"},{"line_number":16,"context_line":"from neutron_lib.services.trunk import constants as t_const"},{"line_number":17,"context_line":"from unittest import mock"},{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.api.rpc.callbacks import events"},{"line_number":21,"context_line":"from neutron.objects import trunk"}],"source_content_type":"text/x-python","patch_set":84,"id":"9f560f44_89fb25bf","line":18,"updated":"2020-08-06 12:31:06.000000000","message":"pep8: H306: imports not in alphabetical order (unittest.mock, oslo_utils.uuidutils)","commit_id":"358e74a76eb17a4900ac449c752c789b88c32f9e"}]}
