ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/cmscp.py
(Generate patch)

Comparing COMP/CRAB/python/cmscp.py (file contents):
Revision 1.5 by mcinquil, Sat Sep 27 11:00:08 2008 UTC vs.
Revision 1.6 by spiga, Sun Sep 28 21:17:05 2008 UTC

# Line 34 | Line 34 | class cmscp:
34          self.protocol = ''
35          self.middleware = ''
36          self.srmv = ''
37 +
38 +        # default for stage out approach To be used with "middleware"
39          self.lcgOpt='-b -D srmv2 --vo cms -t 2400 --verbose'  
40 +        self.srmOpt='-debug=true -report ./srmcp.report -retry_timeout 480000 -retry_num 3'
41 +        self.rfioOpt=''
42 +        # default to be used with protocol
43          self.opt=''
44 +
45          try:
46              opts, args = getopt.getopt(argv, "", ["source=", "destination=", "inputFileList=", "outputFileList=", \
47                                                    "protocol=", "middleware=", "srm_version=", "debug", "help"])
# Line 119 | Line 125 | class cmscp:
125          which depend on scheduler
126          """
127          if self.middleware.lower() in ['osg','lcg']:
128 <            supported_protocol = {'srm-lcg': self.lcgOpt }#,
129 <                               #   'srmv2' : '' }
128 >            supported_protocol = ['srm-lcg','srmv2']
129 >            self.OptMap = {'srm-lcg': self.lcgOpt,
130 >                           'srmv2': self.srmOpt }
131          elif self.middleware.lower() in ['lsf','caf']:
132 <            supported_protocol = {'rfio': '' }
132 >            supported_protocol = ['rfio']
133 >            self.OptMap = {'rfio': self.rfioOpt }
134          else:
135              ## here we can add support for any kind of protocol,
136              ## maybe some local schedulers need something dedicated
# Line 136 | Line 144 | class cmscp:
144          protocols = self.setProtocol()  
145          count=0
146          list_files = self.file_to_copy
147 <        results={}  
148 <        for prot in protocols.keys():
147 >        results={}
148 >        for prot in protocols:
149              if self.debug: print 'Trying stage out with %s utils \n'%prot
150 <            copy_results = self.copy( list_files, prot, protocols[prot] )
150 >            copy_results = self.copy( list_files, prot, self.OptMap[prot] )
151              list_retry = []
152              list_existing = []
153              list_ok = []

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines