)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"17c10b86514dbd531810e7c26929bd3b9563e83b","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"        # Delete the VirtualInterface for the given port_id."},{"line_number":1221,"context_line":"        vif \u003d objects.VirtualInterface.get_by_uuid(context, port_id)"},{"line_number":1222,"context_line":"        if vif:"},{"line_number":1223,"context_line":"            if vif.obj_attr_is_set(\u0027tag\u0027) and vif.tag:"},{"line_number":1224,"context_line":"                self._delete_nic_metadata(self, instance, vif)"},{"line_number":1225,"context_line":"            vif.destroy()"},{"line_number":1226,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a30ddce_b099507b","line":1223,"range":{"start_line":1223,"start_character":12,"end_line":1223,"end_character":54},"updated":"2017-03-13 13:03:07.000000000","message":"nit: I wonder if we could/should do this in the \u0027_delete_nic_metadata\u0027 function?","commit_id":"8fefa64e3c4544f130740ec06b6ffad0ba1cab86"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"2202c3a499aea23adf86c6ad1d42c0839e746073","unresolved":false,"context_lines":[{"line_number":1220,"context_line":"        # Delete the VirtualInterface for the given port_id."},{"line_number":1221,"context_line":"        vif \u003d objects.VirtualInterface.get_by_uuid(context, port_id)"},{"line_number":1222,"context_line":"        if vif:"},{"line_number":1223,"context_line":"            if vif.obj_attr_is_set(\u0027tag\u0027) and vif.tag:"},{"line_number":1224,"context_line":"                self._delete_nic_metadata(self, instance, vif)"},{"line_number":1225,"context_line":"            vif.destroy()"},{"line_number":1226,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a1ff146_65d6fdc6","line":1223,"range":{"start_line":1223,"start_character":12,"end_line":1223,"end_character":54},"in_reply_to":"9a30ddce_b099507b","updated":"2017-03-15 10:53:08.000000000","message":"Same pattern as for disks [1]. I don\u0027t care where we stick the if, but we should be consistent. I added the \u0027break\u0027 in _delete_nic_metadata though ;)\n\n[1] https://review.openstack.org/#/c/435082/9/nova/compute/manager.py","commit_id":"8fefa64e3c4544f130740ec06b6ffad0ba1cab86"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc33ad946344254c3d4d73f5d2bd5086b669bdd2","unresolved":false,"context_lines":[{"line_number":1224,"context_line":"        # Delete the VirtualInterface for the given port_id."},{"line_number":1225,"context_line":"        vif \u003d objects.VirtualInterface.get_by_uuid(context, port_id)"},{"line_number":1226,"context_line":"        if vif:"},{"line_number":1227,"context_line":"            if vif.obj_attr_is_set(\u0027tag\u0027) and vif.tag:"},{"line_number":1228,"context_line":"                self._delete_nic_metadata(self, instance, vif)"},{"line_number":1229,"context_line":"            vif.destroy()"},{"line_number":1230,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":46,"id":"5f201791_cb1ba77e","line":1227,"range":{"start_line":1227,"start_character":15,"end_line":1227,"end_character":41},"updated":"2017-06-27 06:15:55.000000000","message":"\"if \u0027tag\u0027 in vif\" would be prettier.","commit_id":"d8390e722e46d53e7aaeff71f697a790a12f2c82"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"1cd4256c1dee31c84b0e085e6c9cad614067c67c","unresolved":false,"context_lines":[{"line_number":1224,"context_line":"        # Delete the VirtualInterface for the given port_id."},{"line_number":1225,"context_line":"        vif \u003d objects.VirtualInterface.get_by_uuid(context, port_id)"},{"line_number":1226,"context_line":"        if vif:"},{"line_number":1227,"context_line":"            if vif.obj_attr_is_set(\u0027tag\u0027) and vif.tag:"},{"line_number":1228,"context_line":"                self._delete_nic_metadata(self, instance, vif)"},{"line_number":1229,"context_line":"            vif.destroy()"},{"line_number":1230,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":46,"id":"5f201791_8ce4a5e1","line":1227,"range":{"start_line":1227,"start_character":15,"end_line":1227,"end_character":41},"in_reply_to":"5f201791_cb1ba77e","updated":"2017-06-27 07:46:01.000000000","message":"Done","commit_id":"d8390e722e46d53e7aaeff71f697a790a12f2c82"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b43cf3a5ff01c3dc07391bf2f6a3b737e9b09122","unresolved":false,"context_lines":[{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        return self.get_instance_nw_info(context, instance)"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def _delete_nic_metadata(self, instance, vif):"},{"line_number":1237,"context_line":"        for device in instance.device_metadata.devices:"},{"line_number":1238,"context_line":"            if (isinstance(device, objects.NetworkInterfaceMetadata)"},{"line_number":1239,"context_line":"                    and device.mac \u003d\u003d vif.address):"},{"line_number":1240,"context_line":"                instance.device_metadata.devices.remove(device)"},{"line_number":1241,"context_line":"                instance.save()"},{"line_number":1242,"context_line":"                break"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"    def list_ports(self, context, **search_opts):"},{"line_number":1245,"context_line":"        \"\"\"List ports for the client based on search options.\"\"\""}],"source_content_type":"text/x-python","patch_set":48,"id":"5f201791_94cdcb32","line":1242,"range":{"start_line":1236,"start_character":4,"end_line":1242,"end_character":21},"updated":"2017-06-27 10:03:21.000000000","message":"Emm....I feel this is something should be done in the nova/compute/manager.py.","commit_id":"4289d86b32ba438d09f886b163a6e174b006bd88"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e0ab838e78d5bf33f0b95634a8fb9892f16196e8","unresolved":false,"context_lines":[{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        return self.get_instance_nw_info(context, instance)"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def _delete_nic_metadata(self, instance, vif):"},{"line_number":1237,"context_line":"        for device in instance.device_metadata.devices:"},{"line_number":1238,"context_line":"            if (isinstance(device, objects.NetworkInterfaceMetadata)"},{"line_number":1239,"context_line":"                    and device.mac \u003d\u003d vif.address):"},{"line_number":1240,"context_line":"                instance.device_metadata.devices.remove(device)"},{"line_number":1241,"context_line":"                instance.save()"},{"line_number":1242,"context_line":"                break"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"    def list_ports(self, context, **search_opts):"},{"line_number":1245,"context_line":"        \"\"\"List ports for the client based on search options.\"\"\""}],"source_content_type":"text/x-python","patch_set":48,"id":"5f201791_816222d7","line":1242,"range":{"start_line":1236,"start_character":4,"end_line":1242,"end_character":21},"in_reply_to":"5f201791_2f3d7ec3","updated":"2017-06-27 13:07:05.000000000","message":"I think this is probably OK. We tag the vif in allocate_for_instance when the server is created and when attaching a tagged vif.\n\nAlex had me worried that we needed to handle this in the compute manager because of nova-network, which we do support in 2.32 for creating a server with tagged nics, but for this new microversion we only allow attach/detach with tagged nics using the os-interface API which is only implemented for neutron, so I think it\u0027s OK to just do the device metadata cleanup in the same code that already handles deleting the vif for the neutron case.","commit_id":"4289d86b32ba438d09f886b163a6e174b006bd88"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"aa61d55619b6bc6838190268249532e61cec298e","unresolved":false,"context_lines":[{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"        return self.get_instance_nw_info(context, instance)"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def _delete_nic_metadata(self, instance, vif):"},{"line_number":1237,"context_line":"        for device in instance.device_metadata.devices:"},{"line_number":1238,"context_line":"            if (isinstance(device, objects.NetworkInterfaceMetadata)"},{"line_number":1239,"context_line":"                    and device.mac \u003d\u003d vif.address):"},{"line_number":1240,"context_line":"                instance.device_metadata.devices.remove(device)"},{"line_number":1241,"context_line":"                instance.save()"},{"line_number":1242,"context_line":"                break"},{"line_number":1243,"context_line":""},{"line_number":1244,"context_line":"    def list_ports(self, context, **search_opts):"},{"line_number":1245,"context_line":"        \"\"\"List ports for the client based on search options.\"\"\""}],"source_content_type":"text/x-python","patch_set":48,"id":"5f201791_2f3d7ec3","line":1242,"range":{"start_line":1236,"start_character":4,"end_line":1242,"end_character":21},"in_reply_to":"5f201791_94cdcb32","updated":"2017-06-27 10:11:25.000000000","message":"IIUC neutronv2/api.py is the network equivalent of compute/manager.py. Also, _delete_nic_metadata has to be called from deallocate_port_for_instance. I feel like we\u0027d be adding hoops for ourselves to jump through if we move this to compute manager.","commit_id":"4289d86b32ba438d09f886b163a6e174b006bd88"}]}
