def delete_network(self, name, tenant_id, subnet_id, net_id):
        """Delete the openstack subnet and network. """
        try:
            self.neutronclient.delete_subnet(subnet_id)
        except Exception as exc:
            LOG.error("Failed to delete subnet %(sub)s exc %(exc)s",
                      {'sub': subnet_id, 'exc': str(exc)})
            return
        try:
            self.neutronclient.delete_network(net_id)
        except Exception as exc:
            LOG.error("Failed to delete network %(name)s exc %(exc)s",
                      {'name': name, 'exc': str(exc)})
def delete_network ( self , name , tenant_id , subnet_id , net_id ) : try : self . neutronclient . delete_subnet ( subnet_id ) except Exception as exc : LOG . error ( "Failed to delete subnet %(sub)s exc %(exc)s" , { 'sub' : subnet_id , 'exc' : str ( exc ) } ) return try : self . neutronclient . delete_network ( net_id ) except Exception as exc : LOG . error ( "Failed to delete network %(name)s exc %(exc)s" , { 'name' : name , 'exc' : str ( exc ) } )
Delete the openstack subnet and network.