)]}'
{"neutron/3f7169f70711_add_qos_minimum_bandwidth_rules.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"7bbfdbdc29abee4fa635718f85b123aa3655bee4","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#"},{"line_number":9,"context_line":"#    Unless required by applicable law or agreed to in writing, software"},{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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":""},{"line_number":16,"context_line":"\"\"\"add_qos_minimum_bandwidth_rules"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_8871f346","side":"PARENT","line":14,"range":{"start_line":11,"start_character":34,"end_line":14,"end_character":1},"updated":"2016-07-31 03:48:25.000000000","message":"here you remove it","commit_id":"13abbf01b8d289a08fdbcdfaae5708ff2268289c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"381f0710d3683e326a036cd19e5efc63e8429063","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#"},{"line_number":9,"context_line":"#    Unless required by applicable law or agreed to in writing, software"},{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"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":""},{"line_number":16,"context_line":"\"\"\"add_qos_minimum_bandwidth_rules"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_91b8b012","side":"PARENT","line":14,"range":{"start_line":11,"start_character":34,"end_line":14,"end_character":1},"in_reply_to":"bacf61ea_8871f346","updated":"2016-08-02 07:13:56.000000000","message":"Yes, I removed this file because I shouldn\u0027t have uploaded first.","commit_id":"13abbf01b8d289a08fdbcdfaae5708ff2268289c"}],"neutron/cmd/sanity/checks.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cf02304f522980309ebd61c524ccfd8565ee507d","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    return is_supported"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def vf_extended_management_supported():"},{"line_number":169,"context_line":"    is_supported \u003d True"},{"line_number":170,"context_line":"    required_caps \u003d ("},{"line_number":171,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_STATE,"},{"line_number":172,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_SPOOFCHK,"},{"line_number":173,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_RATE,"},{"line_number":174,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_MAX_TX_RATE,"},{"line_number":175,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_MIN_TX_RATE,"},{"line_number":176,"context_line":"    )"},{"line_number":177,"context_line":"    try:"},{"line_number":178,"context_line":"        vf_section \u003d ip_link_support.IpLinkSupport.get_vf_mgmt_section()"},{"line_number":179,"context_line":"        for cap in required_caps:"},{"line_number":180,"context_line":"            if not ip_link_support.IpLinkSupport.vf_mgmt_capability_supported("},{"line_number":181,"context_line":"                   vf_section, cap):"},{"line_number":182,"context_line":"                is_supported \u003d False"},{"line_number":183,"context_line":"                LOG.debug(\"ip link command does not support \""},{"line_number":184,"context_line":"                          \"vf capability \u0027%(cap)s\u0027\", cap)"},{"line_number":185,"context_line":"    except ip_link_support.UnsupportedIpLinkCommand:"},{"line_number":186,"context_line":"        LOG.exception(_LE(\"Unexpected exception while checking supported \""},{"line_number":187,"context_line":"                          \"ip link command\"))"},{"line_number":188,"context_line":"        return False"},{"line_number":189,"context_line":"    return is_supported"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def netns_read_requires_helper():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_2983e699","line":189,"range":{"start_line":168,"start_character":0,"end_line":189,"end_character":23},"updated":"2016-07-29 08:26:16.000000000","message":"no sure why you duplicate the code from the above method","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d88cfb4198d5ed87cd9c967afba4c86f6825b6cc","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    return is_supported"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def vf_extended_management_supported():"},{"line_number":169,"context_line":"    is_supported \u003d True"},{"line_number":170,"context_line":"    required_caps \u003d ("},{"line_number":171,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_STATE,"},{"line_number":172,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_SPOOFCHK,"},{"line_number":173,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_RATE,"},{"line_number":174,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_MAX_TX_RATE,"},{"line_number":175,"context_line":"        ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_MIN_TX_RATE,"},{"line_number":176,"context_line":"    )"},{"line_number":177,"context_line":"    try:"},{"line_number":178,"context_line":"        vf_section \u003d ip_link_support.IpLinkSupport.get_vf_mgmt_section()"},{"line_number":179,"context_line":"        for cap in required_caps:"},{"line_number":180,"context_line":"            if not ip_link_support.IpLinkSupport.vf_mgmt_capability_supported("},{"line_number":181,"context_line":"                   vf_section, cap):"},{"line_number":182,"context_line":"                is_supported \u003d False"},{"line_number":183,"context_line":"                LOG.debug(\"ip link command does not support \""},{"line_number":184,"context_line":"                          \"vf capability \u0027%(cap)s\u0027\", cap)"},{"line_number":185,"context_line":"    except ip_link_support.UnsupportedIpLinkCommand:"},{"line_number":186,"context_line":"        LOG.exception(_LE(\"Unexpected exception while checking supported \""},{"line_number":187,"context_line":"                          \"ip link command\"))"},{"line_number":188,"context_line":"        return False"},{"line_number":189,"context_line":"    return is_supported"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def netns_read_requires_helper():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_a159a600","line":189,"range":{"start_line":168,"start_character":0,"end_line":189,"end_character":23},"in_reply_to":"bacf61ea_2983e699","updated":"2016-07-29 10:40:16.000000000","message":"It\u0027s not the same.\n\nBut you are right, I\u0027ll rewrite this function to reuse the code.","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"}],"neutron/cmd/sanity_check.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9f51f9b72a275a632a69c00424e49e6641cf919f","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    if not result:"},{"line_number":191,"context_line":"        LOG.error(_LE(\u0027Check for VF extended management support failed. \u0027"},{"line_number":192,"context_line":"                      \u0027Please ensure that the version of ip link \u0027"},{"line_number":193,"context_line":"                      \u0027being used has VF extended support.\u0027))"},{"line_number":194,"context_line":"    return result"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_68570d58","line":193,"updated":"2016-08-02 09:16:14.000000000","message":"Can you at least state a minimun version here? Or can you add this to the commit message?","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a572a9cc0c92b7215577702227b84e8b25cc764b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    if not result:"},{"line_number":191,"context_line":"        LOG.error(_LE(\u0027Check for VF extended management support failed. \u0027"},{"line_number":192,"context_line":"                      \u0027Please ensure that the version of ip link \u0027"},{"line_number":193,"context_line":"                      \u0027being used has VF extended support.\u0027))"},{"line_number":194,"context_line":"    return result"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_55cd7d64","line":193,"in_reply_to":"bacf61ea_68570d58","updated":"2016-08-02 11:25:16.000000000","message":"Yes of course. That will be very helpful.","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/common/config.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9f51f9b72a275a632a69c00424e49e6641cf919f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       \"network_device. The network_device in the mapping \""},{"line_number":83,"context_line":"                       \"should appear in the physical_device_mappings \""},{"line_number":84,"context_line":"                       \"list.\")),"},{"line_number":85,"context_line":"    cfg.BoolOpt(\u0027vf_extended_management\u0027,"},{"line_number":86,"context_line":"                default\u003dFalse,"},{"line_number":87,"context_line":"                help\u003d_(\"Check this option to enable \u0027ip-link\u0027 extended VF \""},{"line_number":88,"context_line":"                       \"management features. If enable, \u0027ip-link\u0027 command \""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_e8c93d27","line":85,"updated":"2016-08-02 09:16:14.000000000","message":"please add a release note for the new configuration variable","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a572a9cc0c92b7215577702227b84e8b25cc764b","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       \"network_device. The network_device in the mapping \""},{"line_number":83,"context_line":"                       \"should appear in the physical_device_mappings \""},{"line_number":84,"context_line":"                       \"list.\")),"},{"line_number":85,"context_line":"    cfg.BoolOpt(\u0027vf_extended_management\u0027,"},{"line_number":86,"context_line":"                default\u003dFalse,"},{"line_number":87,"context_line":"                help\u003d_(\"Check this option to enable \u0027ip-link\u0027 extended VF \""},{"line_number":88,"context_line":"                       \"management features. If enable, \u0027ip-link\u0027 command \""}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_9576d503","line":85,"in_reply_to":"bacf61ea_e8c93d27","updated":"2016-08-02 11:25:16.000000000","message":"Done","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3eeb670d62109bd228e8584392a48e9570ebf3b5","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        Clear the min_tx_rate configuration from VF by setting it to 0"},{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":446,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_a975e298","line":445,"updated":"2016-07-26 13:00:35.000000000","message":"NOTE(nickname): ...","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"470ff17bb813f0588fb5e7c4af3b9f85cc61329f","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        Clear the min_tx_rate configuration from VF by setting it to 0"},{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":446,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_24091085","line":445,"in_reply_to":"dada55a8_a975e298","updated":"2016-07-26 16:08:04.000000000","message":"Done.\n\nI\u0027ll put the original author, Moshe Levi.","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3eeb670d62109bd228e8584392a48e9570ebf3b5","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":446,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"},{"line_number":449,"context_line":"        #if VF is assigned or not."}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_297e1219","line":446,"updated":"2016-07-26 13:00:35.000000000","message":"I don\u0027tI understand the logic of this note and L450-459 and I don\u0027t see similar logic for max. Can you elaborate? :)","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"470ff17bb813f0588fb5e7c4af3b9f85cc61329f","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":446,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"},{"line_number":449,"context_line":"        #if VF is assigned or not."}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_0485eccd","line":446,"in_reply_to":"dada55a8_297e1219","updated":"2016-07-26 16:08:04.000000000","message":"This logic was implemented in https://review.openstack.org/#/c/214055/.\n\nThere is a thread of Q\u0026A in https://review.openstack.org/#/c/214055/7/neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py\n\nThis check avoids the race condition between nova deleting and assigning again the same VF and neutron reseting the min_rate in an already assigned VF.","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3eeb670d62109bd228e8584392a48e9570ebf3b5","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        #if VF is assigned or not."},{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #(Note): check the pci_slot is not assigned to some"},{"line_number":453,"context_line":"            #        other port before resetting the max rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_696aca82","line":452,"updated":"2016-07-26 13:00:35.000000000","message":"NOTE(...):","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"470ff17bb813f0588fb5e7c4af3b9f85cc61329f","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        #if VF is assigned or not."},{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #(Note): check the pci_slot is not assigned to some"},{"line_number":453,"context_line":"            #        other port before resetting the max rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_040e8c8b","line":452,"in_reply_to":"dada55a8_696aca82","updated":"2016-07-26 16:08:04.000000000","message":"Done.\n\nI\u0027ll put the original author, Moshe Levi.","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3eeb670d62109bd228e8584392a48e9570ebf3b5","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #(Note): check the pci_slot is not assigned to some"},{"line_number":453,"context_line":"            #        other port before resetting the max rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"},{"line_number":456,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_69180a1f","line":453,"range":{"start_line":453,"start_character":53,"end_line":453,"end_character":57},"updated":"2016-07-26 13:00:35.000000000","message":"min","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"470ff17bb813f0588fb5e7c4af3b9f85cc61329f","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #(Note): check the pci_slot is not assigned to some"},{"line_number":453,"context_line":"            #        other port before resetting the max rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"},{"line_number":456,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_64278812","line":453,"range":{"start_line":453,"start_character":53,"end_line":453,"end_character":57},"in_reply_to":"dada55a8_69180a1f","updated":"2016-07-26 16:08:04.000000000","message":"Done","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cf02304f522980309ebd61c524ccfd8565ee507d","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        @param min_kbps: device min rate in kbps"},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":"        vf_index \u003d self._get_vf_index(pci_slot)"},{"line_number":212,"context_line":"        #(Note): ip link set min_tx_rate in Mbps therefore"},{"line_number":213,"context_line":"        #we need to convert the min_kbps to Mbps."},{"line_number":214,"context_line":"        #Zero means to disable the rate so the lowest rate"},{"line_number":215,"context_line":"        #available is 1Mbps. Floating numbers are not allowed"},{"line_number":216,"context_line":"        if min_kbps \u003e 0 and min_kbps \u003c 1000:"},{"line_number":217,"context_line":"            min_mbps \u003d 1"},{"line_number":218,"context_line":"        else:"},{"line_number":219,"context_line":"            min_mbps \u003d utils.round_val(min_kbps / 1000.0)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        log_dict \u003d {"},{"line_number":222,"context_line":"            \u0027min_mbps\u0027: min_mbps,"},{"line_number":223,"context_line":"            \u0027min_kbps\u0027: min_kbps,"},{"line_number":224,"context_line":"            \u0027vf_index\u0027: vf_index"},{"line_number":225,"context_line":"        }"},{"line_number":226,"context_line":"        if min_kbps % 1000 !\u003d 0:"},{"line_number":227,"context_line":"            LOG.debug(\"Minimum TX rate for SR-IOV ports is counted in Mbps; \""},{"line_number":228,"context_line":"                      \"setting %(min_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":229,"context_line":"                      \"instead of %(min_kbps)s kbps\","},{"line_number":230,"context_line":"                      log_dict)"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            LOG.debug(\"Setting %(min_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":233,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_2908062c","line":230,"range":{"start_line":212,"start_character":0,"end_line":230,"end_character":31},"updated":"2016-07-29 08:26:16.000000000","message":"you lot of common code with the max rate limit abouve","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d88cfb4198d5ed87cd9c967afba4c86f6825b6cc","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        @param min_kbps: device min rate in kbps"},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":"        vf_index \u003d self._get_vf_index(pci_slot)"},{"line_number":212,"context_line":"        #(Note): ip link set min_tx_rate in Mbps therefore"},{"line_number":213,"context_line":"        #we need to convert the min_kbps to Mbps."},{"line_number":214,"context_line":"        #Zero means to disable the rate so the lowest rate"},{"line_number":215,"context_line":"        #available is 1Mbps. Floating numbers are not allowed"},{"line_number":216,"context_line":"        if min_kbps \u003e 0 and min_kbps \u003c 1000:"},{"line_number":217,"context_line":"            min_mbps \u003d 1"},{"line_number":218,"context_line":"        else:"},{"line_number":219,"context_line":"            min_mbps \u003d utils.round_val(min_kbps / 1000.0)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        log_dict \u003d {"},{"line_number":222,"context_line":"            \u0027min_mbps\u0027: min_mbps,"},{"line_number":223,"context_line":"            \u0027min_kbps\u0027: min_kbps,"},{"line_number":224,"context_line":"            \u0027vf_index\u0027: vf_index"},{"line_number":225,"context_line":"        }"},{"line_number":226,"context_line":"        if min_kbps % 1000 !\u003d 0:"},{"line_number":227,"context_line":"            LOG.debug(\"Minimum TX rate for SR-IOV ports is counted in Mbps; \""},{"line_number":228,"context_line":"                      \"setting %(min_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":229,"context_line":"                      \"instead of %(min_kbps)s kbps\","},{"line_number":230,"context_line":"                      log_dict)"},{"line_number":231,"context_line":"        else:"},{"line_number":232,"context_line":"            LOG.debug(\"Setting %(min_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":233,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_61384ea1","line":230,"range":{"start_line":212,"start_character":0,"end_line":230,"end_character":31},"in_reply_to":"bacf61ea_2908062c","updated":"2016-07-29 10:40:16.000000000","message":"You are right. I\u0027ll rewrite this function.","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cf02304f522980309ebd61c524ccfd8565ee507d","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        Clear the min_tx_rate configuration from VF by setting it to 0"},{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #NOTE(Moshe Levi): we don\u0027t use the self._get_emb_eswitch here, because"},{"line_number":446,"context_line":"        #when clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"},{"line_number":449,"context_line":"        #if VF is assigned or not."},{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #NOTE(Moshe Levi): check the pci_slot is not assigned to some other"},{"line_number":453,"context_line":"            #port before resetting the min_tx_rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"},{"line_number":456,"context_line":"            else:"},{"line_number":457,"context_line":"                LOG.warning(_LW(\"VF with PCI slot %(pci_slot)s is already \""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6c27acb6","line":454,"range":{"start_line":445,"start_character":0,"end_line":454,"end_character":64},"updated":"2016-07-29 08:26:16.000000000","message":"again common code with the max rate","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d88cfb4198d5ed87cd9c967afba4c86f6825b6cc","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        Clear the min_tx_rate configuration from VF by setting it to 0"},{"line_number":443,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":444,"context_line":"        \"\"\""},{"line_number":445,"context_line":"        #NOTE(Moshe Levi): we don\u0027t use the self._get_emb_eswitch here, because"},{"line_number":446,"context_line":"        #when clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":447,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":448,"context_line":"        #should just clear the VF min_tx_rate according to pci_slot no matter"},{"line_number":449,"context_line":"        #if VF is assigned or not."},{"line_number":450,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":451,"context_line":"        if embedded_switch:"},{"line_number":452,"context_line":"            #NOTE(Moshe Levi): check the pci_slot is not assigned to some other"},{"line_number":453,"context_line":"            #port before resetting the min_tx_rate."},{"line_number":454,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":455,"context_line":"                embedded_switch.set_device_min_tx_rate(pci_slot, 0)"},{"line_number":456,"context_line":"            else:"},{"line_number":457,"context_line":"                LOG.warning(_LW(\"VF with PCI slot %(pci_slot)s is already \""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_c11c9a15","line":454,"range":{"start_line":445,"start_character":0,"end_line":454,"end_character":64},"in_reply_to":"bacf61ea_6c27acb6","updated":"2016-07-29 10:40:16.000000000","message":"Done","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":20076,"name":"QunyingRan","email":"ran.qunying@zte.com.cn","username":"QunyingRan"},"change_message_id":"00468eddd2e23725414664364be32d25d59846a7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            \u0027vf_index\u0027: vf_index"},{"line_number":195,"context_line":"        }"},{"line_number":196,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":197,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":198,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":199,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":200,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_e82cef03","line":197,"range":{"start_line":197,"start_character":26,"end_line":197,"end_character":35},"updated":"2016-07-31 04:15:12.000000000","message":"There is no rate_type in log_dict","commit_id":"2ee7483ed37b55184d10b12d257a987ad5f7990a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"381f0710d3683e326a036cd19e5efc63e8429063","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            \u0027vf_index\u0027: vf_index"},{"line_number":195,"context_line":"        }"},{"line_number":196,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":197,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":198,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":199,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":200,"context_line":"                      log_dict)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_115a00f2","line":197,"range":{"start_line":197,"start_character":26,"end_line":197,"end_character":35},"in_reply_to":"bacf61ea_e82cef03","updated":"2016-08-02 07:13:56.000000000","message":"Thank you! Good catch.","commit_id":"2ee7483ed37b55184d10b12d257a987ad5f7990a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        @param pci_slot: Virtual Function address"},{"line_number":177,"context_line":"        @param rate_type: device rate name type. Could be \u0027rate\u0027 and"},{"line_number":178,"context_line":"                          \u0027min_tx_rate\u0027."},{"line_number":179,"context_line":"        @param rate_kbps: device rate in kbps"},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":"        vf_index \u003d self._get_vf_index(pci_slot)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_d13daade","line":178,"updated":"2016-08-25 12:56:05.000000000","message":"Add max_tx_rate too? Even though you don\u0027t use it in the actual driver.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        @param pci_slot: Virtual Function address"},{"line_number":177,"context_line":"        @param rate_type: device rate name type. Could be \u0027rate\u0027 and"},{"line_number":178,"context_line":"                          \u0027min_tx_rate\u0027."},{"line_number":179,"context_line":"        @param rate_kbps: device rate in kbps"},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":"        vf_index \u003d self._get_vf_index(pci_slot)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_db80e18d","line":178,"in_reply_to":"1ac06dbe_d13daade","updated":"2016-08-30 11:45:39.000000000","message":"Not anymore now that we removed max_* alias from the previous patch.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        embedded_switch \u003d self._get_emb_eswitch(device_mac, pci_slot)"},{"line_number":306,"context_line":"        if embedded_switch:"},{"line_number":307,"context_line":"            embedded_switch.set_device_rate(pci_slot, \u0027rate\u0027, max_kbps)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def set_device_min_tx_rate(self, device_mac, pci_slot, min_kbps):"},{"line_number":310,"context_line":"        \"\"\"Set device min_tx_rate"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_ace89517","line":307,"updated":"2016-08-25 12:56:05.000000000","message":"shouldn\u0027t you use constants introduced in the previous patch?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        \"\"\""},{"line_number":305,"context_line":"        embedded_switch \u003d self._get_emb_eswitch(device_mac, pci_slot)"},{"line_number":306,"context_line":"        if embedded_switch:"},{"line_number":307,"context_line":"            embedded_switch.set_device_rate(pci_slot, \u0027rate\u0027, max_kbps)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def set_device_min_tx_rate(self, device_mac, pci_slot, min_kbps):"},{"line_number":310,"context_line":"        \"\"\"Set device min_tx_rate"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_fe175342","line":307,"in_reply_to":"1ac06dbe_ace89517","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        \"\"\""},{"line_number":317,"context_line":"        embedded_switch \u003d self._get_emb_eswitch(device_mac, pci_slot)"},{"line_number":318,"context_line":"        if embedded_switch:"},{"line_number":319,"context_line":"            embedded_switch.set_device_rate(pci_slot, \u0027min_tx_rate\u0027, min_kbps)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def set_device_state(self, device_mac, pci_slot, admin_state_up):"},{"line_number":322,"context_line":"        \"\"\"Set device state"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_8ceb1912","line":319,"updated":"2016-08-25 12:56:05.000000000","message":"ditto","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        \"\"\""},{"line_number":317,"context_line":"        embedded_switch \u003d self._get_emb_eswitch(device_mac, pci_slot)"},{"line_number":318,"context_line":"        if embedded_switch:"},{"line_number":319,"context_line":"            embedded_switch.set_device_rate(pci_slot, \u0027min_tx_rate\u0027, min_kbps)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def set_device_state(self, device_mac, pci_slot, admin_state_up):"},{"line_number":322,"context_line":"        \"\"\"Set device state"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_3e537b18","line":319,"in_reply_to":"1ac06dbe_8ceb1912","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        Clear the rate configuration from VF by setting it to 0."},{"line_number":388,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":389,"context_line":"        @param rate_type: rate to clear (\u0027rate\u0027, \u0027min_tx_rate\u0027)"},{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        #NOTE(Moshe Levi): we don\u0027t use the self._get_emb_eswitch here, because"},{"line_number":392,"context_line":"        #when clearing the VF it may be not assigned. This happens when"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_accff5b1","line":389,"updated":"2016-08-25 12:56:05.000000000","message":"and max?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        Clear the rate configuration from VF by setting it to 0."},{"line_number":388,"context_line":"        @param pci_slot: VF PCI slot"},{"line_number":389,"context_line":"        @param rate_type: rate to clear (\u0027rate\u0027, \u0027min_tx_rate\u0027)"},{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        #NOTE(Moshe Levi): we don\u0027t use the self._get_emb_eswitch here, because"},{"line_number":392,"context_line":"        #when clearing the VF it may be not assigned. This happens when"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_de4a8f54","line":389,"in_reply_to":"1ac06dbe_accff5b1","updated":"2016-08-30 11:45:39.000000000","message":"Not anymore.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                embedded_switch.set_device_rate(pci_slot, rate_type, 0)"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                LOG.warning(_LW(\"VF with PCI slot %(pci_slot)s is already \""},{"line_number":404,"context_line":"                                \"assigned; skipping reset \u0027%(rate_type)s\u0027\"),"},{"line_number":405,"context_line":"                            {\u0027pci_slot\u0027: pci_slot, \u0027rate_type\u0027: rate_type})"},{"line_number":406,"context_line":"        else:"},{"line_number":407,"context_line":"            LOG.error(_LE(\"PCI slot %(pci_slot)s has no mapping to Embedded \""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_acb9b5ee","line":404,"updated":"2016-08-25 12:56:05.000000000","message":"So, if rate_type is \u0027rate\u0027, then the user will see an ambiguous warning, saying:\n\n...; skipping reset \u0027rate\u0027\n\nFrom translation perspective, we should avoid this kind of message construction. A better way would be to say:\n\n...; skipping reset for \u0027%(rate_type)s\u0027 device configuration parameter\u0027","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                embedded_switch.set_device_rate(pci_slot, rate_type, 0)"},{"line_number":402,"context_line":"            else:"},{"line_number":403,"context_line":"                LOG.warning(_LW(\"VF with PCI slot %(pci_slot)s is already \""},{"line_number":404,"context_line":"                                \"assigned; skipping reset \u0027%(rate_type)s\u0027\"),"},{"line_number":405,"context_line":"                            {\u0027pci_slot\u0027: pci_slot, \u0027rate_type\u0027: rate_type})"},{"line_number":406,"context_line":"        else:"},{"line_number":407,"context_line":"            LOG.error(_LE(\"PCI slot %(pci_slot)s has no mapping to Embedded \""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_1e9eb7b8","line":404,"in_reply_to":"1ac06dbe_acb9b5ee","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"853bc5d42bee544bd459012d8716bc0eb4a90549","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            \u0027vf_index\u0027: vf_index,"},{"line_number":196,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":197,"context_line":"        }"},{"line_number":198,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":199,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":200,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":201,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":202,"context_line":"                      log_dict)"},{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":205,"context_line":"                      log_dict)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        return self.pci_dev_wrapper.set_vf_rate(vf_index, rate_type, rate_mbps)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_2c7fd1e0","line":205,"range":{"start_line":198,"start_character":0,"end_line":205,"end_character":31},"updated":"2016-08-30 12:10:26.000000000","message":"the log message are incorrect if you will see min rate","commit_id":"46de63c42e7c229529c0f101c9db8c84d73f6860"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"eda974e776c0ea6f229c37ce68b730857e06bd0b","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            \u0027vf_index\u0027: vf_index,"},{"line_number":196,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":197,"context_line":"        }"},{"line_number":198,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":199,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":200,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":201,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":202,"context_line":"                      log_dict)"},{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":205,"context_line":"                      log_dict)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        return self.pci_dev_wrapper.set_vf_rate(vf_index, rate_type, rate_mbps)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_f2df82d3","line":205,"range":{"start_line":198,"start_character":0,"end_line":205,"end_character":31},"in_reply_to":"fa7ab95a_27c28ae9","updated":"2016-08-30 12:32:06.000000000","message":"Sorry the message is OK :)","commit_id":"46de63c42e7c229529c0f101c9db8c84d73f6860"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"abb700f1d4148291a4c23f372dcd04ec6e3ea56e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            \u0027vf_index\u0027: vf_index,"},{"line_number":196,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":197,"context_line":"        }"},{"line_number":198,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":199,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":200,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":201,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":202,"context_line":"                      log_dict)"},{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":205,"context_line":"                      log_dict)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        return self.pci_dev_wrapper.set_vf_rate(vf_index, rate_type, rate_mbps)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_27c28ae9","line":205,"range":{"start_line":198,"start_character":0,"end_line":205,"end_character":31},"in_reply_to":"fa7ab95a_2c7fd1e0","updated":"2016-08-30 12:24:31.000000000","message":"Elaborate. Or just respin.","commit_id":"46de63c42e7c229529c0f101c9db8c84d73f6860"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4a16b45db933465ef445ea5639dec22c8195fb49","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            \u0027vf_index\u0027: vf_index,"},{"line_number":196,"context_line":"            \u0027rate_type\u0027: rate_type"},{"line_number":197,"context_line":"        }"},{"line_number":198,"context_line":"        if rate_kbps % 1000 !\u003d 0:"},{"line_number":199,"context_line":"            LOG.debug(\"\u0027%(rate_type)s\u0027 for SR-IOV ports is counted in Mbps; \""},{"line_number":200,"context_line":"                      \"setting %(rate_mbps)s Mbps limit for port %(vf_index)s \""},{"line_number":201,"context_line":"                      \"instead of %(rate_kbps)s kbps\","},{"line_number":202,"context_line":"                      log_dict)"},{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            LOG.debug(\"Setting %(rate_mbps)s Mbps limit for port %(vf_index)s\","},{"line_number":205,"context_line":"                      log_dict)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        return self.pci_dev_wrapper.set_vf_rate(vf_index, rate_type, rate_mbps)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_0ef2c806","line":205,"range":{"start_line":198,"start_character":0,"end_line":205,"end_character":31},"in_reply_to":"fa7ab95a_f2df82d3","updated":"2016-08-31 07:23:56.000000000","message":"It\u0027s correct, yes.","commit_id":"46de63c42e7c229529c0f101c9db8c84d73f6860"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/extension_drivers/qos_driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9f51f9b72a275a632a69c00424e49e6641cf919f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                    device, pci_slot, min_tx_kbps)"},{"line_number":88,"context_line":"            except exc.SriovNicError:"},{"line_number":89,"context_line":"                LOG.exception("},{"line_number":90,"context_line":"                    _LE(\"Failed to set device %s min_tx_rate\"), device)"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            LOG.info(_LI(\"No device with MAC %s defined on agent.\"), device)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_a8a90526","line":90,"updated":"2016-08-02 09:16:14.000000000","message":"do you want to raise an error here? what are the consequences if this fails?","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a572a9cc0c92b7215577702227b84e8b25cc764b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                    device, pci_slot, min_tx_kbps)"},{"line_number":88,"context_line":"            except exc.SriovNicError:"},{"line_number":89,"context_line":"                LOG.exception("},{"line_number":90,"context_line":"                    _LE(\"Failed to set device %s min_tx_rate\"), device)"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            LOG.info(_LI(\"No device with MAC %s defined on agent.\"), device)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bacf61ea_f8ac68a0","line":90,"in_reply_to":"bacf61ea_a8a90526","updated":"2016-08-02 11:25:16.000000000","message":"I applied the same logic used in _set_vf_max_rate.\n\nThe exception is caught by the \"except\" branch. The consequence is the min_tx_rate won\u0027t be applied to the sr-iov port, but the L2 agent will continue running.","commit_id":"83612473ce98928ec1931e7aff1e04d2752cf435"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            LOG.info(_LI(\"No device with MAC %s defined on agent.\"), device)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def create_minimum_bandwidth(self, port, rule):"},{"line_number":68,"context_line":"        self.update_minimum_bandwidth(port, rule)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def update_minimum_bandwidth(self, port, rule):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_cce991b9","line":67,"updated":"2016-08-25 12:56:05.000000000","message":"Those handlers are almost identical to those for max bwlimit. Could we deduplicate the code, so that the only difference is the eswitch manager function to call?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            LOG.info(_LI(\"No device with MAC %s defined on agent.\"), device)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def create_minimum_bandwidth(self, port, rule):"},{"line_number":68,"context_line":"        self.update_minimum_bandwidth(port, rule)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def update_minimum_bandwidth(self, port, rule):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_9e4e4739","line":67,"in_reply_to":"1ac06dbe_cce991b9","updated":"2016-08-30 11:45:39.000000000","message":"I will just add a TODO here.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3eeb670d62109bd228e8584392a48e9570ebf3b5","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        :return: True if installed version date is \u003e\u003d min_version."},{"line_number":232,"context_line":"        \"\"\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        if self.version \u003e\u003d min_version:"},{"line_number":235,"context_line":"            return True"},{"line_number":236,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_a464e921","line":234,"updated":"2016-07-26 13:00:35.000000000","message":"1) Who sets self.version\n\n2) The version string can be older and still contain the new parameters (backport of just the specific parameters into a stable version with a different version string).\n\n\n3) We agreed not to do this kind of runtime checks in neutron, in the sanity checks: https://github.com/openstack/neutron/blob/master/neutron/cmd/sanity/checks.py which are ran via a separate command by the administrator.","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"470ff17bb813f0588fb5e7c4af3b9f85cc61329f","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        :return: True if installed version date is \u003e\u003d min_version."},{"line_number":232,"context_line":"        \"\"\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        if self.version \u003e\u003d min_version:"},{"line_number":235,"context_line":"            return True"},{"line_number":236,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_5ebe90ae","line":234,"in_reply_to":"dada55a8_a464e921","updated":"2016-07-26 16:08:04.000000000","message":"1) ip_lib.IPWrapper:\n    @property\n    def version(self):\nhttps://review.openstack.org/#/c/347302/1/neutron/agent/linux/ip_lib.py@254\n\n2) The unique way I had to see this is looking at the code. Now the first version containing this feature is 3.16.0. If there is any change I\u0027ll update the version number.\n\n3) I\u0027ll move this check to sanity/checks.py, using the cmd exit and parsing it.","commit_id":"39e677db20e9949b195fb3dd77c5e0a0f4bb9512"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cf02304f522980309ebd61c524ccfd8565ee507d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":23,"context_line":"    import exceptions as exc"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_cc3698e6","line":25,"updated":"2016-07-29 08:26:16.000000000","message":"not relevant to the patch","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d88cfb4198d5ed87cd9c967afba4c86f6825b6cc","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"},{"line_number":23,"context_line":"    import exceptions as exc"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_61d16e57","line":25,"in_reply_to":"bacf61ea_cc3698e6","updated":"2016-07-29 10:40:16.000000000","message":"Done","commit_id":"914b0f9ccd76fca38cb0f40115e1dca3970bb699"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        setting \u003d \"on\" if enabled else \"off\""},{"line_number":139,"context_line":"        self._set_feature(vf_index, \"spoofchk\", setting)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def set_vf_rate(self, vf_index, rate_type, rate_value):"},{"line_number":142,"context_line":"        \"\"\"sets vf rate."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        @param vf_index: vf index"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_ec344d4b","line":141,"updated":"2016-08-25 12:56:05.000000000","message":"I assume this module is not for public consumption, that\u0027s why we can safely remove set_vf_max_rate method. Right?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        \"\"\"sets vf rate."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        @param vf_index: vf index"},{"line_number":145,"context_line":"        @param rate_type: vf rate type (\u0027rate\u0027, \u0027min_tx_rate\u0027)"},{"line_number":146,"context_line":"        @param rate_value: vf rate in Mbps"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        self._set_feature(vf_index, rate_type, str(rate_value))"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_6c497dd0","line":145,"updated":"2016-08-25 12:56:05.000000000","message":"and max?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        \"\"\"sets vf rate."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        @param vf_index: vf index"},{"line_number":145,"context_line":"        @param rate_type: vf rate type (\u0027rate\u0027, \u0027min_tx_rate\u0027)"},{"line_number":146,"context_line":"        @param rate_value: vf rate in Mbps"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        self._set_feature(vf_index, rate_type, str(rate_value))"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_9e23a755","line":145,"in_reply_to":"1ac06dbe_6c497dd0","updated":"2016-08-30 11:45:39.000000000","message":"Nope.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"}],"neutron/tests/unit/objects/qos/test_rule.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def setUp(self):"},{"line_number":117,"context_line":"        super(QosDscpMarkingRuleDbObjectTestCase, self).setUp()"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Prepare policy to be able to insert a rule"},{"line_number":120,"context_line":"        for obj in self.db_objs:"},{"line_number":121,"context_line":"            generated_qos_policy_id \u003d obj[\u0027qos_policy_id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_d0741bff","line":118,"updated":"2016-08-05 12:18:57.000000000","message":"unrelated change, please undo it","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def setUp(self):"},{"line_number":117,"context_line":"        super(QosDscpMarkingRuleDbObjectTestCase, self).setUp()"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Prepare policy to be able to insert a rule"},{"line_number":120,"context_line":"        for obj in self.db_objs:"},{"line_number":121,"context_line":"            generated_qos_policy_id \u003d obj[\u0027qos_policy_id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_b4e870b4","line":118,"in_reply_to":"bacf61ea_d0741bff","updated":"2016-08-05 17:03:04.000000000","message":"Done","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_eswitch_manager.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                 self.PCI_SLOT, 1000)"},{"line_number":181,"context_line":"            get_pci_mock.assert_called_once_with(self.PCI_SLOT)"},{"line_number":182,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":183,"context_line":"                self.PCI_SLOT, \u0027rate\u0027, 1000)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_set_device_rate_min_tx_rate(self):"},{"line_number":186,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_10199388","line":183,"range":{"start_line":183,"start_character":31,"end_line":183,"end_character":37},"updated":"2016-08-05 12:18:57.000000000","message":"please use const for \u0027rate\u0027","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                 self.PCI_SLOT, 1000)"},{"line_number":181,"context_line":"            get_pci_mock.assert_called_once_with(self.PCI_SLOT)"},{"line_number":182,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":183,"context_line":"                self.PCI_SLOT, \u0027rate\u0027, 1000)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_set_device_rate_min_tx_rate(self):"},{"line_number":186,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_14fb3c7a","line":183,"range":{"start_line":183,"start_character":31,"end_line":183,"end_character":37},"in_reply_to":"bacf61ea_10199388","updated":"2016-08-05 17:03:04.000000000","message":"Done","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                                                    self.PCI_SLOT, 1000)"},{"line_number":194,"context_line":"            get_pci_mock.assert_called_once_with(self.PCI_SLOT)"},{"line_number":195,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":196,"context_line":"                self.PCI_SLOT, \u0027min_tx_rate\u0027, 1000)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_set_device_status_mismatch(self):"},{"line_number":199,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_230bb325","line":196,"range":{"start_line":196,"start_character":16,"end_line":196,"end_character":50},"updated":"2016-08-05 12:18:57.000000000","message":"please use const for min_tx_rate","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                                                    self.PCI_SLOT, 1000)"},{"line_number":194,"context_line":"            get_pci_mock.assert_called_once_with(self.PCI_SLOT)"},{"line_number":195,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":196,"context_line":"                self.PCI_SLOT, \u0027min_tx_rate\u0027, 1000)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_set_device_status_mismatch(self):"},{"line_number":199,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_f4f5c882","line":196,"range":{"start_line":196,"start_character":16,"end_line":196,"end_character":50},"in_reply_to":"bacf61ea_230bb325","updated":"2016-08-05 17:03:04.000000000","message":"Done","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":265,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":266,"context_line":"    def test_clear_rate_max_rate_nonexisting_pci_slot(self, set_rate_mock):"},{"line_number":267,"context_line":"        self.eswitch_mgr.clear_rate(self.WRONG_PCI, \u0027rate\u0027)"},{"line_number":268,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":271,"context_line":"                \"PciDeviceIPWrapper.get_assigned_macs\","},{"line_number":272,"context_line":"                return_value\u003d{})"},{"line_number":273,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":274,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":275,"context_line":"    def test_clear_rate_min_tx_rate_existing_pci_slot(self, set_rate_mock,"},{"line_number":276,"context_line":"                                                      *args):"},{"line_number":277,"context_line":"        self.eswitch_mgr.clear_rate(self.PCI_SLOT, \u0027min_tx_rate\u0027)"},{"line_number":278,"context_line":"        set_rate_mock.assert_called_once_with(self.PCI_SLOT, \u0027min_tx_rate\u0027, 0)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":281,"context_line":"                \"PciDeviceIPWrapper.get_assigned_macs\","},{"line_number":282,"context_line":"                return_value\u003d{0: ASSIGNED_MAC})"},{"line_number":283,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":284,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":285,"context_line":"    def test_clear_rate_min_tx_rate_exist_and_assigned_pci("},{"line_number":286,"context_line":"            self, set_rate_mock, *args):"},{"line_number":287,"context_line":"        self.eswitch_mgr.clear_rate(self.PCI_SLOT, \u0027min_tx_rate\u0027)"},{"line_number":288,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":291,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":292,"context_line":"    def test_clear_rate_min_tx_rate_nonexisting_pci_slot(self, set_rate_mock):"},{"line_number":293,"context_line":"        self.eswitch_mgr.clear_rate(self.WRONG_PCI, \u0027min_tx_rate\u0027)"},{"line_number":294,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"class TestEmbSwitch(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_e3635baf","line":294,"range":{"start_line":266,"start_character":4,"end_line":294,"end_character":46},"updated":"2016-08-05 12:18:57.000000000","message":"I think you can refactor the tests \nthat you will have one of each and just add the \"rate type\" you want to tests.\n\nfor example:\ndef _test_clear_rate_nonexisting_pci_slot(self, set_rate_mock, rate_type):\n    self.eswitch_mgr.clear_rate(self.WRONG_PCI, \u0027min_tx_rate\u0027)\n    self.assertFalse(set_rate_mock.called)\n\ndef test_clear_rate_min_tx_rate_exist_and_assigned_pci(self):\n    self._test_clear_rate_nonexisting_pci_slot(\u0027min_tx_rate\u0027)\n\ndef test_clear_rate_max_rate_exist_and_assigned_pci(self):\n    self._test_clear_rate_nonexisting_pci_slot(\u0027rate\u0027)","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":265,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":266,"context_line":"    def test_clear_rate_max_rate_nonexisting_pci_slot(self, set_rate_mock):"},{"line_number":267,"context_line":"        self.eswitch_mgr.clear_rate(self.WRONG_PCI, \u0027rate\u0027)"},{"line_number":268,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":271,"context_line":"                \"PciDeviceIPWrapper.get_assigned_macs\","},{"line_number":272,"context_line":"                return_value\u003d{})"},{"line_number":273,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":274,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":275,"context_line":"    def test_clear_rate_min_tx_rate_existing_pci_slot(self, set_rate_mock,"},{"line_number":276,"context_line":"                                                      *args):"},{"line_number":277,"context_line":"        self.eswitch_mgr.clear_rate(self.PCI_SLOT, \u0027min_tx_rate\u0027)"},{"line_number":278,"context_line":"        set_rate_mock.assert_called_once_with(self.PCI_SLOT, \u0027min_tx_rate\u0027, 0)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":281,"context_line":"                \"PciDeviceIPWrapper.get_assigned_macs\","},{"line_number":282,"context_line":"                return_value\u003d{0: ASSIGNED_MAC})"},{"line_number":283,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":284,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":285,"context_line":"    def test_clear_rate_min_tx_rate_exist_and_assigned_pci("},{"line_number":286,"context_line":"            self, set_rate_mock, *args):"},{"line_number":287,"context_line":"        self.eswitch_mgr.clear_rate(self.PCI_SLOT, \u0027min_tx_rate\u0027)"},{"line_number":288,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":291,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_rate\")"},{"line_number":292,"context_line":"    def test_clear_rate_min_tx_rate_nonexisting_pci_slot(self, set_rate_mock):"},{"line_number":293,"context_line":"        self.eswitch_mgr.clear_rate(self.WRONG_PCI, \u0027min_tx_rate\u0027)"},{"line_number":294,"context_line":"        self.assertFalse(set_rate_mock.called)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"class TestEmbSwitch(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_af849dd2","line":294,"range":{"start_line":266,"start_character":4,"end_line":294,"end_character":46},"in_reply_to":"bacf61ea_e3635baf","updated":"2016-08-05 17:03:04.000000000","message":"Good idea!","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    PCI_SLOT \u003d \u00270000:06:00.1\u0027"},{"line_number":72,"context_line":"    WRONG_MAC \u003d \u002700:00:00:00:00:67\u0027"},{"line_number":73,"context_line":"    WRONG_PCI \u003d \"0000:06:00.6\""},{"line_number":74,"context_line":"    MAX_RATE \u003d \u0027rate\u0027"},{"line_number":75,"context_line":"    MIN_RATE \u003d \u0027min_tx_rate\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_2cdb05ef","line":74,"updated":"2016-08-25 12:56:05.000000000","message":"Use constants you introduced in prev patch.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    PCI_SLOT \u003d \u00270000:06:00.1\u0027"},{"line_number":72,"context_line":"    WRONG_MAC \u003d \u002700:00:00:00:00:67\u0027"},{"line_number":73,"context_line":"    WRONG_PCI \u003d \"0000:06:00.6\""},{"line_number":74,"context_line":"    MAX_RATE \u003d \u0027rate\u0027"},{"line_number":75,"context_line":"    MIN_RATE \u003d \u0027min_tx_rate\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_feebd3d9","line":74,"in_reply_to":"1ac06dbe_2cdb05ef","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            self.eswitch_mgr.set_device_state(self.ASSIGNED_MAC,"},{"line_number":172,"context_line":"                                              self.PCI_SLOT, True)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_set_device_rate_max_rate(self):"},{"line_number":175,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":176,"context_line":"                        \"eswitch_manager.EmbSwitch.get_pci_device\","},{"line_number":177,"context_line":"                        return_value\u003dself.ASSIGNED_MAC) as get_pci_mock,\\"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_6cfcdd3e","line":174,"updated":"2016-08-25 12:56:05.000000000","message":"why the renaming? the test still targets set_device_max_rate.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            self.eswitch_mgr.set_device_state(self.ASSIGNED_MAC,"},{"line_number":172,"context_line":"                                              self.PCI_SLOT, True)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_set_device_rate_max_rate(self):"},{"line_number":175,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":176,"context_line":"                        \"eswitch_manager.EmbSwitch.get_pci_device\","},{"line_number":177,"context_line":"                        return_value\u003dself.ASSIGNED_MAC) as get_pci_mock,\\"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_9ed1e725","line":174,"in_reply_to":"1ac06dbe_6cfcdd3e","updated":"2016-08-30 11:45:39.000000000","message":"Reverted to the previous name.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":185,"context_line":"                self.PCI_SLOT, self.MAX_RATE, 1000)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def test_set_device_rate_min_tx_rate(self):"},{"line_number":188,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":189,"context_line":"                        \"eswitch_manager.EmbSwitch.get_pci_device\","},{"line_number":190,"context_line":"                        return_value\u003dself.ASSIGNED_MAC) as get_pci_mock,\\"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_ccb87178","line":187,"updated":"2016-08-25 12:56:05.000000000","message":"should be: test_set_device_min_tx_rate(self) to reflect name of the method you target.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            set_device_rate_mock.assert_called_once_with("},{"line_number":185,"context_line":"                self.PCI_SLOT, self.MAX_RATE, 1000)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def test_set_device_rate_min_tx_rate(self):"},{"line_number":188,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":189,"context_line":"                        \"eswitch_manager.EmbSwitch.get_pci_device\","},{"line_number":190,"context_line":"                        return_value\u003dself.ASSIGNED_MAC) as get_pci_mock,\\"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_1ea4f7b7","line":187,"in_reply_to":"1ac06dbe_ccb87178","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":397,"context_line":"                        \"PciDeviceIPWrapper.set_vf_rate\") as pci_lib_mock:"},{"line_number":398,"context_line":"            self.emb_switch.set_device_rate(self.PCI_SLOT, \u0027rate\u0027, 2000)"},{"line_number":399,"context_line":"            pci_lib_mock.assert_called_with(0, \u0027rate\u0027, 2)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def test_set_device_max_rate_ok2(self):"},{"line_number":402,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_cc6fd1fa","line":399,"updated":"2016-08-25 12:56:05.000000000","message":"to use constants","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":397,"context_line":"                        \"PciDeviceIPWrapper.set_vf_rate\") as pci_lib_mock:"},{"line_number":398,"context_line":"            self.emb_switch.set_device_rate(self.PCI_SLOT, \u0027rate\u0027, 2000)"},{"line_number":399,"context_line":"            pci_lib_mock.assert_called_with(0, \u0027rate\u0027, 2)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    def test_set_device_max_rate_ok2(self):"},{"line_number":402,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_dec36f36","line":399,"in_reply_to":"1ac06dbe_cc6fd1fa","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"cf02304f522980309ebd61c524ccfd8565ee507d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_ec69dcbf","side":"PARENT","line":16,"updated":"2016-07-29 08:26:16.000000000","message":"unrelated to the patch","commit_id":"c50fa0f47519b3356838206204dcb3869783cd9a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d88cfb4198d5ed87cd9c967afba4c86f6825b6cc","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.ml2.drivers.mech_sriov.agent.common \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_679fc5b4","side":"PARENT","line":16,"in_reply_to":"bacf61ea_ec69dcbf","updated":"2016-07-29 10:40:16.000000000","message":"Done","commit_id":"c50fa0f47519b3356838206204dcb3869783cd9a"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                              \u0027rate\u0027,"},{"line_number":146,"context_line":"                              1000)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_set_vf_rate_min_tx_rate(self):"},{"line_number":149,"context_line":"        with mock.patch.object(self.pci_wrapper, \"_as_root\") as mock_as_root:"},{"line_number":150,"context_line":"            result \u003d self.pci_wrapper.set_vf_rate(self.VF_INDEX, \u0027min_tx_rate\u0027,"},{"line_number":151,"context_line":"                                                  1000)"},{"line_number":152,"context_line":"            self.assertIsNone(result)"},{"line_number":153,"context_line":"            mock_as_root.assert_called_once_with([], \"link\","},{"line_number":154,"context_line":"                (\"set\", self.DEV_NAME, \"vf\", str(self.VF_INDEX), \"min_tx_rate\","},{"line_number":155,"context_line":"                \u00271000\u0027))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_set_vf_rate_min_tx_rate_fail(self):"},{"line_number":158,"context_line":"        with mock.patch.object(self.pci_wrapper, \"_execute\") as mock_exec:"},{"line_number":159,"context_line":"            mock_exec.side_effect \u003d Exception()"},{"line_number":160,"context_line":"            self.assertRaises(exc.IpCommandDeviceError,"},{"line_number":161,"context_line":"                              self.pci_wrapper.set_vf_rate,"},{"line_number":162,"context_line":"                              self.VF_INDEX,"},{"line_number":163,"context_line":"                              \u0027min_tx_rate\u0027,"},{"line_number":164,"context_line":"                              1000)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def test_set_vf_state_not_supported(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_c34617bf","line":163,"range":{"start_line":148,"start_character":0,"end_line":163,"end_character":44},"updated":"2016-08-05 12:18:57.000000000","message":"same comment as previous file. combining the rate and min_tx_rate with the same _test... method and just passing the rate ot min_tx_rate type","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                              \u0027rate\u0027,"},{"line_number":146,"context_line":"                              1000)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def test_set_vf_rate_min_tx_rate(self):"},{"line_number":149,"context_line":"        with mock.patch.object(self.pci_wrapper, \"_as_root\") as mock_as_root:"},{"line_number":150,"context_line":"            result \u003d self.pci_wrapper.set_vf_rate(self.VF_INDEX, \u0027min_tx_rate\u0027,"},{"line_number":151,"context_line":"                                                  1000)"},{"line_number":152,"context_line":"            self.assertIsNone(result)"},{"line_number":153,"context_line":"            mock_as_root.assert_called_once_with([], \"link\","},{"line_number":154,"context_line":"                (\"set\", self.DEV_NAME, \"vf\", str(self.VF_INDEX), \"min_tx_rate\","},{"line_number":155,"context_line":"                \u00271000\u0027))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_set_vf_rate_min_tx_rate_fail(self):"},{"line_number":158,"context_line":"        with mock.patch.object(self.pci_wrapper, \"_execute\") as mock_exec:"},{"line_number":159,"context_line":"            mock_exec.side_effect \u003d Exception()"},{"line_number":160,"context_line":"            self.assertRaises(exc.IpCommandDeviceError,"},{"line_number":161,"context_line":"                              self.pci_wrapper.set_vf_rate,"},{"line_number":162,"context_line":"                              self.VF_INDEX,"},{"line_number":163,"context_line":"                              \u0027min_tx_rate\u0027,"},{"line_number":164,"context_line":"                              1000)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def test_set_vf_state_not_supported(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bacf61ea_0724ad0a","line":163,"range":{"start_line":148,"start_character":0,"end_line":163,"end_character":44},"in_reply_to":"bacf61ea_c34617bf","updated":"2016-08-05 17:03:04.000000000","message":"Done","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self._set_vf_rate(\u0027min_tx_rate\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_set_vf_rate_min_tx_rate_fail(self):"},{"line_number":159,"context_line":"        self._set_vf_rate(\u0027min_tx_rate\u0027, passed\u003dFalse)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test_set_vf_state_not_supported(self):"},{"line_number":162,"context_line":"        with mock.patch.object(self.pci_wrapper,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ac06dbe_ac49b590","line":159,"updated":"2016-08-25 12:56:05.000000000","message":"any case for max_* too?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self._set_vf_rate(\u0027min_tx_rate\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_set_vf_rate_min_tx_rate_fail(self):"},{"line_number":159,"context_line":"        self._set_vf_rate(\u0027min_tx_rate\u0027, passed\u003dFalse)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test_set_vf_state_not_supported(self):"},{"line_number":162,"context_line":"        with mock.patch.object(self.pci_wrapper,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa7ab95a_fedf53d3","line":159,"in_reply_to":"1ac06dbe_ac49b590","updated":"2016-08-30 11:45:39.000000000","message":"Not anymore.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"}],"releasenotes/notes/add-minimum-bandwidth-support-sriov-63664b89f4dd1c1b.yaml":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Added support in SR-IOV backend for minimum guaranteed bandwidth for"},{"line_number":4,"context_line":"    egress traffic, from the tenant point of view."},{"line_number":5,"context_line":"    This new feature is part of the spec"},{"line_number":6,"context_line":"    `Minimum bandwidth support (egress) \u003chttps://github.com/openstack/neutron-specs/blob/master/specs/newton/ml2-qos-minimum-egress-bw-support.rst\u003e`_"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"1ac06dbe_2c25c5c1","line":3,"updated":"2016-08-25 12:56:05.000000000","message":"stop using prelude for everything. it\u0027s not supposed to be polluted by all features, just very major release wide notes go there.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Added support in SR-IOV backend for minimum guaranteed bandwidth for"},{"line_number":4,"context_line":"    egress traffic, from the tenant point of view."},{"line_number":5,"context_line":"    This new feature is part of the spec"},{"line_number":6,"context_line":"    `Minimum bandwidth support (egress) \u003chttps://github.com/openstack/neutron-specs/blob/master/specs/newton/ml2-qos-minimum-egress-bw-support.rst\u003e`_"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"fa7ab95a_1e98771b","line":3,"in_reply_to":"1ac06dbe_2c25c5c1","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    This new feature is part of the spec"},{"line_number":6,"context_line":"    `Minimum bandwidth support (egress) \u003chttps://github.com/openstack/neutron-specs/blob/master/specs/newton/ml2-qos-minimum-egress-bw-support.rst\u003e`_"},{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"1ac06dbe_ac17f552","line":8,"updated":"2016-08-25 12:56:05.000000000","message":"I like this section. I believe that\u0027s the only thing that should go in release notes.","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    This new feature is part of the spec"},{"line_number":6,"context_line":"    `Minimum bandwidth support (egress) \u003chttps://github.com/openstack/neutron-specs/blob/master/specs/newton/ml2-qos-minimum-egress-bw-support.rst\u003e`_"},{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"fa7ab95a_3e9b7b19","line":8,"in_reply_to":"1ac06dbe_ac17f552","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"},{"line_number":12,"context_line":"    of ``ip-link`` supporting these parameters is ``iproute2-ss140804``,"},{"line_number":13,"context_line":"    git tag ``v3.16.0``."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"1ac06dbe_97016207","line":10,"updated":"2016-08-25 12:56:05.000000000","message":"Note that each section is formed independently, so you cannot assume here that readers now the context (\u0027this feature\u0027).","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"},{"line_number":12,"context_line":"    of ``ip-link`` supporting these parameters is ``iproute2-ss140804``,"},{"line_number":13,"context_line":"    git tag ``v3.16.0``."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"fa7ab95a_9e7ac7bb","line":10,"in_reply_to":"1ac06dbe_97016207","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5458e7a96231ee8cd8da1eb18efa5c8635e75de","unresolved":false,"context_lines":[{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"},{"line_number":12,"context_line":"    of ``ip-link`` supporting these parameters is ``iproute2-ss140804``,"},{"line_number":13,"context_line":"    git tag ``v3.16.0``."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"1ac06dbe_7734a6dd","line":11,"updated":"2016-08-25 12:56:05.000000000","message":"That is just wrong, we never use max_* in the agent, so why would we suggest it\u0027s required?","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"87c02d86af282ded7ce3ad0dee5eacd01e93cd94","unresolved":false,"context_lines":[{"line_number":8,"context_line":"  - SR-IOV now supports egress minimum guaranteed bandwidth configuration."},{"line_number":9,"context_line":"other:"},{"line_number":10,"context_line":"  - In order to use this feature, \u0027ip-link\u0027 must support extended VF"},{"line_number":11,"context_line":"    management parameters ``min_tx_rate`` and ``max_tx_rate``. Minimum version"},{"line_number":12,"context_line":"    of ``ip-link`` supporting these parameters is ``iproute2-ss140804``,"},{"line_number":13,"context_line":"    git tag ``v3.16.0``."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"fa7ab95a_3e69bbf9","line":11,"in_reply_to":"1ac06dbe_7734a6dd","updated":"2016-08-30 11:45:39.000000000","message":"Done","commit_id":"47bd80bc6945a8be682d9c3cb729226af2ac799e"}],"releasenotes/notes/add-vf-extended-management-option-434697dc32d8c4a5.yaml":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"da59a5530cd317f1f386e8559c0d2f8726dac9d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"  Added new configuration option in ``SRIOV_NIC`` section. This boolean"},{"line_number":4,"context_line":"  configuration parameter should be set to ``True`` in case ``ip-link`` version"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"bacf61ea_63876bb5","line":1,"updated":"2016-08-05 12:18:57.000000000","message":"shouldn\u0027t there be a reno that SR-IOV agent support bandwidth guarantee? and if so I think you need to split this commit to 2. one for the extended VF management parameters and another for adding support of  bandwidth guarantee for SR-IOV","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1ebf59997e54adc78577b0d5453912116c3fe15d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"  Added new configuration option in ``SRIOV_NIC`` section. This boolean"},{"line_number":4,"context_line":"  configuration parameter should be set to ``True`` in case ``ip-link`` version"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"bacf61ea_4a66acbb","line":1,"in_reply_to":"bacf61ea_63876bb5","updated":"2016-08-05 17:03:04.000000000","message":"Ok, I\u0027ll split extended VF and SR-IOV backend in two commits.\n\nNew commit for VF extended management parameters: https://review.openstack.org/#/c/351833/","commit_id":"1d0c8beeb261f2af43f4323b0a2cd89edb2161fc"}]}
