def network_delete_event(self, network_info):
net_id = network_info['<STR_LIT>']<EOL>if net_id not in self.network:<EOL><INDENT>LOG.error('<STR_LIT>',<EOL>net_id)<EOL>return<EOL><DEDENT>segid = self.network[net_id].get('<STR_LIT>')<EOL>tenant_id = self.network[net_id].get('<STR_LIT>')<EOL>tenant_name = self.get_project_name(tenant_id)<EOL>net = utils.Dict2Obj(self.network[net_id])<EOL>if not tenant_name:<EOL><INDENT>LOG.error('<STR_LIT>',<EOL>{'<STR_LIT>': tenant_id})<EOL>self.update_network_db(net.id, constants.DELETE_FAIL)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>self.dcnm_client.delete_network(tenant_name, net)<EOL>self.seg_drvr.release_segmentation_id(segid)<EOL>self.delete_network_db(net_id)<EOL>del self.network[net_id]<EOL>snets = [k for k in self.subnet if (<EOL>self.subnet[k].get('<STR_LIT>') == net_id)]<EOL>[self.subnet.pop(s) for s in snets]<EOL><DEDENT>except dexc.DfaClientRequestFailed:<EOL><INDENT>LOG.error('<STR_LIT>',<EOL>{'<STR_LIT>': net.name})<EOL>self.update_network_db(net_id, constants.DELETE_FAIL)<EOL><DEDENT>instances = self.get_vms()<EOL>instances_related = [k for k in instances if k.network_id == net_id]<EOL>for vm in instances_related:<EOL><INDENT>LOG.debug("<STR_LIT>", vm.name)<EOL>self.delete_vm_function(vm.port_id, vm)<EOL><DEDENT>self.network_del_notif(tenant_id, tenant_name, net_id)<EOL>
Process network delete event.