)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add network_update RPC into sriov agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sriov agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"useful in QOS when network updated with a new QOS policy. This"},{"line_number":11,"context_line":"patch add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a8ffd7b_2ef4d958","line":10,"updated":"2015-11-30 10:14:54.000000000","message":"isn\u0027t it desired for QOS and not just useful?","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add network_update RPC into sriov agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sriov agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"useful in QOS when network updated with a new QOS policy. This"},{"line_number":11,"context_line":"patch add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a8ffd7b_b856b8cc","line":10,"in_reply_to":"9a8ffd7b_2ef4d958","updated":"2015-11-30 21:38:45.000000000","message":"Done","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add network_update RPC into SR-IOV agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"da6ed579_720baad6","line":9,"updated":"2016-01-15 12:31:34.000000000","message":"don\u0027t -\u003e doesn\u0027t","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add network_update RPC into SR-IOV agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_fb94d7e2","line":9,"in_reply_to":"da6ed579_720baad6","updated":"2016-01-20 08:46:58.000000000","message":"Done","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add network_update RPC into SR-IOV agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"da6ed579_f2e55a08","line":10,"updated":"2016-01-15 12:31:34.000000000","message":"it\u0027s not just for QoS. Other extensions may need those events too.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add network_update RPC into SR-IOV agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_fbab771b","line":10,"in_reply_to":"ba63e191_79d02f54","updated":"2016-01-20 08:46:58.000000000","message":"this patch only focus on making SR-IOV agent listen on this event.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7c8a17d432675429dfc76e91a55f19fc41e10e6a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add network_update RPC into SR-IOV agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_79d02f54","line":10,"in_reply_to":"da6ed579_f2e55a08","updated":"2016-01-19 09:47:22.000000000","message":"Correct, it\u0027s not QoS only, but a general l2 agent extension framework message to be handled.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"},{"line_number":14,"context_line":"Closes-Bug: #1504166"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"da6ed579_9202deb2","line":11,"updated":"2016-01-15 12:31:34.000000000","message":"add -\u003e adds","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"SR-IOV agent don\u0027t listen for network_update notification, but it\u0027s"},{"line_number":10,"context_line":"desired in QOS when network updated with a new QOS policy. This patch"},{"line_number":11,"context_line":"add it into this agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I06a7ca411da31bccabddec9c0adca6b8e6eab7cc"},{"line_number":14,"context_line":"Closes-Bug: #1504166"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_bbbdff69","line":11,"in_reply_to":"da6ed579_9202deb2","updated":"2016-01-20 08:46:58.000000000","message":"Done","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            pci_slot \u003d port[\u0027binding:profile\u0027].get(\u0027pci_slot\u0027)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        if pci_slot:"},{"line_number":69,"context_line":"            self.updated_devices.add((mac, pci_slot))"},{"line_number":70,"context_line":"            LOG.debug(\"port_update RPC received for port: %(id)s with MAC \""},{"line_number":71,"context_line":"                      \"%(mac)s and PCI slot %(pci_slot)s slot\","},{"line_number":72,"context_line":"                      {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_475471c9","line":69,"updated":"2015-10-12 11:01:01.000000000","message":"self.updated_devices is not initialized in this class. Either initialize it or pass it in a param!","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fdb5ef642ef471b90194afd991fc677b53c0c948","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                      \"skipping\", {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac,"},{"line_number":76,"context_line":"                                   \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_d64164aa","line":78,"updated":"2015-11-27 09:59:00.000000000","message":"Please log.debug at the start as we do in line 57.","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                      \"skipping\", {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac,"},{"line_number":76,"context_line":"                                   \u0027pci_slot\u0027: pci_slot})"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_30cafd1b","line":78,"in_reply_to":"9a8ffd7b_d64164aa","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fdb5ef642ef471b90194afd991fc677b53c0c948","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_76f51855","line":80,"updated":"2015-11-27 09:59:00.000000000","message":"I believe you need to check pci_slot too as we do in line 68 before adding the port to the list.","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_070439c4","line":80,"updated":"2015-10-12 11:01:01.000000000","message":"self.network_ports -\u003e see comment above","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_904889b4","line":80,"in_reply_to":"7a2fa921_070439c4","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_b0deedda","line":80,"in_reply_to":"9a8ffd7b_76f51855","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_270935de","line":81,"updated":"2015-10-12 11:01:01.000000000","message":"self.deleted_ports -\u003e see comment above","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_704de5c2","line":81,"in_reply_to":"7a2fa921_270935de","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fdb5ef642ef471b90194afd991fc677b53c0c948","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_b64940b9","line":82,"updated":"2015-11-27 09:59:00.000000000","message":"Note that updated_devices contain tuples in sr-iov agent, not single values.","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_a76ea594","line":82,"updated":"2015-10-12 11:01:01.000000000","message":"see comment above","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_d0529166","line":82,"in_reply_to":"7a2fa921_a76ea594","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":80,"context_line":"        for port_id in self.network_ports[network_id]:"},{"line_number":81,"context_line":"            if port_id not in self.deleted_ports:"},{"line_number":82,"context_line":"                self.updated_devices.add(port_id)"},{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_b057cd56","line":82,"in_reply_to":"9a8ffd7b_b64940b9","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":86,"context_line":"                   \u0027ports\u0027: self.network_ports[network_id]})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class SriovNicSwitchAgent(SriovNicSwitchRpcCallbacksMixin):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_c70de1e9","line":86,"updated":"2015-10-12 11:01:01.000000000","message":"self.network_ports -\u003e see comment above","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":84,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":85,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":86,"context_line":"                   \u0027ports\u0027: self.network_ports[network_id]})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class SriovNicSwitchAgent(SriovNicSwitchRpcCallbacksMixin):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_105c997b","line":86,"in_reply_to":"7a2fa921_c70de1e9","updated":"2015-11-30 06:15:40.000000000","message":"Done","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                 polling_interval):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        super(SriovNicSwitchAgent, self).__init__()"},{"line_number":94,"context_line":"        self.network_ports \u003d collections.defaultdict(set)"},{"line_number":95,"context_line":"        self.polling_interval \u003d polling_interval"},{"line_number":96,"context_line":"        self.conf \u003d cfg.CONF"},{"line_number":97,"context_line":"        self.setup_eswitch_mgr(physical_devices_mappings,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_07b519cf","line":94,"updated":"2015-10-12 11:01:01.000000000","message":"Initialize this in SRIOVNICSwitchRpcCallbacksMixin.","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1b7f975e25073e688f1ec2cc652f822e156a6ea5","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _update_port_network(self, port_id, network_id):"},{"line_number":126,"context_line":"        self._clean_network_ports(port_id)"},{"line_number":127,"context_line":"        self.network_ports[network_id].add(port_id)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _clean_network_ports(self, port_id):"},{"line_number":130,"context_line":"        for port_set in self.network_ports.values():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_474d51c3","line":127,"updated":"2015-10-12 11:01:01.000000000","message":"I\u0027m sorry but I\u0027m not getting this: You\u0027ll remove the port_id from self.network_ports and then you\u0027ll add it again? Or am I missing a point here?","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fdb5ef642ef471b90194afd991fc677b53c0c948","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _update_port_network(self, port_id, network_id):"},{"line_number":126,"context_line":"        self._clean_network_ports(port_id)"},{"line_number":127,"context_line":"        self.network_ports[network_id].add(port_id)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _clean_network_ports(self, port_id):"},{"line_number":130,"context_line":"        for port_set in self.network_ports.values():"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_564c949d","line":127,"in_reply_to":"7a2fa921_474d51c3","updated":"2015-11-27 09:59:00.000000000","message":"+","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a0700d3c3bb5ad946f181bb35e74b417d69dae58","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _update_port_network(self, port_id, network_id):"},{"line_number":126,"context_line":"        self._clean_network_ports(port_id)"},{"line_number":127,"context_line":"        self.network_ports[network_id].add(port_id)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _clean_network_ports(self, port_id):"},{"line_number":130,"context_line":"        for port_set in self.network_ports.values():"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_901ac9c4","line":127,"in_reply_to":"7a2fa921_474d51c3","updated":"2015-11-30 06:15:40.000000000","message":"I removed it to make sure it does not belong to any network.","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fdb5ef642ef471b90194afd991fc677b53c0c948","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.state_rpc \u003d agent_rpc.PluginReportStateAPI(topics.REPORTS)"},{"line_number":141,"context_line":"        # RPC network init"},{"line_number":142,"context_line":"        # Handle updates from service"},{"line_number":143,"context_line":"        #self.endpoints \u003d [SriovNicSwitchRpcCallbacksMixin(self.context, self,"},{"line_number":144,"context_line":"        #                                             self.sg_agent)]"},{"line_number":145,"context_line":"        self.endpoints \u003d [self]"},{"line_number":146,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_16b4cc7f","line":143,"updated":"2015-11-27 09:59:00.000000000","message":"Why the change? Can we please try to leave the agent uncoupled from the callbacks?","commit_id":"d0181be7a1a5945fa87df53c8480550e06b1a1b8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"df69f5d3f7b051ea9556dc7cf9a1126c21e65fd5","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Set RPC API version to 1.0 by default."},{"line_number":51,"context_line":"    # history"},{"line_number":52,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":53,"context_line":"    target \u003d oslo_messaging.Target(version\u003d\u00271.4\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, context, agent, sg_agent):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_04868465","line":52,"updated":"2015-11-30 14:46:40.000000000","message":"please update the comment history \nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py#L133-L138\n\nalso please put a note that \n #   1.2 Support DVR (Distributed Virtual Router) RPC\n #   1.3 Added param devices_to_update to \nare not supported in the agent so we may want to provide empty implement of them","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Set RPC API version to 1.0 by default."},{"line_number":51,"context_line":"    # history"},{"line_number":52,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":53,"context_line":"    target \u003d oslo_messaging.Target(version\u003d\u00271.4\u0027)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, context, agent, sg_agent):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_38c72866","line":52,"in_reply_to":"9a8ffd7b_04868465","updated":"2015-11-30 21:38:45.000000000","message":"Done","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        LOG.debug(\"network_update received\")"},{"line_number":86,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":87,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"},{"line_number":88,"context_line":"            if mac_pci_slot not in self.agent.deleted_ports:"},{"line_number":89,"context_line":"                self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":90,"context_line":"        return"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_ee3c91e2","line":88,"updated":"2015-11-30 10:14:54.000000000","message":"self.agent.deleted_ports does not exist as the sriov agent works different than the ovs agent. The sriov agent detects the deletion of a port only via the agent loop, while the ovs agent relies on the rpc messaging. We have the same issue with the linuxbridge agent. I proposed a way of handling the potential race issues here [1] line 1078, but I need some feedback from others to verify it really does the same.\n\n[1] https://review.openstack.org/#/c/250542/2/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        LOG.debug(\"network_update received\")"},{"line_number":86,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":87,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"},{"line_number":88,"context_line":"            if mac_pci_slot not in self.agent.deleted_ports:"},{"line_number":89,"context_line":"                self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":90,"context_line":"        return"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_de7352e6","line":88,"in_reply_to":"9a8ffd7b_ee3c91e2","updated":"2015-11-30 21:38:45.000000000","message":"I think that\u0027s a good idea.","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Stores port update notifications for processing in the main loop"},{"line_number":112,"context_line":"        self.updated_devices \u003d set()"},{"line_number":113,"context_line":"        self.updated_device_ids \u003d set()"},{"line_number":114,"context_line":"        self.mac_to_port_id_mapping \u003d {}"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.context \u003d context.get_admin_context_without_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_19883d70","line":113,"updated":"2015-11-30 10:14:54.000000000","message":"never used","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Stores port update notifications for processing in the main loop"},{"line_number":112,"context_line":"        self.updated_devices \u003d set()"},{"line_number":113,"context_line":"        self.updated_device_ids \u003d set()"},{"line_number":114,"context_line":"        self.mac_to_port_id_mapping \u003d {}"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.context \u003d context.get_admin_context_without_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_2efb6249","line":113,"in_reply_to":"9a8ffd7b_19883d70","updated":"2015-11-30 21:38:45.000000000","message":"Done","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                         device)"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_port_network(self, mac_pci_slot, network_id):"},{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_b997b138","line":284,"updated":"2015-11-30 10:14:54.000000000","message":"why not name it _update_network_ports along _clean_network_ports? (I know that ovs named it the other way round, but I personally think this is the better approach)","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                         device)"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_port_network(self, mac_pci_slot, network_id):"},{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_2e57e227","line":284,"in_reply_to":"9a8ffd7b_b997b138","updated":"2015-11-30 21:38:45.000000000","message":"Done","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":289,"context_line":"        for port_sets in self.network_ports.values():"},{"line_number":290,"context_line":"            if mac_pci_slot in port_sets:"},{"line_number":291,"context_line":"                port_sets.remove(mac_pci_slot)"},{"line_number":292,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_54a76ca6","line":289,"updated":"2015-11-30 10:14:54.000000000","message":"s/port_sets/port_set","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":289,"context_line":"        for port_sets in self.network_ports.values():"},{"line_number":290,"context_line":"            if mac_pci_slot in port_sets:"},{"line_number":291,"context_line":"                port_sets.remove(mac_pci_slot)"},{"line_number":292,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_ae42f266","line":289,"in_reply_to":"9a8ffd7b_54a76ca6","updated":"2015-11-30 21:38:45.000000000","message":"I think the value here is a list of mac_slot lists belongs to the network.","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"36eaf1e94fd09608a66cb56b7975e19e5df5342e","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":289,"context_line":"        for port_sets in self.network_ports.values():"},{"line_number":290,"context_line":"            if mac_pci_slot in port_sets:"},{"line_number":291,"context_line":"                port_sets.remove(mac_pci_slot)"},{"line_number":292,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_d0e23501","line":289,"in_reply_to":"9a8ffd7b_ae42f266","updated":"2015-12-01 14:44:43.000000000","message":"oh you\u0027re right! I\u0027m sorry","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"157e27441298601a2b970f74b61f21542a2d4a88","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"},{"line_number":306,"context_line":"                            \u0027device\u0027: mac,"},{"line_number":307,"context_line":"                            \u0027profile\u0027: profile}"},{"line_number":308,"context_line":"                    self._clean_network_ports((mac, pci_slot))"},{"line_number":309,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":310,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":311,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_5fb8e510","line":308,"updated":"2015-11-30 10:14:54.000000000","message":"You could pass in device instead of creating the tuple again, right? Or is device not a tuple?","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"},{"line_number":306,"context_line":"                            \u0027device\u0027: mac,"},{"line_number":307,"context_line":"                            \u0027profile\u0027: profile}"},{"line_number":308,"context_line":"                    self._clean_network_ports((mac, pci_slot))"},{"line_number":309,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":310,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":311,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_202a812d","line":308,"in_reply_to":"9a8ffd7b_5fb8e510","updated":"2015-11-30 21:38:45.000000000","message":"eagle eye! done!","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"df69f5d3f7b051ea9556dc7cf9a1126c21e65fd5","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"},{"line_number":306,"context_line":"                            \u0027device\u0027: mac,"},{"line_number":307,"context_line":"                            \u0027profile\u0027: profile}"},{"line_number":308,"context_line":"                    self._clean_network_ports((mac, pci_slot))"},{"line_number":309,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":310,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":311,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_84e35405","line":308,"in_reply_to":"9a8ffd7b_5fb8e510","updated":"2015-11-30 14:46:40.000000000","message":"yes you are right","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b1009e2c861305b13af1c07c5f6e34bc61292b42","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"},{"line_number":306,"context_line":"                            \u0027device\u0027: mac,"},{"line_number":307,"context_line":"                            \u0027profile\u0027: profile}"},{"line_number":308,"context_line":"                    self._clean_network_ports((mac, pci_slot))"},{"line_number":309,"context_line":"                    self.ext_manager.delete_port(self.context, port)"},{"line_number":310,"context_line":"                    del self.mac_to_port_id_mapping[mac]"},{"line_number":311,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_5e4e8297","line":308,"in_reply_to":"9a8ffd7b_84e35405","updated":"2015-11-30 21:38:45.000000000","message":"Done","commit_id":"cc583d20cc9c268189fb897d4283a50fbf32950c"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"d8ce7afa7b3eda47fa9f7b8095d3cda28e211c5a","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":93,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"},{"line_number":94,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class SriovNicSwitchAgent(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_70db491c","line":95,"updated":"2015-12-01 14:44:21.000000000","message":"remove return","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"54979b2330ac4de71c933d4e48fc451310bfd9f5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":93,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"},{"line_number":94,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":95,"context_line":"        return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class SriovNicSwitchAgent(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_5f85ee56","line":95,"in_reply_to":"9a8ffd7b_70db491c","updated":"2015-12-01 16:03:50.000000000","message":"Done","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"bdd4847b4bbf2aa326c0f10eec71b61e0762b810","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                         \"PCI slot %(pci_slot)s\"),"},{"line_number":303,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":306,"context_line":"                if port_id:"},{"line_number":307,"context_line":"                    profile \u003d {\u0027pci_slot\u0027: pci_slot}"},{"line_number":308,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_afbe03fd","line":305,"updated":"2015-12-02 08:21:22.000000000","message":"In the lb patchset [1] Slawek stores the port_id in together with the device in the network_ports map (as dict). His _clean_network_ports method then returns the port_id. As this is the only place where the port_id is gained from the mac_to_port_mappings, we could do it the same way for sriov:\n\nTo do so, replace this line by line 311\n  port_id \u003d self._clean_network_ports(device)\n\nAnd of course adapt the _clean_network_ports method and the nework_ports dict. accordingly.\n\nIf I didn\u0027t miss a something, we now can get rid of the whole mac_to_port_id_mappings stuff. Please have a look at the lb patchset [1] if this could make sense! I think so...\n\nThe only thing I don\u0027t like with this is approach, is that you need a nested loop in the _clean_network_ports method...\n\n[1] https://review.openstack.org/#/c/250542","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c056f0de64a3cc75f238c794701a3ba74fcc0a7d","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                         \"PCI slot %(pci_slot)s\"),"},{"line_number":303,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":306,"context_line":"                if port_id:"},{"line_number":307,"context_line":"                    profile \u003d {\u0027pci_slot\u0027: pci_slot}"},{"line_number":308,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_8b8513d0","line":305,"in_reply_to":"9a8ffd7b_45ae3ce7","updated":"2015-12-02 16:45:48.000000000","message":"Couldn\u0027t reach you via IRC so quick comment here: \n\nI commented on Slaweks patch regarding the complex construct he added. I\u0027m not if this is the right way to go. My feeling says yes, but other opinions like yours are required.\n\nBut if we go Slaweks way, we really could get rid of the mac_to_port_id_mappings thing...","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"bad0a5015fc02ec2e1e75f0581e48ca9a391a9ba","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                         \"PCI slot %(pci_slot)s\"),"},{"line_number":303,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":306,"context_line":"                if port_id:"},{"line_number":307,"context_line":"                    profile \u003d {\u0027pci_slot\u0027: pci_slot}"},{"line_number":308,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_5dfa8c76","line":305,"in_reply_to":"9a8ffd7b_8b8513d0","updated":"2015-12-02 17:24:49.000000000","message":"Thanks Andreas, I have upload a new patchset based this idea and removed the mac_to_port_id_mappings.\nI think your feeling is right!","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"bc504dd1182dc77e56936ccb07248e11da9f3a01","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                         \"PCI slot %(pci_slot)s\"),"},{"line_number":303,"context_line":"                     {\u0027mac\u0027: mac, \u0027pci_slot\u0027: pci_slot})"},{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port_id \u003d self.mac_to_port_id_mapping.get(mac)"},{"line_number":306,"context_line":"                if port_id:"},{"line_number":307,"context_line":"                    profile \u003d {\u0027pci_slot\u0027: pci_slot}"},{"line_number":308,"context_line":"                    port \u003d {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_45ae3ce7","line":305,"in_reply_to":"9a8ffd7b_afbe03fd","updated":"2015-12-02 16:16:29.000000000","message":"sounds good. But I am not sure, it create the complex, but save mac_to_port_id_mappings stuff.\n\nI will have a try.","commit_id":"1854d5f175e5f9d7d630bc250a4244c223fb6a17"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                      \"skipping\", {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac,"},{"line_number":86,"context_line":"                                   \u0027pci_slot\u0027: pci_slot})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":89,"context_line":"        LOG.debug(\"network_update received\")"},{"line_number":90,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":91,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_4f8677dc","line":88,"updated":"2015-12-02 08:47:58.000000000","message":"I\u0027m missing a small unittest for this function","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                      \"skipping\", {\u0027id\u0027: port[\u0027id\u0027], \u0027mac\u0027: mac,"},{"line_number":86,"context_line":"                                   \u0027pci_slot\u0027: pci_slot})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":89,"context_line":"        LOG.debug(\"network_update received\")"},{"line_number":90,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":91,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_6dad6c9a","line":88,"in_reply_to":"9a8ffd7b_4f8677dc","updated":"2015-12-02 16:16:22.000000000","message":"ok, will add it!","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                         device)"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_network_ports(self, mac_pci_slot, network_id):"},{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_ef6deb32","line":284,"updated":"2015-12-02 08:47:58.000000000","message":"you\u0027re testing this method indirectly in your new testcase. Not sure if we should make a explicit test of this method?","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                         device)"},{"line_number":282,"context_line":"        return False"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_network_ports(self, mac_pci_slot, network_id):"},{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_4db18800","line":284,"in_reply_to":"9a8ffd7b_ef6deb32","updated":"2015-12-02 16:16:22.000000000","message":"thanks I will update it!","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":289,"context_line":"        for port_sets in self.network_ports.values():"},{"line_number":290,"context_line":"            if mac_pci_slot in port_sets:"},{"line_number":291,"context_line":"                port_sets.remove(mac_pci_slot)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_af77e300","line":288,"updated":"2015-12-02 08:47:58.000000000","message":"you\u0027re testing this method indirectly in your new testcase. Not sure if we should make a explicit test of this method?","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":286,"context_line":"        self.network_ports[network_id].add(mac_pci_slot)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":289,"context_line":"        for port_sets in self.network_ports.values():"},{"line_number":290,"context_line":"            if mac_pci_slot in port_sets:"},{"line_number":291,"context_line":"                port_sets.remove(mac_pci_slot)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_0dd0601e","line":288,"in_reply_to":"9a8ffd7b_af77e300","updated":"2015-12-02 16:16:22.000000000","message":"I will update it","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ee018c7b552038541d9e96e019a95bcf4a16c3c0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":54,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC (not supported)"},{"line_number":55,"context_line":"    #   1.3 Added param devices_to_update to security_groups_provider_updated"},{"line_number":56,"context_line":"    #       (not supported)"},{"line_number":57,"context_line":"    #   1.4 Added support for network_update"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    target \u003d oslo_messaging.Target(version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_66f724d4","line":56,"updated":"2015-12-04 11:01:46.000000000","message":"can you add implementations for 1.2 and 1.3 with pass, so we don\u0027t get error in the log?","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    #   1.1 Support Security Group RPC"},{"line_number":54,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC (not supported)"},{"line_number":55,"context_line":"    #   1.3 Added param devices_to_update to security_groups_provider_updated"},{"line_number":56,"context_line":"    #       (not supported)"},{"line_number":57,"context_line":"    #   1.4 Added support for network_update"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    target \u003d oslo_messaging.Target(version\u003d\u00271.4\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_6d212efb","line":56,"in_reply_to":"7a740942_66f724d4","updated":"2015-12-04 19:56:15.000000000","message":"Done","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"b127697c1dee816d16de0a6340331321f97ac7a1","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":92,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":93,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":94,"context_line":"                   \u0027ports\u0027: self.agent.network_ports[network_id]})"},{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_f6aca389","line":94,"updated":"2015-12-03 06:24:54.000000000","message":"We don\u0027t need infomation like MAC and slot and it makes log fat when there are many ports. Should we use self.agent.network_ports[network_id].keys()?","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":92,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":93,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":94,"context_line":"                   \u0027ports\u0027: self.agent.network_ports[network_id]})"},{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_3c61163a","line":94,"in_reply_to":"9a8ffd7b_f6aca389","updated":"2015-12-04 19:56:15.000000000","message":"right, done!","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"b127697c1dee816d16de0a6340331321f97ac7a1","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                         device)"},{"line_number":285,"context_line":"        return False"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_network_ports(self, network_id, port_id, mac_pci_slot):"},{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_56180fd3","line":287,"updated":"2015-12-03 06:24:54.000000000","message":"nit: It\u0027s better to put called method above caller, that is L251.","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                         device)"},{"line_number":285,"context_line":"        return False"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_network_ports(self, network_id, port_id, mac_pci_slot):"},{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_bc03c641","line":287,"in_reply_to":"7a740942_4d3a4e38","updated":"2015-12-04 19:56:15.000000000","message":"Done","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                         device)"},{"line_number":285,"context_line":"        return False"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_network_ports(self, network_id, port_id, mac_pci_slot):"},{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_1cec5a8e","line":287,"in_reply_to":"9a8ffd7b_56180fd3","updated":"2015-12-04 19:56:15.000000000","message":"Done","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a8ff7016cd6748fb505b9cbfeec8326c4d974cea","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                         device)"},{"line_number":285,"context_line":"        return False"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_network_ports(self, network_id, port_id, mac_pci_slot):"},{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_4d3a4e38","line":287,"in_reply_to":"9a8ffd7b_56180fd3","updated":"2015-12-04 09:17:00.000000000","message":"good point!","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"b127697c1dee816d16de0a6340331321f97ac7a1","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":292,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":293,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_1685a7cd","line":291,"updated":"2015-12-03 06:24:54.000000000","message":"ditto","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._clean_network_ports(mac_pci_slot)"},{"line_number":289,"context_line":"        self.network_ports[network_id][port_id] \u003d mac_pci_slot"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":292,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":293,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_fce86e7e","line":291,"in_reply_to":"9a8ffd7b_1685a7cd","updated":"2015-12-04 19:56:15.000000000","message":"Done","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a8ff7016cd6748fb505b9cbfeec8326c4d974cea","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":292,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":293,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":295,"context_line":"                    port_sets.pop(port_id)"},{"line_number":296,"context_line":"                    # remove this key if it is empty"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_48b0fcf4","line":293,"updated":"2015-12-04 09:17:00.000000000","message":"looks like the map does not buy us anything. This also requires an additional loop. I would vote to go with approach on the lb patchset [1]. Just using a list of ports, while a port is represented by a map having {device:mac_pci_slot, port_id:port_id}. Does that make sense? \n\n\n[1] https://review.openstack.org/#/c/250542/6/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":292,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":293,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":295,"context_line":"                    port_sets.pop(port_id)"},{"line_number":296,"context_line":"                    # remove this key if it is empty"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_37004f01","line":293,"in_reply_to":"7a740942_48b0fcf4","updated":"2015-12-04 19:56:15.000000000","message":"Thanks Andreas, but I think both of them use two loops, difference is ?","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"47577f15b1c3f0e537d69c04bfba12dcce011f21","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":295,"context_line":"                    port_sets.pop(port_id)"},{"line_number":296,"context_line":"                    # remove this key if it is empty"},{"line_number":297,"context_line":"                    if not self.network_ports.get(net_id):"},{"line_number":298,"context_line":"                        self.network_ports.pop(net_id)"},{"line_number":299,"context_line":"                    return port_id"},{"line_number":300,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_3e728ae6","line":297,"updated":"2015-12-04 09:54:00.000000000","message":"we\u0027re already listening for network_delete events (line 145) but do not have a callback for this. Do you think it makes sense to remove the net_id over there?","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ee018c7b552038541d9e96e019a95bcf4a16c3c0","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":295,"context_line":"                    port_sets.pop(port_id)"},{"line_number":296,"context_line":"                    # remove this key if it is empty"},{"line_number":297,"context_line":"                    if not self.network_ports.get(net_id):"},{"line_number":298,"context_line":"                        self.network_ports.pop(net_id)"},{"line_number":299,"context_line":"                    return port_id"},{"line_number":300,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_86b490f2","line":297,"in_reply_to":"7a740942_3e728ae6","updated":"2015-12-04 11:01:46.000000000","message":"I think we should remove the listening for network_delete events\nhttps://review.openstack.org/#/c/221958/","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":295,"context_line":"                    port_sets.pop(port_id)"},{"line_number":296,"context_line":"                    # remove this key if it is empty"},{"line_number":297,"context_line":"                    if not self.network_ports.get(net_id):"},{"line_number":298,"context_line":"                        self.network_ports.pop(net_id)"},{"line_number":299,"context_line":"                    return port_id"},{"line_number":300,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_9c2b6a94","line":297,"in_reply_to":"7a740942_86b490f2","updated":"2015-12-04 19:56:15.000000000","message":"I think Levi\u0027s patch will remove that events, then we can keep it currently.","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"88bd58fbf45744ef157ec2200b88eb7f0cb7bc43","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":99,"context_line":"        pass"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get_dvr_mac_address_by_host(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_3374ce66","line":98,"updated":"2015-12-06 07:16:22.000000000","message":"Should not the following methods have default \u0027pass\u0027 behaviour in the base class?","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d0fcaa504dc578ed5c89bea2dafff38b0d6d55bb","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":99,"context_line":"        pass"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get_dvr_mac_address_by_host(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_c42d7e47","line":98,"in_reply_to":"7a740942_041f0660","updated":"2015-12-06 13:22:43.000000000","message":"While having these methods here does not make any functional impact, it seems the wrong to have default no-op behaviour is derived class that does not support related functionality. Maybe worth to add support to network-update only and resolve catch-up with dvr/sg_provider in different patch? I think these details should not get into not related agents.","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"53457ba0a36c42d8f45bc0fb378747a8625a1f75","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":99,"context_line":"        pass"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get_dvr_mac_address_by_host(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_041f0660","line":98,"in_reply_to":"7a740942_3374ce66","updated":"2015-12-06 13:16:18.000000000","message":"The dvr method can\u0027t move up because the sg_rpc.SecurityGroupAgentRpcCallbackMixin is for the security groups, but I guess we should remove the security_groups_provider_updated. \n\nI will add Akihiro Motoki to the review to make sure that we need to implement the dvr method with pass ( that was my understanding in our irc conversation)\n\nalso I didn\u0027t see it in the linuxbridge implementation \n\nhttps://github.com/openstack/neutron/blob/77a6d114eae9de8078b358a9bd8502fb7c393641/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py#L669-L672","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2a3d9bdd2ab77628a11fa1615d7430cee2dc2856","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":99,"context_line":"        pass"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get_dvr_mac_address_by_host(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_c7e1f29b","line":98,"in_reply_to":"7a740942_c42d7e47","updated":"2015-12-07 08:29:16.000000000","message":"big +1 for discussing those changes in another patchset","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"dd4015664e34254dbbc4aba6dc1b8e51573bb878","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        for mac_pci_slot in self.agent.network_ports[network_id].values():"},{"line_number":96,"context_line":"            self.agent.updated_devices.add(mac_pci_slot)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":99,"context_line":"        pass"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def get_dvr_mac_address_by_host(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_27e1af9a","line":98,"in_reply_to":"7a740942_c7e1f29b","updated":"2015-12-08 05:13:30.000000000","message":"seems need remove this part","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0526fc15e199115e487d835e45c2ba0e8f8de551","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                    if not self.network_ports.get(net_id):"},{"line_number":278,"context_line":"                        self.network_ports.pop(net_id)"},{"line_number":279,"context_line":"                    return port_id"},{"line_number":280,"context_line":"        return None"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def treat_devices_added_updated(self, devices_info):"},{"line_number":283,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_5472ab4a","line":280,"updated":"2015-12-05 07:48:56.000000000","message":"you do not need this line by default a method returns None","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"53457ba0a36c42d8f45bc0fb378747a8625a1f75","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                    if not self.network_ports.get(net_id):"},{"line_number":278,"context_line":"                        self.network_ports.pop(net_id)"},{"line_number":279,"context_line":"                    return port_id"},{"line_number":280,"context_line":"        return None"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def treat_devices_added_updated(self, devices_info):"},{"line_number":283,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_64da8a7a","line":280,"in_reply_to":"7a740942_5472ab4a","updated":"2015-12-06 13:16:18.000000000","message":"Done","commit_id":"83d507767d88267f6fb34640c1ddbd5c3da9f1bb"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c88765d73c5903ed45abadf7c975584790a226e3","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":269,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":270,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":271,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":272,"context_line":"                    port_sets.pop(port_id)"},{"line_number":273,"context_line":"                    # remove this key if it is empty"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_d2c45260","line":270,"updated":"2015-12-07 08:41:55.000000000","message":"@yalei: talking with my modular l2 agent hat [1] now: The long term goal with this modular l2 agent approach is to achieve some common code between the l2 agents. Especially between sriov and linuxbridge agent (as both are very similar from how they work). So from that point of view I would suggest to keep the implementation between those 2 agents common if possible. This makes merging them together in the future more easy.\n\nSo if there\u0027s no strong reason for having a dict, I would ask you to move back to the list approach, which is suggested for the lb agent [2]. I explained how it could work in patchset 8 [3]. But if there\u0027s a strong reason for having the dict here, you can of course convince me :)\n\n[1] https://bugs.launchpad.net/neutron/+bug/1468803\n[2] https://review.openstack.org/250542\n[3] https://review.openstack.org/#/c/233499/8/neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py","commit_id":"f8e63eb62f1f53e462c9a30bf5ee55a2d128a146"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"23817a835f42f91af18c3a6c17f14cacb16ab985","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":269,"context_line":"        for net_id, port_sets in six.iteritems(self.network_ports):"},{"line_number":270,"context_line":"            for port_id, info in six.iteritems(port_sets):"},{"line_number":271,"context_line":"                if mac_pci_slot \u003d\u003d info:"},{"line_number":272,"context_line":"                    port_sets.pop(port_id)"},{"line_number":273,"context_line":"                    # remove this key if it is empty"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_d8d3ded3","line":270,"in_reply_to":"7a740942_d2c45260","updated":"2015-12-08 05:10:41.000000000","message":"support your ideas, and am glad be able to coordinate with others. just another difference is that my patch remove the network_port keys if the value is empty. \nmay I keep this?","commit_id":"f8e63eb62f1f53e462c9a30bf5ee55a2d128a146"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"d969cf29018ac176da15334d524aeb8dced484b5","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":90,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":91,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":92,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":93,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":94,"context_line":"                   \u0027ports\u0027: self.agent.network_ports[network_id]})"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_cbe50609","line":91,"updated":"2015-12-09 03:35:37.000000000","message":"how about using \"received\" instead of \"processed\". Plz note the update is not yet processed.","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c414d4a795d85f61f3816cb5c27bfa04c606c9ab","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":90,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"},{"line_number":91,"context_line":"        LOG.debug(\"network_update message processed for network \""},{"line_number":92,"context_line":"                  \"%(network_id)s, with ports: %(ports)s\","},{"line_number":93,"context_line":"                  {\u0027network_id\u0027: network_id,"},{"line_number":94,"context_line":"                   \u0027ports\u0027: self.agent.network_ports[network_id]})"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_084b5f88","line":91,"in_reply_to":"7a740942_cbe50609","updated":"2015-12-11 21:19:10.000000000","message":"Thanks, I will update it if we need a new patch.","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"818c7cfdbad36adb0bd12c8d17260a7fd1dbdbc7","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        device_info[\u0027added\u0027] \u003d curr_devices - registered_devices"},{"line_number":185,"context_line":"        # we need to clean up after devices are removed"},{"line_number":186,"context_line":"        device_info[\u0027removed\u0027] \u003d registered_devices - curr_devices"},{"line_number":187,"context_line":"        # we don\u0027t want to process updates for devices that don\u0027t exist"},{"line_number":188,"context_line":"        device_info[\u0027updated\u0027] \u003d (updated_devices \u0026 curr_devices -"},{"line_number":189,"context_line":"                                  device_info[\u0027removed\u0027])"},{"line_number":190,"context_line":"        return device_info"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_bb6945fb","line":187,"updated":"2015-12-11 16:48:43.000000000","message":"this is not really related to this patch, right?","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"28da5f0151198fcde898160e91568e270d16769d","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        device_info[\u0027added\u0027] \u003d curr_devices - registered_devices"},{"line_number":185,"context_line":"        # we need to clean up after devices are removed"},{"line_number":186,"context_line":"        device_info[\u0027removed\u0027] \u003d registered_devices - curr_devices"},{"line_number":187,"context_line":"        # we don\u0027t want to process updates for devices that don\u0027t exist"},{"line_number":188,"context_line":"        device_info[\u0027updated\u0027] \u003d (updated_devices \u0026 curr_devices -"},{"line_number":189,"context_line":"                                  device_info[\u0027removed\u0027])"},{"line_number":190,"context_line":"        return device_info"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a7e1126_ce7b358b","line":187,"in_reply_to":"7a740942_67330215","updated":"2015-12-18 16:33:16.000000000","message":"thanks Andreas for raising this up.\n\nwhat is the difference between removed and deleted ports?\nI think deleted ports in ovs is come from port_delete in a unsync way. but removed ports in sriov agent is generated from get_assigned_devices_info in a sync way. personally I think we could remove this line.\n\nwelcome more comments!","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c414d4a795d85f61f3816cb5c27bfa04c606c9ab","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        device_info[\u0027added\u0027] \u003d curr_devices - registered_devices"},{"line_number":185,"context_line":"        # we need to clean up after devices are removed"},{"line_number":186,"context_line":"        device_info[\u0027removed\u0027] \u003d registered_devices - curr_devices"},{"line_number":187,"context_line":"        # we don\u0027t want to process updates for devices that don\u0027t exist"},{"line_number":188,"context_line":"        device_info[\u0027updated\u0027] \u003d (updated_devices \u0026 curr_devices -"},{"line_number":189,"context_line":"                                  device_info[\u0027removed\u0027])"},{"line_number":190,"context_line":"        return device_info"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_c8b23796","line":187,"in_reply_to":"7a740942_bb6945fb","updated":"2015-12-11 21:19:10.000000000","message":"it\u0027s not related to this patch, this line just interpret the next line, I move it with next line together.","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"9e42e577544db475197eb53876b5f6ce91911236","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        device_info[\u0027added\u0027] \u003d curr_devices - registered_devices"},{"line_number":185,"context_line":"        # we need to clean up after devices are removed"},{"line_number":186,"context_line":"        device_info[\u0027removed\u0027] \u003d registered_devices - curr_devices"},{"line_number":187,"context_line":"        # we don\u0027t want to process updates for devices that don\u0027t exist"},{"line_number":188,"context_line":"        device_info[\u0027updated\u0027] \u003d (updated_devices \u0026 curr_devices -"},{"line_number":189,"context_line":"                                  device_info[\u0027removed\u0027])"},{"line_number":190,"context_line":"        return device_info"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_67330215","line":187,"in_reply_to":"7a740942_c8b23796","updated":"2015-12-14 10:32:00.000000000","message":"@Rosella: I guess you\u0027re referring to that whole paragraph that changed, right? \n\nWell, we added line 189 to make sure, that removed devices will not be processed as updated devices at the same time. This can happen if one deletes a port (vm has been destroyed) and concurrently a network update request has been received by the neutron agent (all ports in the networks_ports map of that network are treated as updated). \n\n@All:\nBut Rossellas comment made me thinking again. Is this change really required? I mean can a removed port ever be treated as updated port at the same time? Let\u0027s assume a port has been removed but in parallel it has been added to agent.updated_devices due to network_update.\n\nNow curr_devices will not contain this port anymore. Line 186 makes sure it is added to \u0027removed\u0027. Now have a look at line 188. As the port is not contained in current_devices anymore, it will not be part of the \u0027updated\u0027 list. So I think line 189 is not required at all.\n\nProbably this is something that came from the ovs agent. There is a distinction between removed and deleted ports. Also, it listens on port_delete events to get notice about a deletion. Both is not the case for sriov and also not for lb. \n\nDoes that make sense? Can anybody doublecheck?","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"818c7cfdbad36adb0bd12c8d17260a7fd1dbdbc7","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            \"port_id\": port_id,"},{"line_number":256,"context_line":"            \"device\": mac_pci_slot})"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_fbf6ed5b","line":258,"updated":"2015-12-11 16:48:43.000000000","message":"if you add network_id as param you avoid one loop","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"c414d4a795d85f61f3816cb5c27bfa04c606c9ab","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            \"port_id\": port_id,"},{"line_number":256,"context_line":"            \"device\": mac_pci_slot})"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_cb1c7168","line":258,"in_reply_to":"7a740942_45a71050","updated":"2015-12-11 21:19:10.000000000","message":"+1 \nthanks Rossella and Slawek","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"389c3f4f97649cbf73603e47b6b837973ad918c9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            \"port_id\": port_id,"},{"line_number":256,"context_line":"            \"device\": mac_pci_slot})"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_45a71050","line":258,"in_reply_to":"7a740942_fbf6ed5b","updated":"2015-12-11 20:46:16.000000000","message":"I\u0027m not sure if it is doable easy because in treat_devices_removed() method there is probably no network_id available easily (at least in linuxbridge agent it is like that)","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"d969cf29018ac176da15334d524aeb8dced484b5","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":262,"context_line":"                    ports_list.remove(port_data)"},{"line_number":263,"context_line":"                    if ports_list \u003d\u003d []:"},{"line_number":264,"context_line":"                        self.network_ports.pop(netid)"},{"line_number":265,"context_line":"                    return port_data[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_6bac128c","line":262,"updated":"2015-12-09 03:35:37.000000000","message":"IMO, this is not a safe scan. The iterated item can be deleted and can lead to in-correct next item. \n\nhttp://stackoverflow.com/questions/10665591/how-to-remove-list-elements-in-a-for-loop-in-python","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b9d80d1766939e465b3719034073dba9948ebcd4","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":262,"context_line":"                    ports_list.remove(port_data)"},{"line_number":263,"context_line":"                    if ports_list \u003d\u003d []:"},{"line_number":264,"context_line":"                        self.network_ports.pop(netid)"},{"line_number":265,"context_line":"                    return port_data[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_6e508f5f","line":262,"in_reply_to":"7a740942_6bac128c","updated":"2015-12-09 11:13:36.000000000","message":"interesting...","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"37585a2c839e0c47a055494a0b68ca5084ba9ce4","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":262,"context_line":"                    ports_list.remove(port_data)"},{"line_number":263,"context_line":"                    if ports_list \u003d\u003d []:"},{"line_number":264,"context_line":"                        self.network_ports.pop(netid)"},{"line_number":265,"context_line":"                    return port_data[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_fa93cefe","line":262,"in_reply_to":"7a740942_6e508f5f","updated":"2015-12-09 15:35:46.000000000","message":"yes, you should clone the list and than iterate for removal it is not safe that way","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"02edcb07c1fa2fead0879a9ace64137685ddeb29","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":260,"context_line":"            for port_data in ports_list:"},{"line_number":261,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":262,"context_line":"                    ports_list.remove(port_data)"},{"line_number":263,"context_line":"                    if ports_list \u003d\u003d []:"},{"line_number":264,"context_line":"                        self.network_ports.pop(netid)"},{"line_number":265,"context_line":"                    return port_data[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a740942_f433bef4","line":262,"in_reply_to":"7a740942_fa93cefe","updated":"2015-12-10 06:57:13.000000000","message":"look like it safe because of the return","commit_id":"6363eb8f892b933c601213bbda6b403068f8266d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import collections"},{"line_number":18,"context_line":"import six"},{"line_number":19,"context_line":"import socket"},{"line_number":20,"context_line":"import sys"},{"line_number":21,"context_line":"import time"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_b7dfd4d4","line":18,"updated":"2016-01-15 12:31:34.000000000","message":"six is not stdlib, should have gone into next import section","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import collections"},{"line_number":18,"context_line":"import six"},{"line_number":19,"context_line":"import socket"},{"line_number":20,"context_line":"import sys"},{"line_number":21,"context_line":"import time"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_fba057a1","line":18,"in_reply_to":"da6ed579_b7dfd4d4","updated":"2016-01-20 08:46:58.000000000","message":"Done","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # Set RPC API version to 1.0 by default."},{"line_number":50,"context_line":"    # history"},{"line_number":51,"context_line":"    #   1.1 Support Security Group RPC (works with NoopFirewallDriver)"},{"line_number":52,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC (not supported)"},{"line_number":53,"context_line":"    #   1.3 Added param devices_to_update to security_groups_provider_updated"},{"line_number":54,"context_line":"    #       (works with NoopFirewallDriver)"},{"line_number":55,"context_line":"    #   1.4 Added support for network_update"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_f7aeac2c","line":52,"updated":"2016-01-15 12:31:34.000000000","message":"? what does it mean, to support but not supported? If you mean those are not supported, I guess you should add a TODO entry here then.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # Set RPC API version to 1.0 by default."},{"line_number":50,"context_line":"    # history"},{"line_number":51,"context_line":"    #   1.1 Support Security Group RPC (works with NoopFirewallDriver)"},{"line_number":52,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC (not supported)"},{"line_number":53,"context_line":"    #   1.3 Added param devices_to_update to security_groups_provider_updated"},{"line_number":54,"context_line":"    #       (works with NoopFirewallDriver)"},{"line_number":55,"context_line":"    #   1.4 Added support for network_update"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_bb2c1f03","line":52,"in_reply_to":"ba63e191_59144bf4","updated":"2016-01-20 08:46:58.000000000","message":"Thanks Ihar, and agree Ajo, it is just the version hisorty and will not support it.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7c8a17d432675429dfc76e91a55f19fc41e10e6a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # Set RPC API version to 1.0 by default."},{"line_number":50,"context_line":"    # history"},{"line_number":51,"context_line":"    #   1.1 Support Security Group RPC (works with NoopFirewallDriver)"},{"line_number":52,"context_line":"    #   1.2 Support DVR (Distributed Virtual Router) RPC (not supported)"},{"line_number":53,"context_line":"    #   1.3 Added param devices_to_update to security_groups_provider_updated"},{"line_number":54,"context_line":"    #       (works with NoopFirewallDriver)"},{"line_number":55,"context_line":"    #   1.4 Added support for network_update"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_59144bf4","line":52,"in_reply_to":"da6ed579_f7aeac2c","updated":"2016-01-19 09:47:22.000000000","message":"I believe the reference is good. It\u0027s the evolution of the API versioning, DVR was introduced at some time and it\u0027s not supported in this agent, and AFAIK there\u0027s no plan to support it.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            \"device\": mac_pci_slot})"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_5229c688","line":267,"updated":"2016-01-15 12:31:34.000000000","message":"some people complain that we use six to iterate thru dict items. they say we should just use the dict object.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7c8a17d432675429dfc76e91a55f19fc41e10e6a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            \"device\": mac_pci_slot})"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_99bba3c4","line":267,"in_reply_to":"da6ed579_5229c688","updated":"2016-01-19 09:47:22.000000000","message":"dict.items() works in both python 2.7 and 3.x ?","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0b64f4ebcf8130fbf374e44610947402bca54133","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"},{"line_number":271,"context_line":"                    if ports_list \u003d\u003d []:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da6ed579_32f532ec","line":268,"updated":"2016-01-15 12:31:34.000000000","message":"on each port update, you traverse the whole list of ports for the network. Could we maybe instead use a dict for self.network_ports with mac_pci_slot: port_id pairs as values?\n\nI think it was proposed before?.. I see that Andreas said it would not buy us anything. I don\u0027t think it\u0027s correct: we could get rid of the entry we want to clean up with .pop(mac_pci_slot) which is an operation that is algorithmically less complex than list iteration.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"05deb087827b7a9f24f726a60f82175e76f457c0","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"},{"line_number":271,"context_line":"                    if ports_list \u003d\u003d []:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_36f5a182","line":268,"in_reply_to":"ba63e191_3374d3cd","updated":"2016-01-20 08:58:10.000000000","message":"I guess it\u0027s fair to postpone for sr-iov.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7c8a17d432675429dfc76e91a55f19fc41e10e6a","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"},{"line_number":271,"context_line":"                    if ports_list \u003d\u003d []:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_d974bbfe","line":268,"in_reply_to":"ba63e191_6b515d62","updated":"2016-01-19 09:47:22.000000000","message":"We can refine the implementation later.\n\nGiven that we\u0027re talking about SR-IOV here, I\u0027d say we may expect something around \u003c100 devices. The implementation may fit the purpose, even if not optimal.","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"7ce111b3d6d1406ab432122f117a4dba7e7a2b0a","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"},{"line_number":271,"context_line":"                    if ports_list \u003d\u003d []:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_6b515d62","line":268,"in_reply_to":"da6ed579_32f532ec","updated":"2016-01-18 17:12:46.000000000","message":"I see what you mean. So you\u0027re proposing to replace the current network_ports[network_id] values (which is a list that contains many maps like this: {port_id:port_id, device:mac_pci_slot}) with a {map \u003e mac_pci_slot : port_id}.\n\nWe haven\u0027t thought of this so far....This sounds like a good idea, cause it will save us the second for loop which all other approaches before didn\u0027t. Nice!\n\nMy only concern is, that lb guys implemented it in another way so there will be some work for the modular agent to come to a common approach - but this will not happen with sriov in mitaka anyhow - so I\u0027m fine :)","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3e3246f33ba4acae1fea45015326bc763a46a50f","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def _clean_network_ports(self, mac_pci_slot):"},{"line_number":267,"context_line":"        for netid, ports_list in six.iteritems(self.network_ports):"},{"line_number":268,"context_line":"            for port_data in ports_list:"},{"line_number":269,"context_line":"                if mac_pci_slot \u003d\u003d port_data[\u0027device\u0027]:"},{"line_number":270,"context_line":"                    ports_list.remove(port_data)"},{"line_number":271,"context_line":"                    if ports_list \u003d\u003d []:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_3374d3cd","line":268,"in_reply_to":"da6ed579_32f532ec","updated":"2016-01-20 08:46:58.000000000","message":"Thanks Ihar and Andreas, now I understand what you mean. It\u0027s really a nice way.\nCould we refine it later together with the similar code in LB, as Ajo adviced?","commit_id":"b478b773a6e648416ba5152041aa16d29247ec93"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                [mock_device1_details])"},{"line_number":225,"context_line":"        agent.treat_devices_added_updated("},{"line_number":226,"context_line":"                                    set([\u0027aa:bb:cc:dd:ee:ff\u0027]))"},{"line_number":227,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":228,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":229,"context_line":"        agent.plugin_rpc.get_devices_details_list.return_value \u003d ("},{"line_number":230,"context_line":"                [mock_device2_details])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_0fcdcf5c","line":227,"updated":"2015-12-02 08:47:58.000000000","message":"nit: use (expected, observed)","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                [mock_device1_details])"},{"line_number":225,"context_line":"        agent.treat_devices_added_updated("},{"line_number":226,"context_line":"                                    set([\u0027aa:bb:cc:dd:ee:ff\u0027]))"},{"line_number":227,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":228,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":229,"context_line":"        agent.plugin_rpc.get_devices_details_list.return_value \u003d ("},{"line_number":230,"context_line":"                [mock_device2_details])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_d1cd1232","line":227,"in_reply_to":"9a8ffd7b_0fcdcf5c","updated":"2015-12-02 16:16:22.000000000","message":"Done","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        agent.treat_devices_added_updated("},{"line_number":226,"context_line":"                                    set([\u0027aa:bb:cc:dd:ee:ff\u0027]))"},{"line_number":227,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":228,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":229,"context_line":"        agent.plugin_rpc.get_devices_details_list.return_value \u003d ("},{"line_number":230,"context_line":"                [mock_device2_details])"},{"line_number":231,"context_line":"        # add the second device and check the network_ports dict"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_ea4b9929","line":228,"updated":"2015-12-02 08:47:58.000000000","message":"please think of making the mac_pci_slot_tuples a variable instead of specifying them each time. Should make the code much more readable: \n\n  mac_pci_slot_device1 \u003d (\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)\n  mac_pci_slot_device2 \u003d (\u0027aa:bb:cc:dd:ee:fe\u0027, \u00271:3:3.0\u0027)\n\nand then use it in your asserts...","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        agent.treat_devices_added_updated("},{"line_number":226,"context_line":"                                    set([\u0027aa:bb:cc:dd:ee:ff\u0027]))"},{"line_number":227,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":228,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":229,"context_line":"        agent.plugin_rpc.get_devices_details_list.return_value \u003d ("},{"line_number":230,"context_line":"                [mock_device2_details])"},{"line_number":231,"context_line":"        # add the second device and check the network_ports dict"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_6db24ce7","line":228,"in_reply_to":"9a8ffd7b_ea4b9929","updated":"2015-12-02 16:16:22.000000000","message":"right!","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c7748ca8a70b873231a22a14603d6a1d930828b","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                               \"update_device_down\"):"},{"line_number":239,"context_line":"            agent.treat_devices_removed([(\u0027aa:bb:cc:dd:ee:fe\u0027, \u00271:3:3.0\u0027)])"},{"line_number":240,"context_line":"        # remove the second device and check the network_ports dict"},{"line_number":241,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":242,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_treat_devices_added_updated_admin_state_up_true(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_2f353345","line":241,"updated":"2015-12-02 08:47:58.000000000","message":"nit: use (expected, observed)","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"eba96aa48183989b640c3d0b4955916f55099a68","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                               \"update_device_down\"):"},{"line_number":239,"context_line":"            agent.treat_devices_removed([(\u0027aa:bb:cc:dd:ee:fe\u0027, \u00271:3:3.0\u0027)])"},{"line_number":240,"context_line":"        # remove the second device and check the network_ports dict"},{"line_number":241,"context_line":"        self.assertEqual(agent.network_ports,"},{"line_number":242,"context_line":"                         {\u0027net123\u0027: set([(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3.0\u0027)])})"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_treat_devices_added_updated_admin_state_up_true(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_91ea2a73","line":241,"in_reply_to":"9a8ffd7b_2f353345","updated":"2015-12-02 16:16:22.000000000","message":"Done","commit_id":"d89d878b1a022a32bbdd711962183b98576e89f5"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a8ff7016cd6748fb505b9cbfeec8326c4d974cea","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        self.assertEqual(cleaned_port_id, port_id1)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        self.assertEqual({network_id1: {port_id2: mac_slot_2}},"},{"line_number":348,"context_line":"                        self.agent.network_ports)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"class FakeAgent(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_682b78ec","line":348,"updated":"2015-12-04 09:17:00.000000000","message":"as your production code is removing the network_id key from the network_ports map if no port exists anymore, I would ask you to remove port_2 as well and verify that also the network_id key has been removed.","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"5a339722f8fbad0fd7c01e71746ea1d2173f120a","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        self.assertEqual(cleaned_port_id, port_id1)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        self.assertEqual({network_id1: {port_id2: mac_slot_2}},"},{"line_number":348,"context_line":"                        self.agent.network_ports)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"class FakeAgent(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_57939b4f","line":348,"in_reply_to":"7a740942_682b78ec","updated":"2015-12-04 19:56:15.000000000","message":"Good point! Done","commit_id":"5825539a4fedc5af912b2e1faef8e06f0e8052fb"}]}
