def delete_network_subname(self, sub_name):
try:<EOL><INDENT>body = {}<EOL>net_list = self.neutronclient.list_networks(body=body)<EOL>for net in net_list:<EOL><INDENT>if net.get('<STR_LIT:name>').find(sub_name) != -<NUM_LIT:1>:<EOL><INDENT>self.delete_network_all_subnets(net.get('<STR_LIT>'))<EOL><DEDENT><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT:name>': sub_name, '<STR_LIT>': str(exc)})<EOL><DEDENT>
Delete the network by part of its name, use with caution.