)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pair the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_7f49ce8a","line":9,"updated":"2015-08-18 12:20:42.000000000","message":"pair -\u003e pairs","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pair the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_965e0411","line":9,"in_reply_to":"fa1b9901_7f49ce8a","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pair the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_9f31420e","line":11,"updated":"2015-08-18 12:20:42.000000000","message":"It is also change -\u003e It also changes, before pass -\u003e before passing","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pair the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_968cc480","line":11,"in_reply_to":"fa1b9901_9f31420e","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_ff2cfeac","line":13,"updated":"2015-08-18 12:20:42.000000000","message":"identifer -\u003e identifier","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_f6f3c008","line":13,"in_reply_to":"fa1b9901_ff2cfeac","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_3f7596ca","line":14,"updated":"2015-08-18 12:20:42.000000000","message":"known_port","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"It is also change the port_id to be mac before pass it to"},{"line_number":12,"context_line":"the agent extension. This is required because mac is the key"},{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_b6dea86b","line":14,"in_reply_to":"fa1b9901_3f7596ca","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_ff7e3ead","line":16,"updated":"2015-08-18 12:20:42.000000000","message":"Partially-Implements:","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"identifer for the VF port and on extention port delete api will"},{"line_number":14,"context_line":"allow to remove it from the know_port list of the qos_extension."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Icc3a9599c6d7a4de9c56b452dfab7909c8d0a576"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_b621c84f","line":16,"in_reply_to":"fa1b9901_ff7e3ead","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-08-25 16:03:12 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pairs the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also add a maaping between mac to port_id so we can pass it"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_f2a6f0a9","line":8,"updated":"2015-08-26 15:01:20.000000000","message":"Can you please add the reason for this change, since it is not linked to any bug report and I didn\u0027t find enough details in the blueprint","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-08-25 16:03:12 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pairs the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also add a maaping between mac to port_id so we can pass it"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_7b049b7d","line":8,"in_reply_to":"fa1b9901_f2a6f0a9","updated":"2015-08-27 09:30:40.000000000","message":"I add more description in the message","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pairs the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also add a maaping between mac to port_id so we can pass it"},{"line_number":12,"context_line":"when calling the  extention port delete api."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially-Implements: blueprint ml2-sriov-qos-with-bwlimiting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_b2795895","line":11,"updated":"2015-08-26 15:01:20.000000000","message":"mapping","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch pairs the mac and pci_slot for a device (VF) instead of"},{"line_number":10,"context_line":"searching the pci_slot when calling extension delete."},{"line_number":11,"context_line":"It is also add a maaping between mac to port_id so we can pass it"},{"line_number":12,"context_line":"when calling the  extention port delete api."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partially-Implements: blueprint ml2-sriov-qos-with-bwlimiting"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_1bcf9f57","line":11,"in_reply_to":"fa1b9901_b2795895","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"94fe276a3403b43553c4494348bc5bad69ef4d16","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-08-27 12:27:53 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_b2dd6416","line":8,"updated":"2015-08-27 12:57:52.000000000","message":"I think it worth to mention that you need to keep pci slot details locally in the agent since upon removal event you cannot get pci_slot from the neutron server as it is for create/update since port is already removed from neutron.","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"536b1c6cc0a6e7ff341d7194bd3679c70a510e34","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-08-27 12:27:53 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_cf8dca32","line":8,"in_reply_to":"da20952f_b2dd6416","updated":"2015-08-27 15:48:21.000000000","message":"Done","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"94fe276a3403b43553c4494348bc5bad69ef4d16","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"},{"line_number":12,"context_line":"to reset. Also newer libvirt version reset the mac when deleteing VM, so than it is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_57115a51","line":9,"updated":"2015-08-27 12:57:52.000000000","message":"need the pci slot details","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"536b1c6cc0a6e7ff341d7194bd3679c70a510e34","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Qos SR-IOV: Refactor extension delete to get mac and pci slot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"},{"line_number":12,"context_line":"to reset. Also newer libvirt version reset the mac when deleteing VM, so than it is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_6f991e6e","line":9,"in_reply_to":"da20952f_57115a51","updated":"2015-08-27 15:48:21.000000000","message":"Done","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"94fe276a3403b43553c4494348bc5bad69ef4d16","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"},{"line_number":12,"context_line":"to reset. Also newer libvirt version reset the mac when deleteing VM, so than it is"},{"line_number":13,"context_line":"not possible at all."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_7757be02","line":11,"updated":"2015-08-27 12:57:52.000000000","message":"what does it mean eswitch manager  will remove  pci slot? will remove pci_slot details from its internal data structure?","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"536b1c6cc0a6e7ff341d7194bd3679c70a510e34","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When calling delete we need the pci slot to reset the VF rate. The problem"},{"line_number":10,"context_line":"is that when the VM is deleted libvirt return the VF to the hypervisor and eswitch"},{"line_number":11,"context_line":"manager will remove the pci_slot so can\u0027t know from the mac which pci slot (VF)"},{"line_number":12,"context_line":"to reset. Also newer libvirt version reset the mac when deleteing VM, so than it is"},{"line_number":13,"context_line":"not possible at all."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_bb4f7891","line":11,"in_reply_to":"da20952f_7757be02","updated":"2015-08-27 15:48:21.000000000","message":"I changed it to say that eswitch manager will unassigned the pci slot","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            pci_list.append(pci_slot)"},{"line_number":142,"context_line":"        if vf_list:"},{"line_number":143,"context_line":"            assigned_macs \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            assigend_devices \u003d zip(assigned_macs, pci_list)"},{"line_number":145,"context_line":"        return assigend_devices"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def get_device_state(self, pci_slot):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_3a112453","line":144,"updated":"2015-08-18 12:20:42.000000000","message":"assigned_devices","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            pci_list.append(pci_slot)"},{"line_number":142,"context_line":"        if vf_list:"},{"line_number":143,"context_line":"            assigned_macs \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            assigend_devices \u003d zip(assigned_macs, pci_list)"},{"line_number":145,"context_line":"        return assigend_devices"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def get_device_state(self, pci_slot):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_d691dc53","line":144,"in_reply_to":"fa1b9901_3a112453","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        @param pci_slot: pci_slot mac"},{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it maybe not assigned. This happens when libvirt"},{"line_number":370,"context_line":"        #release the VF back to the hypervisor on delete VM, Therefore we"},{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_5a20989b","line":369,"updated":"2015-08-18 12:20:42.000000000","message":"maybe not assigned -\u003e may be unassigned","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        @param pci_slot: pci_slot mac"},{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it maybe not assigned. This happens when libvirt"},{"line_number":370,"context_line":"        #release the VF back to the hypervisor on delete VM, Therefore we"},{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_36905843","line":369,"in_reply_to":"fa1b9901_5a20989b","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a3e784d180215a7874be5a5238940570f8a823dc","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it maybe not assigned. This happens when libvirt"},{"line_number":370,"context_line":"        #release the VF back to the hypervisor on delete VM, Therefore we"},{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_9a4dd074","line":370,"updated":"2015-08-18 12:20:42.000000000","message":"release -\u003e releases. Dot after \u0027VM.","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e78b3fe07ca3440075f79a19efc20b5c2ea44f6f","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it maybe not assigned. This happens when libvirt"},{"line_number":370,"context_line":"        #release the VF back to the hypervisor on delete VM, Therefore we"},{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_b6a468a6","line":370,"in_reply_to":"fa1b9901_9a4dd074","updated":"2015-08-18 14:32:11.000000000","message":"Done","commit_id":"2b6b7442f860a17274c114db8db37005aba46c98"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_assigned_devices(self):"},{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        vf_list \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_95075ec9","line":130,"updated":"2015-08-26 15:01:20.000000000","message":"I would suggest to add more verbose docstring and maybe rename the method, since it also creates mappings and not only gets assigned devices","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_assigned_devices(self):"},{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        vf_list \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_61b625de","line":130,"in_reply_to":"fa1b9901_95075ec9","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        \"\"\"Clear the max rate"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":366,"context_line":"        @param pci_slot: pci_slot mac"},{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_15d4aee9","line":366,"updated":"2015-08-26 15:01:20.000000000","message":"remove mac","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        \"\"\"Clear the max rate"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":366,"context_line":"        @param pci_slot: pci_slot mac"},{"line_number":367,"context_line":"        \"\"\""},{"line_number":368,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":369,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_5eb505cb","line":366,"in_reply_to":"fa1b9901_15d4aee9","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":374,"context_line":"        if embedded_switch:"},{"line_number":375,"context_line":"            embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_a5f7d3d1","line":374,"updated":"2015-08-26 15:01:20.000000000","message":"should there be some log message if no embedded_switch found?","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"},{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":374,"context_line":"        if embedded_switch:"},{"line_number":375,"context_line":"            embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_3eb051dd","line":374,"in_reply_to":"fa1b9901_a5f7d3d1","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":374,"context_line":"        if embedded_switch:"},{"line_number":375,"context_line":"            embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_356bf21f","line":375,"updated":"2015-08-26 15:01:20.000000000","message":"I think it worth to check the mac address just in case there is some race condition and this VF is already assigned to some other port.","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        #if VF is assigned or not."},{"line_number":373,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":374,"context_line":"        if embedded_switch:"},{"line_number":375,"context_line":"            embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_9ebb9dc4","line":375,"in_reply_to":"fa1b9901_356bf21f","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"94fe276a3403b43553c4494348bc5bad69ef4d16","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        if embedded_switch:"},{"line_number":376,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":377,"context_line":"            # other port before reseting the max rate."},{"line_number":378,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":379,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":380,"context_line":"            else:"},{"line_number":381,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_128e9078","line":378,"updated":"2015-08-27 12:57:52.000000000","message":"I think there still be some weird race condition between new port consuming released resource and release resource cleanup.  maybe some sync lock should be considered?","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4448b8a302d60d7bfd28969c2895e37d0d6c4ba8","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        if embedded_switch:"},{"line_number":376,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":377,"context_line":"            # other port before reseting the max rate."},{"line_number":378,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":379,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":380,"context_line":"            else:"},{"line_number":381,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_51d15dcc","line":378,"in_reply_to":"da20952f_128e9078","updated":"2015-08-27 15:47:43.000000000","message":"Please discard this comment. Given a deeper look, I see that the check for pci device ssignment is done against hypervisor.  It should get correct answer","commit_id":"4f3fe99a76e4e5a08eac7885b1baf8d84b8c6161"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"03596e17f41c85128289266dfd7f96ab6750f8c9","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_assigned_devices_info(self):"},{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions mac and pci slot"},{"line_number":130,"context_line":"        information."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":133,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_b62b0f82","line":130,"updated":"2015-08-27 15:20:14.000000000","message":"and populates vf_to_pci_slot mappings","commit_id":"bb2248f12008eaffe963b28b295bd9bd91590495"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"6358b2c17f7d16a0979274e59f529e96d5c482db","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def get_assigned_devices_info(self):"},{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions mac and pci slot"},{"line_number":130,"context_line":"        information."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":133,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_91ee158a","line":130,"in_reply_to":"da20952f_b62b0f82","updated":"2015-08-27 15:47:56.000000000","message":"Done","commit_id":"bb2248f12008eaffe963b28b295bd9bd91590495"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions mac and pci slot"},{"line_number":130,"context_line":"        information and populates vf_to_pci_slot mappings"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        vf_list \u003d []"},{"line_number":135,"context_line":"        vf_to_pci_slot_mapping \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_c4973638","line":132,"updated":"2015-09-01 10:24:29.000000000","message":"I guess the mac is single, so mac_addresses -\u003e mac_address","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"Get assigned Virtual Functions mac and pci slot"},{"line_number":130,"context_line":"        information and populates vf_to_pci_slot mappings"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        @return: list of VF pair (mac addresses, pci slot)"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        vf_list \u003d []"},{"line_number":135,"context_line":"        vf_to_pci_slot_mapping \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_6a70710b","line":132,"in_reply_to":"da20952f_c4973638","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            if not PciOsWrapper.is_assigned_vf(self.dev_name, vf_index):"},{"line_number":139,"context_line":"                continue"},{"line_number":140,"context_line":"            vf_list.append(vf_index)"},{"line_number":141,"context_line":"            vf_to_pci_slot_mapping[vf_index] \u003d pci_slot"},{"line_number":142,"context_line":"        if vf_list:"},{"line_number":143,"context_line":"            vf_to_mac_mapping \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            for vf_index in vf_to_mac_mapping:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_2405d20f","line":141,"updated":"2015-09-01 10:24:29.000000000","message":"Now that you maintain the mapping, you can get rid of vf_list. In line 143, you would just call to list(vf_to_pci_slot_mapping.keys()) to get the list.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            if not PciOsWrapper.is_assigned_vf(self.dev_name, vf_index):"},{"line_number":139,"context_line":"                continue"},{"line_number":140,"context_line":"            vf_list.append(vf_index)"},{"line_number":141,"context_line":"            vf_to_pci_slot_mapping[vf_index] \u003d pci_slot"},{"line_number":142,"context_line":"        if vf_list:"},{"line_number":143,"context_line":"            vf_to_mac_mapping \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            for vf_index in vf_to_mac_mapping:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_2a9279f6","line":141,"in_reply_to":"da20952f_2405d20f","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            vf_to_mac_mapping \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            for vf_index in vf_to_mac_mapping:"},{"line_number":145,"context_line":"                pci_slot \u003d vf_to_pci_slot_mapping[vf_index]"},{"line_number":146,"context_line":"                mac \u003d vf_to_mac_mapping[vf_index]"},{"line_number":147,"context_line":"                assigned_devices_info.append((mac, pci_slot))"},{"line_number":148,"context_line":"        return assigned_devices_info"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_84985e79","line":146,"updated":"2015-09-01 10:24:29.000000000","message":"(No action required) you could extract mac in line 144 with .items()","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            vf_to_mac_mapping \u003d self.pci_dev_wrapper.get_assigned_macs(vf_list)"},{"line_number":144,"context_line":"            for vf_index in vf_to_mac_mapping:"},{"line_number":145,"context_line":"                pci_slot \u003d vf_to_pci_slot_mapping[vf_index]"},{"line_number":146,"context_line":"                mac \u003d vf_to_mac_mapping[vf_index]"},{"line_number":147,"context_line":"                assigned_devices_info.append((mac, pci_slot))"},{"line_number":148,"context_line":"        return assigned_devices_info"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_8aae252c","line":146,"in_reply_to":"da20952f_84985e79","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        Get all assigned devices belongs to given embedded switch"},{"line_number":260,"context_line":"        @param phys_net: physical network, if none get all assigned devices"},{"line_number":261,"context_line":"        @return: set of assigned VFs (mac addresses, pci slot) pair"},{"line_number":262,"context_line":"        \"\"\""},{"line_number":263,"context_line":"        if phys_net:"},{"line_number":264,"context_line":"            embedded_switch \u003d self.emb_switches_map.get(phys_net, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_44ac868b","line":261,"updated":"2015-09-01 10:24:29.000000000","message":"ditto","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        Get all assigned devices belongs to given embedded switch"},{"line_number":260,"context_line":"        @param phys_net: physical network, if none get all assigned devices"},{"line_number":261,"context_line":"        @return: set of assigned VFs (mac addresses, pci slot) pair"},{"line_number":262,"context_line":"        \"\"\""},{"line_number":263,"context_line":"        if phys_net:"},{"line_number":264,"context_line":"            embedded_switch \u003d self.emb_switches_map.get(phys_net, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_ca6e5dff","line":261,"in_reply_to":"da20952f_44ac868b","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        \"\"\"Clear the max rate"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":368,"context_line":"        @param pci_slot: pci_slot"},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":371,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_44f1e693","line":368,"updated":"2015-09-01 10:24:29.000000000","message":"nit: I guess the second pci_slot should be \u0027PCI slot\u0027 since it\u0027s a description of the parameter.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        \"\"\"Clear the max rate"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":368,"context_line":"        @param pci_slot: pci_slot"},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":371,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_0a50d530","line":368,"in_reply_to":"da20952f_44f1e693","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":368,"context_line":"        @param pci_slot: pci_slot"},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":371,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":372,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":373,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_641aeac7","line":370,"updated":"2015-09-01 10:24:29.000000000","message":"nit: I wonder what (Note) gives us here and below.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        Clear the max rate configuration from VF by setting it to 0"},{"line_number":368,"context_line":"        @param pci_slot: pci_slot"},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        #(Note): we don\u0027t use the self._get_emb_eswitch here, because when"},{"line_number":371,"context_line":"        #clearing the VF it may be not assigned. This happens when libvirt"},{"line_number":372,"context_line":"        #releases the VF back to the hypervisor on delete VM. Therefore we"},{"line_number":373,"context_line":"        #should just clear the VF max rate according to pci_slot no matter"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_f528e687","line":370,"in_reply_to":"da20952f_641aeac7","updated":"2015-09-03 14:07:07.000000000","message":"do you want me to remove them?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        #if VF is assigned or not."},{"line_number":375,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":376,"context_line":"        if embedded_switch:"},{"line_number":377,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":378,"context_line":"            # other port before reseting the max rate."},{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_64718a0b","line":377,"updated":"2015-09-01 10:24:29.000000000","message":"the the","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        #if VF is assigned or not."},{"line_number":375,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":376,"context_line":"        if embedded_switch:"},{"line_number":377,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":378,"context_line":"            # other port before reseting the max rate."},{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_95116a54","line":377,"in_reply_to":"da20952f_64718a0b","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":376,"context_line":"        if embedded_switch:"},{"line_number":377,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":378,"context_line":"            # other port before reseting the max rate."},{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_24cdd230","line":378,"updated":"2015-09-01 10:24:29.000000000","message":"resetting","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        embedded_switch \u003d self.pci_slot_map.get(pci_slot)"},{"line_number":376,"context_line":"        if embedded_switch:"},{"line_number":377,"context_line":"            #(Note): check the the pci_slot is not assigned to some"},{"line_number":378,"context_line":"            # other port before reseting the max rate."},{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_7516164d","line":378,"in_reply_to":"da20952f_24cdd230","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_24f4f258","line":382,"updated":"2015-09-01 10:24:29.000000000","message":"you miss a space between already and assigned\n\nShould we use PCI (upper-case) in logs?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            if embedded_switch.get_pci_device(pci_slot) is None:"},{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_3533bef7","line":382,"in_reply_to":"da20952f_24f4f258","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_04bf6e61","line":383,"updated":"2015-09-01 10:24:29.000000000","message":"max -\u003e maximum?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                embedded_switch.set_device_max_rate(pci_slot, 0)"},{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_15531a18","line":383,"in_reply_to":"da20952f_04bf6e61","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f1ae9dad8d4ff4728a220ceadc2b2652a6248611","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_64b3ca4d","line":384,"updated":"2015-09-01 09:49:11.000000000","message":"I\u0027m missing something on this part.\n\nIf we had to clear the limit, but a VM grabbed it, we don\u0027t clear the limit that we wanted to clear on the VF?.\n\nHow do we do it , when we update a port which is already assigned to a VM?.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_4480068b","line":384,"in_reply_to":"da20952f_64b3ca4d","updated":"2015-09-01 10:24:29.000000000","message":"I guess in this case, a new port that grabbed the VF will be initialised by the agent, including qos reset.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"674cae6fdc1842d5e7f8e8170dc99252d4c2c22d","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_a4d9e2f4","line":384,"in_reply_to":"da20952f_64b3ca4d","updated":"2015-09-01 09:57:14.000000000","message":"This is to handle race condition when a VF is assigned to new port (VM), but now we just handle it delete so we want to skip the reset VF rate.  \n\nthis means that we got delete port event, simultaneous libvirt already assigned the VF to different VM. In this case we don\u0027t want to change the rate because we assume it is already configured currently via the create event. \n\nupdate port we just update using ip link set ... rate it is doesn\u0027t matter if the VF is assigned to  VM or not","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"ad11185bc086d2021cbf1711ca1b278331f4a1da","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_afa3fbfe","line":384,"in_reply_to":"da20952f_a4d9e2f4","updated":"2015-09-01 10:04:40.000000000","message":"Ahhh, ok, understood.\n\nMakes sense. I would extend the note to say that. Could you do it?. The bit I was missing is that in such case the port update will handle the max rate set/clear.\n\nWill it handle clear if the new port has no policy?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"7323bd454c7742be9a91928394901e5fd2b445fa","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            else:"},{"line_number":382,"context_line":"                LOG.warning(_LW(\"VF with pci slot %(pci_slot)s is already\""},{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_0fd6a74e","line":384,"in_reply_to":"da20952f_afa3fbfe","updated":"2015-09-01 10:07:16.000000000","message":"yes see https://github.com/openstack/neutron/blob/master/neutron/agent/l2/extensions/qos.py#L115-L117\nI will update the note","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f1ae9dad8d4ff4728a220ceadc2b2652a6248611","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_a494828a","line":386,"updated":"2015-09-01 09:49:11.000000000","message":"When could this happen?, Sounds to me more like an ERROR than debug.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_3502deb4","line":386,"in_reply_to":"da20952f_4457a625","updated":"2015-09-03 14:07:07.000000000","message":"yes I am missing else","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_4457a625","line":386,"in_reply_to":"da20952f_a494828a","updated":"2015-09-01 10:24:29.000000000","message":"Hm, won\u0027t that log be always logged? I don\u0027t see where you bail out of the function after set_device_max_rate call to avoid it.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"674cae6fdc1842d5e7f8e8170dc99252d4c2c22d","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                                \"assigned; skipping reset max rate\"),"},{"line_number":384,"context_line":"                            {\u0027pci_slot\u0027: pci_slot})"},{"line_number":385,"context_line":"        LOG.debug(\"PCI slot %(pci_slot)s has no mapping to Embedded Switch; \""},{"line_number":386,"context_line":"                  \"skipping\", {\u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_a4a1e295","line":386,"in_reply_to":"da20952f_a494828a","updated":"2015-09-01 09:57:14.000000000","message":"yes this more like an error in code, we should get here. I will change it to ERROR.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(PciDeviceIPWrapper, self).__init__()"},{"line_number":47,"context_line":"        self.dev_name \u003d dev_name"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_assigned_macs(self, vf_list):"},{"line_number":50,"context_line":"        \"\"\"Get assigned mac addresses for vf list."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        @param vf_list: list of vf indexes"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_e4a6fa0d","line":49,"updated":"2015-09-01 10:24:29.000000000","message":"Is pci_lib used by anything outside the sr-iov driver? I ask because ovs_lib is used, and there it means we avoid incompatible changes of semantics like that, if possible.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(PciDeviceIPWrapper, self).__init__()"},{"line_number":47,"context_line":"        self.dev_name \u003d dev_name"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_assigned_macs(self, vf_list):"},{"line_number":50,"context_line":"        \"\"\"Get assigned mac addresses for vf list."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        @param vf_list: list of vf indexes"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_95cc0a8a","line":49,"in_reply_to":"da20952f_e4a6fa0d","updated":"2015-09-03 14:07:07.000000000","message":"no and as you can see it is under the mech_sriov folder","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            for vf_line in vf_lines:"},{"line_number":65,"context_line":"                vf_details \u003d self._parse_vf_link_show(vf_line)"},{"line_number":66,"context_line":"                if vf_details:"},{"line_number":67,"context_line":"                    vf_num \u003d int(vf_details.get(\u0027vf\u0027))"},{"line_number":68,"context_line":"                    vf_mac \u003d vf_details.get(\"MAC\")"},{"line_number":69,"context_line":"                    vf_to_mac_mapping[vf_num] \u003d vf_mac"},{"line_number":70,"context_line":"        return vf_to_mac_mapping"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_a449e232","line":67,"updated":"2015-09-01 10:24:29.000000000","message":"_parse_vf_link_show already converts the value to int(), so no need to repeat it here.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            for vf_line in vf_lines:"},{"line_number":65,"context_line":"                vf_details \u003d self._parse_vf_link_show(vf_line)"},{"line_number":66,"context_line":"                if vf_details:"},{"line_number":67,"context_line":"                    vf_num \u003d int(vf_details.get(\u0027vf\u0027))"},{"line_number":68,"context_line":"                    vf_mac \u003d vf_details.get(\"MAC\")"},{"line_number":69,"context_line":"                    vf_to_mac_mapping[vf_num] \u003d vf_mac"},{"line_number":70,"context_line":"        return vf_to_mac_mapping"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_359e5e63","line":67,"in_reply_to":"da20952f_a449e232","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py":[{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"fd6660fada9db6f0fe9fd5e7e118c8cc67bd9aca","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def treat_device(self, device, pci_slot, admin_state_up, spoofcheck\u003dTrue):"},{"line_number":188,"context_line":"        if self.eswitch_mgr.device_exists(device, pci_slot):"},{"line_number":189,"context_line":"            try:"},{"line_number":190,"context_line":"                self.eswitch_mgr.set_device_spoofcheck(device, pci_slot,"},{"line_number":191,"context_line":"                                                       spoofcheck)"},{"line_number":192,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_0d4993d0","line":189,"updated":"2015-08-24 07:00:09.000000000","message":"I believe you may have broken this, because device is no longer the mac address, because of line 237.","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"8abb4b53207e41cbfb9e272749f2cfc8115b2e7d","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def treat_device(self, device, pci_slot, admin_state_up, spoofcheck\u003dTrue):"},{"line_number":188,"context_line":"        if self.eswitch_mgr.device_exists(device, pci_slot):"},{"line_number":189,"context_line":"            try:"},{"line_number":190,"context_line":"                self.eswitch_mgr.set_device_spoofcheck(device, pci_slot,"},{"line_number":191,"context_line":"                                                       spoofcheck)"},{"line_number":192,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_b34e85bf","line":189,"in_reply_to":"fa1b9901_0d4993d0","updated":"2015-08-25 11:26:10.000000000","message":"no, becuase\nin line 231 \ndevice_details[\u0027device\u0027] is the mac and device_details is the response from the neutron-server.","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"7ebeb735f899bff756b67dbefc7c87e7625b92c1","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def treat_device(self, device, pci_slot, admin_state_up, spoofcheck\u003dTrue):"},{"line_number":188,"context_line":"        if self.eswitch_mgr.device_exists(device, pci_slot):"},{"line_number":189,"context_line":"            try:"},{"line_number":190,"context_line":"                self.eswitch_mgr.set_device_spoofcheck(device, pci_slot,"},{"line_number":191,"context_line":"                                                       spoofcheck)"},{"line_number":192,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_89f769d2","line":189,"in_reply_to":"fa1b9901_b34e85bf","updated":"2015-08-26 02:50:13.000000000","message":"you\u0027re right ;) missed that part","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"fd6660fada9db6f0fe9fd5e7e118c8cc67bd9aca","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                  device_details[\u0027admin_state_up\u0027],"},{"line_number":242,"context_line":"                                  spoofcheck)"},{"line_number":243,"context_line":"                port \u003d dict(device_details)"},{"line_number":244,"context_line":"                port[\u0027port_id\u0027] \u003d device"},{"line_number":245,"context_line":"                self.ext_manager.handle_port(self.context, port)"},{"line_number":246,"context_line":"            else:"},{"line_number":247,"context_line":"                LOG.info(_LI(\"Device with MAC %s not defined on plugin\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_98af2394","line":244,"updated":"2015-08-24 07:00:09.000000000","message":"I strongly discourage resetting the port_id to be the mac_address. It looks hacky and is confusing.","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"8abb4b53207e41cbfb9e272749f2cfc8115b2e7d","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                  device_details[\u0027admin_state_up\u0027],"},{"line_number":242,"context_line":"                                  spoofcheck)"},{"line_number":243,"context_line":"                port \u003d dict(device_details)"},{"line_number":244,"context_line":"                port[\u0027port_id\u0027] \u003d device"},{"line_number":245,"context_line":"                self.ext_manager.handle_port(self.context, port)"},{"line_number":246,"context_line":"            else:"},{"line_number":247,"context_line":"                LOG.info(_LI(\"Device with MAC %s not defined on plugin\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_f33f1d23","line":244,"in_reply_to":"fa1b9901_98af2394","updated":"2015-08-25 11:26:10.000000000","message":"agree I change it. \nI update the code to keep mac to port_id mapping","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"fd6660fada9db6f0fe9fd5e7e118c8cc67bd9aca","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            LOG.info(_LI(\"Removing device with mac_address %s\"), mac)"},{"line_number":256,"context_line":"            try:"},{"line_number":257,"context_line":"                profile \u003d {\u0027pci_slot\u0027: pci_slot}"},{"line_number":258,"context_line":"                port \u003d {\u0027port_id\u0027: mac,"},{"line_number":259,"context_line":"                        \u0027profile\u0027: profile}"},{"line_number":260,"context_line":"                self.ext_manager.delete_port(self.context, port)"},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_ad02e76d","line":258,"updated":"2015-08-24 07:00:09.000000000","message":"I don\u0027t think we should mess with port_id. The port_id should stay an uuid like object that references to the Port.id.\n\nPort object has an mac_address attribute why not use that instead?","commit_id":"7e1f3461ff427338b51e6372712c8afe613a2a1c"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def treat_devices_added_updated(self, devices):"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            devices_mac \u003d set([device[0] for device in devices])"},{"line_number":222,"context_line":"            devices_details_list \u003d self.plugin_rpc.get_devices_details_list("},{"line_number":223,"context_line":"                self.context, devices_mac, self.agent_id)"},{"line_number":224,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_057a3ff1","line":221,"updated":"2015-08-26 15:01:20.000000000","message":"name is bad, sounds like single mac for devices","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def treat_devices_added_updated(self, devices):"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            devices_mac \u003d set([device[0] for device in devices])"},{"line_number":222,"context_line":"            devices_details_list \u003d self.plugin_rpc.get_devices_details_list("},{"line_number":223,"context_line":"                self.context, devices_mac, self.agent_id)"},{"line_number":224,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_9e171da3","line":221,"in_reply_to":"fa1b9901_057a3ff1","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            return True"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        for device_details in devices_details_list:"},{"line_number":232,"context_line":"            device \u003d device_details[\u0027device\u0027]"},{"line_number":233,"context_line":"            LOG.debug(\"Port with MAC address %s is added\", device)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            if \u0027port_id\u0027 in device_details:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_c0951532","line":232,"updated":"2015-08-26 15:01:20.000000000","message":"it is a bit confusing that devices are list of tuples but device is just mac_address. Maybe worth to rename to make code more readable","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            return True"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        for device_details in devices_details_list:"},{"line_number":232,"context_line":"            device \u003d device_details[\u0027device\u0027]"},{"line_number":233,"context_line":"            LOG.debug(\"Port with MAC address %s is added\", device)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            if \u0027port_id\u0027 in device_details:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_9e9abd13","line":232,"in_reply_to":"fa1b9901_c0951532","updated":"2015-08-27 09:30:40.000000000","message":"I rename the upper part to be devices_info, hopefully is is clearer","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"f7749f2c4840dfecbeccf83591bb6811b6126782","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        resync \u003d False"},{"line_number":254,"context_line":"        for device in devices:"},{"line_number":255,"context_line":"            mac, pci_slot \u003d device"},{"line_number":256,"context_line":"            LOG.info(_LI(\"Removing device with mac_address %s\"), mac)"},{"line_number":257,"context_line":"            try:"},{"line_number":258,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":259,"context_line":"                if port_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_a0f6e18c","line":256,"updated":"2015-08-26 15:01:20.000000000","message":"+ and slot","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"e40fc3c08f09b93dfb36a957ca774a4f5774c466","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        resync \u003d False"},{"line_number":254,"context_line":"        for device in devices:"},{"line_number":255,"context_line":"            mac, pci_slot \u003d device"},{"line_number":256,"context_line":"            LOG.info(_LI(\"Removing device with mac_address %s\"), mac)"},{"line_number":257,"context_line":"            try:"},{"line_number":258,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":259,"context_line":"                if port_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_de4b55af","line":256,"in_reply_to":"fa1b9901_a0f6e18c","updated":"2015-08-27 09:30:40.000000000","message":"Done","commit_id":"9c51b39e85b6c76563257a629f18cb1b2b29f358"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # Do not store port details, as if they\u0027re used for processing"},{"line_number":65,"context_line":"        # notifications there is no guarantee the notifications are"},{"line_number":66,"context_line":"        # processed in the same order as the relevant API requests."},{"line_number":67,"context_line":"        self.agent.updated_devices.add((port[\u0027mac_address\u0027],"},{"line_number":68,"context_line":"                                        port[\u0027binding:profile\u0027][\u0027pci_slot\u0027]))"},{"line_number":69,"context_line":"        LOG.debug(\"port_update RPC received for port: %s\", port[\u0027id\u0027])"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_4f2edf8c","line":67,"updated":"2015-09-01 10:24:29.000000000","message":"I think this notification is received for all ports, not just sr-iov. If that\u0027s really the case, then I think assuming that pci_slot is defined for binding:profile is not correct.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # Do not store port details, as if they\u0027re used for processing"},{"line_number":65,"context_line":"        # notifications there is no guarantee the notifications are"},{"line_number":66,"context_line":"        # processed in the same order as the relevant API requests."},{"line_number":67,"context_line":"        self.agent.updated_devices.add((port[\u0027mac_address\u0027],"},{"line_number":68,"context_line":"                                        port[\u0027binding:profile\u0027][\u0027pci_slot\u0027]))"},{"line_number":69,"context_line":"        LOG.debug(\"port_update RPC received for port: %s\", port[\u0027id\u0027])"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_92126e61","line":67,"in_reply_to":"da20952f_4f2edf8c","updated":"2015-09-03 14:07:07.000000000","message":"It received if the sriov mech can bound the port, and because we can bound direct and macvtap. but I will skipping if we didn\u0027t get pci_slot","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def treat_devices_added_updated(self, devices_info):"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            macs_list \u003d set([device_info[0] for device_info in devices_info])"},{"line_number":222,"context_line":"            devices_details_list \u003d self.plugin_rpc.get_devices_details_list("},{"line_number":223,"context_line":"                self.context, macs_list, self.agent_id)"},{"line_number":224,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_ef39f3a4","line":221,"updated":"2015-09-01 10:24:29.000000000","message":"(No action required) It would be a bit more clear if device_info would be a namedtuple.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                self.context, macs_list, self.agent_id)"},{"line_number":224,"context_line":"        except Exception as e:"},{"line_number":225,"context_line":"            LOG.debug(\"Unable to get port details for devices \""},{"line_number":226,"context_line":"                      \"with MAC address %(devices)s: %(e)s\","},{"line_number":227,"context_line":"                      {\u0027devices\u0027: macs_list, \u0027e\u0027: e})"},{"line_number":228,"context_line":"            # resync is needed"},{"line_number":229,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_af0d3be9","line":226,"updated":"2015-09-01 10:24:29.000000000","message":"(No action required) I know it\u0027s not a fault of the patch, but I believe we should have had address -\u003e addresses here.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                self.context, macs_list, self.agent_id)"},{"line_number":224,"context_line":"        except Exception as e:"},{"line_number":225,"context_line":"            LOG.debug(\"Unable to get port details for devices \""},{"line_number":226,"context_line":"                      \"with MAC address %(devices)s: %(e)s\","},{"line_number":227,"context_line":"                      {\u0027devices\u0027: macs_list, \u0027e\u0027: e})"},{"line_number":228,"context_line":"            # resync is needed"},{"line_number":229,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_66091b2c","line":226,"in_reply_to":"da20952f_af0d3be9","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        resync \u003d False"},{"line_number":254,"context_line":"        for device in devices:"},{"line_number":255,"context_line":"            mac, pci_slot \u003d device"},{"line_number":256,"context_line":"            LOG.info(_LI(\"Removing device with mac_address %(mac)s and \""},{"line_number":257,"context_line":"                         \"pci_slot %(pci_slot)s\"),"},{"line_number":258,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":259,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_8f7ab722","line":256,"updated":"2015-09-01 10:24:29.000000000","message":"I believe we should replace mac_address -\u003e MAC address and pc_slot -\u003e PCI slot","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        resync \u003d False"},{"line_number":254,"context_line":"        for device in devices:"},{"line_number":255,"context_line":"            mac, pci_slot \u003d device"},{"line_number":256,"context_line":"            LOG.info(_LI(\"Removing device with mac_address %(mac)s and \""},{"line_number":257,"context_line":"                         \"pci_slot %(pci_slot)s\"),"},{"line_number":258,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":259,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_35765e06","line":256,"in_reply_to":"da20952f_8f7ab722","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f1ae9dad8d4ff4728a220ceadc2b2652a6248611","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":267,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":268,"context_line":"                else:"},{"line_number":269,"context_line":"                    LOG.info(_LI(\"port_id to device with MAC \""},{"line_number":270,"context_line":"                                 \"%s not found\"), mac)"},{"line_number":271,"context_line":"                dev_details \u003d self.plugin_rpc.update_device_down(self.context,"},{"line_number":272,"context_line":"                                                                 mac,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_e4103a02","line":269,"updated":"2015-09-01 09:49:11.000000000","message":"why warning to info?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":267,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":268,"context_line":"                else:"},{"line_number":269,"context_line":"                    LOG.info(_LI(\"port_id to device with MAC \""},{"line_number":270,"context_line":"                                 \"%s not found\"), mac)"},{"line_number":271,"context_line":"                dev_details \u003d self.plugin_rpc.update_device_down(self.context,"},{"line_number":272,"context_line":"                                                                 mac,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_55df52d5","line":269,"in_reply_to":"da20952f_249b9219","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"674cae6fdc1842d5e7f8e8170dc99252d4c2c22d","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":267,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":268,"context_line":"                else:"},{"line_number":269,"context_line":"                    LOG.info(_LI(\"port_id to device with MAC \""},{"line_number":270,"context_line":"                                 \"%s not found\"), mac)"},{"line_number":271,"context_line":"                dev_details \u003d self.plugin_rpc.update_device_down(self.context,"},{"line_number":272,"context_line":"                                                                 mac,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_249b9219","line":269,"in_reply_to":"da20952f_e4103a02","updated":"2015-09-01 09:57:14.000000000","message":"Ops, I will fix that","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                                                                 cfg.CONF.host)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"            except Exception as e:"},{"line_number":277,"context_line":"                LOG.debug(\"Removing port failed for device %(device)s \""},{"line_number":278,"context_line":"                          \"due to %(exc)s\", {\u0027device\u0027: device, \u0027exc\u0027: e})"},{"line_number":279,"context_line":"                resync \u003d True"},{"line_number":280,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_8fc87756","line":277,"updated":"2015-09-01 10:24:29.000000000","message":"I guess now that devices is a tuple, all logs in the method should be changed to describe what those values are, as you do in line 256. That\u0027s especially true for LOG.info.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                                                                 cfg.CONF.host)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"            except Exception as e:"},{"line_number":277,"context_line":"                LOG.debug(\"Removing port failed for device %(device)s \""},{"line_number":278,"context_line":"                          \"due to %(exc)s\", {\u0027device\u0027: device, \u0027exc\u0027: e})"},{"line_number":279,"context_line":"                resync \u003d True"},{"line_number":280,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_29eb5edd","line":277,"in_reply_to":"da20952f_8fc87756","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mac \u003d port[\u0027mac_address\u0027]"},{"line_number":68,"context_line":"        pci_slot \u003d None"},{"line_number":69,"context_line":"        if port.get(\u0027binding:profile\u0027):"},{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_3adc94e3","line":70,"updated":"2015-09-03 12:12:24.000000000","message":"you don\u0027t assign it to pci_slot! I presume the code is not covered with tests? Please add tests then.","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mac \u003d port[\u0027mac_address\u0027]"},{"line_number":68,"context_line":"        pci_slot \u003d None"},{"line_number":69,"context_line":"        if port.get(\u0027binding:profile\u0027):"},{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_ce2fd59f","line":70,"in_reply_to":"da20952f_3adc94e3","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"},{"line_number":74,"context_line":"            LOG.debug(\"port_update RPC received for port: %(id)s with MAC \""},{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_fafcdc3f","line":73,"updated":"2015-09-03 12:12:24.000000000","message":"Are you sure that change to avoid adding all port updates to updated_devices will behave fine with all other code that may rely on the set?","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"755a156f80e523a63dbd424f2cea578946eb7b8a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"},{"line_number":74,"context_line":"            LOG.debug(\"port_update RPC received for port: %(id)s with MAC \""},{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_ffafe5e0","line":73,"in_reply_to":"da20952f_51836acc","updated":"2015-09-03 14:36:14.000000000","message":"yes you are right, this is a bite surprise to me because the mech driver is doing  validation of port type so I thought it will send it to the specific agent of the mech driver.\nI guess this is the same behavior as the Qos Policy fan out.","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"583733258952cc5f1abdc8e18408bb809c94d5aa","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"},{"line_number":74,"context_line":"            LOG.debug(\"port_update RPC received for port: %(id)s with MAC \""},{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_51836acc","line":73,"in_reply_to":"da20952f_d008d9db","updated":"2015-09-03 14:14:25.000000000","message":"I believe the notifications are sent by ml2: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/rpc.py#L308 And as you can see, the topic is fanout and is not agent specific. So you probably get notifications for all port updates, and then you decide whether you need it.\n\nAnd later in line 168, you filter out those updates that are not found on the node.","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        if pci_slot:"},{"line_number":73,"context_line":"            self.agent.updated_devices.add((mac, pci_slot))"},{"line_number":74,"context_line":"            LOG.debug(\"port_update RPC received for port: %(id)s with MAC \""},{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_d008d9db","line":73,"in_reply_to":"da20952f_fafcdc3f","updated":"2015-09-03 14:06:29.000000000","message":"yes port must have pci_slot otherwise the agent can\u0027t  do anything  them.\nthe agent is getting only ports with vnic_type direct/macvtap, not all port (we will never get normal port) . These ports must have pci_slot attribute.\nIf we don\u0027t have pci_slot it is probably due to bug in nova","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            LOG.warning(_LW(\"No PCI Slot for port %(id)s with MAC %(mac)s;\""},{"line_number":79,"context_line":"                            \"skipping...\"),"},{"line_number":80,"context_line":"                        {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_ba63c419","line":78,"updated":"2015-09-03 12:12:24.000000000","message":"you missed space after ;\n\nwhy does Slot start from upper-case?","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            LOG.warning(_LW(\"No PCI Slot for port %(id)s with MAC %(mac)s;\""},{"line_number":79,"context_line":"                            \"skipping...\"),"},{"line_number":80,"context_line":"                        {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_15d723ee","line":78,"in_reply_to":"da20952f_ba63c419","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            LOG.warning(_LW(\"No PCI Slot for port %(id)s with MAC %(mac)s;\""},{"line_number":79,"context_line":"                            \"skipping...\"),"},{"line_number":80,"context_line":"                        {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_3ab1f48f","line":79,"updated":"2015-09-03 12:12:24.000000000","message":"... usually imply that there will be more data in the line later. It won\u0027t.","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            LOG.warning(_LW(\"No PCI Slot for port %(id)s with MAC %(mac)s;\""},{"line_number":79,"context_line":"                            \"skipping...\"),"},{"line_number":80,"context_line":"                        {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_75fe9f6c","line":79,"in_reply_to":"da20952f_3ab1f48f","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"            except Exception as e:"},{"line_number":288,"context_line":"                LOG.debug(\"Removing port failed for device with MAC address \""},{"line_number":289,"context_line":"                          \"%(mac)s  and PCI slot %(pci_slot)s due to %(exc)s\","},{"line_number":290,"context_line":"                          {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot, \u0027exc\u0027: e})"},{"line_number":291,"context_line":"                resync \u003d True"},{"line_number":292,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_7a444c73","line":289,"updated":"2015-09-03 12:12:24.000000000","message":"nit: two spaces before \u0027and\u0027","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"            except Exception as e:"},{"line_number":288,"context_line":"                LOG.debug(\"Removing port failed for device with MAC address \""},{"line_number":289,"context_line":"                          \"%(mac)s  and PCI slot %(pci_slot)s due to %(exc)s\","},{"line_number":290,"context_line":"                          {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot, \u0027exc\u0027: e})"},{"line_number":291,"context_line":"                resync \u003d True"},{"line_number":292,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_f5206ff9","line":289,"in_reply_to":"da20952f_7a444c73","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                resync \u003d True"},{"line_number":292,"context_line":"                continue"},{"line_number":293,"context_line":"            if dev_details[\u0027exists\u0027]:"},{"line_number":294,"context_line":"                LOG.info(_LI(\"Port with MAC %(mac)s and PCI slot  \""},{"line_number":295,"context_line":"                             \"%(pci_slot)s updated.\"),"},{"line_number":296,"context_line":"                         {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":297,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_5a5aa851","line":294,"updated":"2015-09-03 12:12:24.000000000","message":"nit: two spaces","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                resync \u003d True"},{"line_number":292,"context_line":"                continue"},{"line_number":293,"context_line":"            if dev_details[\u0027exists\u0027]:"},{"line_number":294,"context_line":"                LOG.info(_LI(\"Port with MAC %(mac)s and PCI slot  \""},{"line_number":295,"context_line":"                             \"%(pci_slot)s updated.\"),"},{"line_number":296,"context_line":"                         {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":297,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_f5770f00","line":294,"in_reply_to":"da20952f_5a5aa851","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ae7c29d10dfb97b3ace6c40d0a095ab9381c0bc3","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                             \"%(pci_slot)s updated.\"),"},{"line_number":296,"context_line":"                         {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":297,"context_line":"            else:"},{"line_number":298,"context_line":"                LOG.debug(\"Device with MAC %(mac)s and PCI slot \""},{"line_number":299,"context_line":"                          \" %(pci_slot)s not defined on plugin\","},{"line_number":300,"context_line":"                          {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":301,"context_line":"        return resync"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_7a3beceb","line":298,"updated":"2015-09-03 12:12:24.000000000","message":"nit: two spaces","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"bf36b6d0c3d7790fd60438672eac7ae7d7bda186","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                             \"%(pci_slot)s updated.\"),"},{"line_number":296,"context_line":"                         {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":297,"context_line":"            else:"},{"line_number":298,"context_line":"                LOG.debug(\"Device with MAC %(mac)s and PCI slot \""},{"line_number":299,"context_line":"                          \" %(pci_slot)s not defined on plugin\","},{"line_number":300,"context_line":"                          {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":301,"context_line":"        return resync"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_55503b5e","line":298,"in_reply_to":"da20952f_7a3beceb","updated":"2015-09-03 14:06:29.000000000","message":"Done","commit_id":"49a62f2cc0fd26be0118be5b8ec33cf033a3cdc8"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_eswitch_manager.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                        \"eswitch_manager.EmbSwitch.get_assigned_devices_info\","},{"line_number":85,"context_line":"                        return_value\u003d[(self.ASSIGNED_MAC, self.PCI_SLOT)]):"},{"line_number":86,"context_line":"            result \u003d self.eswitch_mgr.get_assigned_devices_info()"},{"line_number":87,"context_line":"            self.assertIn(self.ASSIGNED_MAC, list(result)[0])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_device_status_true(self):"},{"line_number":90,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_8f6b971d","line":87,"updated":"2015-09-01 10:24:29.000000000","message":"I believe you should validate both values.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                        \"eswitch_manager.EmbSwitch.get_assigned_devices_info\","},{"line_number":85,"context_line":"                        return_value\u003d[(self.ASSIGNED_MAC, self.PCI_SLOT)]):"},{"line_number":86,"context_line":"            result \u003d self.eswitch_mgr.get_assigned_devices_info()"},{"line_number":87,"context_line":"            self.assertIn(self.ASSIGNED_MAC, list(result)[0])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_device_status_true(self):"},{"line_number":90,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_793da7ba","line":87,"in_reply_to":"da20952f_8f6b971d","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                return_value\u003d{})"},{"line_number":200,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":201,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_max_rate\")"},{"line_number":202,"context_line":"    def test_clear_max_rate_exist_pci(self, max_rate_mock, *args):"},{"line_number":203,"context_line":"        self.eswitch_mgr.clear_max_rate(self.PCI_SLOT)"},{"line_number":204,"context_line":"        max_rate_mock.assert_called_once_with(self.PCI_SLOT, 0)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_afcf7b27","line":202,"updated":"2015-09-01 10:24:29.000000000","message":"exist_pci-\u003eexisting_pci_slot?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                return_value\u003d{})"},{"line_number":200,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":201,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_max_rate\")"},{"line_number":202,"context_line":"    def test_clear_max_rate_exist_pci(self, max_rate_mock, *args):"},{"line_number":203,"context_line":"        self.eswitch_mgr.clear_max_rate(self.PCI_SLOT)"},{"line_number":204,"context_line":"        max_rate_mock.assert_called_once_with(self.PCI_SLOT, 0)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_f977779d","line":202,"in_reply_to":"da20952f_afcf7b27","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":217,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_max_rate\")"},{"line_number":218,"context_line":"    def test_clear_max_rate_not_exist_pci(self, max_rate_mock):"},{"line_number":219,"context_line":"        self.eswitch_mgr.clear_max_rate(self.WRONG_PCI)"},{"line_number":220,"context_line":"        self.assertFalse(max_rate_mock.called)"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_6f8c03da","line":218,"updated":"2015-09-01 10:24:29.000000000","message":"not_exist_pci-\u003enonexisting_pci_slot?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":217,"context_line":"                \"eswitch_manager.EmbSwitch.set_device_max_rate\")"},{"line_number":218,"context_line":"    def test_clear_max_rate_not_exist_pci(self, max_rate_mock):"},{"line_number":219,"context_line":"        self.eswitch_mgr.clear_max_rate(self.WRONG_PCI)"},{"line_number":220,"context_line":"        self.assertFalse(max_rate_mock.called)"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_d980734c","line":218,"in_reply_to":"da20952f_6f8c03da","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                           \"eswitch_manager.PciOsWrapper.is_assigned_vf\","},{"line_number":259,"context_line":"                           return_value\u003dTrue):"},{"line_number":260,"context_line":"            result \u003d emb_switch.get_assigned_devices_info()"},{"line_number":261,"context_line":"            self.assertIn(self.ASSIGNED_MAC, list(result)[0])"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":264,"context_line":"                \"eswitch_manager.PciOsWrapper.scan_vf_devices\","}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_8f2397bc","line":261,"updated":"2015-09-01 10:24:29.000000000","message":"I believe you should validate slot here too.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                           \"eswitch_manager.PciOsWrapper.is_assigned_vf\","},{"line_number":259,"context_line":"                           return_value\u003dTrue):"},{"line_number":260,"context_line":"            result \u003d emb_switch.get_assigned_devices_info()"},{"line_number":261,"context_line":"            self.assertIn(self.ASSIGNED_MAC, list(result)[0])"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":264,"context_line":"                \"eswitch_manager.PciOsWrapper.scan_vf_devices\","}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_79c0477d","line":261,"in_reply_to":"da20952f_8f2397bc","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":264,"context_line":"                \"eswitch_manager.PciOsWrapper.scan_vf_devices\","},{"line_number":265,"context_line":"                return_value\u003dSCANNED_DEVICES)"},{"line_number":266,"context_line":"    def test_get_assigned_devices_info_multi(self, *args):"},{"line_number":267,"context_line":"        emb_switch \u003d esm.EmbSwitch(self.PHYS_NET, self.DEV_NAME, ())"},{"line_number":268,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":269,"context_line":"                        \"PciDeviceIPWrapper.get_assigned_macs\","}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_af10db59","line":266,"updated":"2015-09-01 10:24:29.000000000","message":"multi-\u003emultiple_slots?","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    @mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.\""},{"line_number":264,"context_line":"                \"eswitch_manager.PciOsWrapper.scan_vf_devices\","},{"line_number":265,"context_line":"                return_value\u003dSCANNED_DEVICES)"},{"line_number":266,"context_line":"    def test_get_assigned_devices_info_multi(self, *args):"},{"line_number":267,"context_line":"        emb_switch \u003d esm.EmbSwitch(self.PHYS_NET, self.DEV_NAME, ())"},{"line_number":268,"context_line":"        with mock.patch(\"neutron.plugins.ml2.drivers.mech_sriov.agent.pci_lib.\""},{"line_number":269,"context_line":"                        \"PciDeviceIPWrapper.get_assigned_macs\","}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_993f5b87","line":266,"in_reply_to":"da20952f_af10db59","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            mock_as_root.return_value \u003d self.VF_LINK_SHOW"},{"line_number":55,"context_line":"            result \u003d self.pci_wrapper.get_assigned_macs([self.VF_INDEX])"},{"line_number":56,"context_line":"            self.assertEqual("},{"line_number":57,"context_line":"                {int(self.VF_INDEX): self.MAC_MAPPING[self.VF_INDEX]}, result)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_assigned_macs_fail(self):"},{"line_number":60,"context_line":"        with mock.patch.object(self.pci_wrapper,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_ea01e105","line":57,"updated":"2015-09-01 10:24:29.000000000","message":"VF_INDEX is already int.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"5741674f0b678802895cb2c07ce76dcb461eb358","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            mock_as_root.return_value \u003d self.VF_LINK_SHOW"},{"line_number":55,"context_line":"            result \u003d self.pci_wrapper.get_assigned_macs([self.VF_INDEX])"},{"line_number":56,"context_line":"            self.assertEqual("},{"line_number":57,"context_line":"                {int(self.VF_INDEX): self.MAC_MAPPING[self.VF_INDEX]}, result)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_assigned_macs_fail(self):"},{"line_number":60,"context_line":"        with mock.patch.object(self.pci_wrapper,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_5971c376","line":57,"in_reply_to":"da20952f_ea01e105","updated":"2015-09-03 14:07:07.000000000","message":"Done","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cc425e60a817a754e321eee4194b194d4917cce8","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            with mock.patch.object(sriov_nic_agent.LOG,"},{"line_number":67,"context_line":"                                   \u0027info\u0027) as log:"},{"line_number":68,"context_line":"                resync \u003d agent.treat_devices_removed(devices)"},{"line_number":69,"context_line":"                self.assertEqual(3, log.call_count)"},{"line_number":70,"context_line":"                self.assertFalse(resync)"},{"line_number":71,"context_line":"                self.assertTrue(fn_udd.called)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_ca589d33","line":69,"updated":"2015-09-01 10:24:29.000000000","message":"I believe that change catches the debug log that you don\u0027t avoid on successful clearance.\n\nOverall, I believe those kinds of checks are worthless, and should be removed.","commit_id":"48c2460d4d5b2b7959e12150737c751f262e65dc"}]}
