Content-type: text/html
Man page of LCG_CR
LCG_CR
Section: Library Functions (3)
Updated: $Date: 2008/12/18 18:04:43 $
Index
Return to Main Contents
NAME
lcg_cr - copy and register a file
SYNOPSIS
import lcg_util
(int returncode,
string actual_guid,
string errmsg
) lcg_cr3 (string src_file,
string dest_file,
string guid,
string lfn,
string defaulttype,
string setype,
int nobdii,
string vo,
string relative_path,
int nbstreams,
string conf_file,
int insecure,
int verbose,
int timeout,
string spacetokendesc)
DESCRIPTION
lcg_cr
copies a file to a Storage Element and registers the file in the Replica Catalog or the LFC.
- src_file
-
specifies the source file name: the protocol can be
file:
or
gsiftp:.
- dest_file
-
specifies the destination.
It can be the Storage Element fully qualified hostname or an SURL. In the latter
case, the scheme can be
sfn:
for a classical SE or
srm:.
If only the fully qualified hostname is given, a filename is generated
in the same format as with the Replica Manager.
- guid
-
specifies the Grid Unique IDentifier. If NULL, a GUID is generated internally.
- lfn
-
specifies the Logical File Name associated with the file. If not NULL, an
entry is added to the Replica Metadata Catalog or the LFC.
- relative_path
-
specifies the path relative to the SARoot for the given VO.
- nbstreams
-
specifies the number of parallel streams (default 1).
- timeout
-
specifies the value of timeout (default 0).
- 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 destination 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.
- 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 MDS while the copy is always done in secure mode.
- actual_guid
-
specifies a buffer (minimum 37 bytes) to receive the actual guid.
This pointer can be NULL. In that case the actual guid is not returned.
- spacetokendesc
-
specifies the space token to use with
dest_file.
Can be
NULL.
- 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.
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
-
src_file,
dest_file
or
vo
is an invalid pointer.
- EINVAL
-
src_file
or
dest_file
has an invalid syntax or
guid
is invalid.
- 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