Content-type: text/html Man page of LCG_DEL

LCG_DEL

Section: Library Functions (3)
Updated: $Date: 2009/07/08 15:40:05 $
Index Return to Main Contents

 

NAME

lcg_del - delete one file (either one replica or all replicas)

 

SYNOPSIS

import lcg_util

(int returncode, string errmsg ) lcg_util.lcg_del3 (string file, string defaulttype, string setype, int nobdii, int aflag, string se, string vo, string conf_file, int insecure, int verbose, int timeout)

(int returncode, string errmsg ) lcg_util.lcg_del4 (string file, string defaulttype, string setype, int nobdii, int nolfc, int aflag, string se, string vo, string conf_file, int insecure, int verbose, int timeout)

(int returncode, listOfDict statuses, string errmsg ) lcg_util.lcg_del5 (listOfStrings files, string defaulttype, string setype, int nobdii, int nolfc, int aflag, string se, string vo, string conf_file, int insecure, int verbose, int timeout)

(int returncode, listOfDict statuses, string errmsg ) lcg_util.lcg_del6 (listOfStrings files, string defaulttype, string setype, int nobdii, int nolfc, int aflag, string se, string vo, string conf_file, int insecure, int verbose, int bool_force, int timeout)

(int returncode, listOfDict statuses, string errmsg ) lcg_util.lcg_del7 (listOfStrings files, string defaulttype, string setype, int nobdii, int nolfc, int aflag, string se, string vo, string conf_file, int insecure, int verbose, int bool_force, int bool_rmdir, int timeout)

 

DESCRIPTION

lcg_del deletes one file (either one replica or all replicas). If it was the last or only valid replica, the entries corresponding to this GUID are also removed from the RMC or the LFC.
file
specifies the Logical File Name, the Grid Unique IDentifier or the Site URL. An SURL scheme can be sfn: for a classical SE or srm:.
defaulttype
specifies the default SE type you want to use. But if according to the BDII the default type is not available for this SE, it will use another type. Possible values are:
lcg_util.TYPE_NONE or 'none'
No default type
lcg_util.TYPE_SE or 'se'
Use classic SE endpoints
lcg_util.TYPE_SRM or 'srmv1'
Use SRMv1 endpoints first
lcg_util.TYPE_SRMv2 or 'srmv2'
Use SRMv2 endpoints first
setype
specifies the SE type you want to use for the file. But if according to the BDII the default type is not available for this SE, it will fail. Possible values are:
lcg_util.TYPE_NONE or 'none'
No default type
lcg_util.TYPE_SE or 'se'
Use classic SE endpoints
lcg_util.TYPE_SRM or 'srmv1'
Use SRMv1 endpoints first
lcg_util.TYPE_SRMv2 or 'srmv2'
Use SRMv2 endpoints first
nobdii
If set to a non-zero value, it means that you don't want to make BDII calls to get SE type. So, you must provide the type of the SE for srm: arguments, and full endpoint in SURLs. For SE type, defaulttype can be used.
nolfc
If set to a non-zero value, it means that the SURL is not registered in any LFC server, and so you explicitely ask lcg_del to not connect to the LFC server.
aflag
An attempt is made to delete all replicas for the file specified as a GUID or LFN.
se
Only the replica residing on se is deleted.
vo
specifies the Virtual Organization the user belongs to. If it is not specified, the environment variable LCG_GFAL_VO will be used.
conf_file
This argument is currently ignored.
insecure
This argument is currently ignored. The access to the Replica Catalog or the LFC is done according to the endpoints published in MDSS while the access to the SE is always done in secure mode.
bool_force
if non equals 0, then all errors during file deletion of file unregistration will be ignored. The function will return 0, as if no errors happened. Note that it means that files will be unregistered even if the function wasn't able to remove them, so it may create some inconsistencies!
bool_rmdir
if non equals 0, then it means that the user want to delete (empty) directory. Note that it is possible to delete only one directory at a time.
timeout
specifies the value of timeout (default 0). verbose Verbose level. Here are the possible levels:
0
Only critical errors are put into errmsg.
1
Warnings are displayed on stderr as well as critical errors.
2
Debug information is displayed as well as warnings and critical errors.
statuses
List of dictionaries. Here are the fields:
file
the file name (string)
status
the status of the file, which is a value of errno (integer)
explanation
an explanation of this status - not filled up in all cases (string)
errmsg
Detailed error message.

 

NOTE

The environment variable LCG_GFAL_INFOSYS must point to the BDII, unless nobdii is set to a non-zero value. To use the RLS as catalog instead of the LFC, the environment variable LCG_CATALOG_TYPE must explicitely be set to "edg". By default, it is set to "lfc".

 

RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, errno is set appropriately.

 

ERRORS

ENOENT
The named file does not exist.
EACCES
Permission denied.
EFAULT
file or vo is an invalid pointer.
ECOMM
Communication error.
ENAMETOOLONG
vo is too long.
EPROTONOSUPPORT
Access method not supported.

 

SEE ALSO

lcg_aa_python(3), lcg_cp_python(3), lcg_cr_python(3), lcg_del_python(3), lcg_gt_python(3), lcg_la_python(3), lcg_lg_python(3), lcg_lr_python(3), lcg_ra_python(3), lcg_rep_python(3), lcg_rf_python(3), lcg_sd_python(3), lcg_stmd_python(3), lcg_uf_python(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
NOTE
RETURN VALUE
ERRORS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:16:52 GMT, July 14, 2009