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.45 by spiga, Fri Mar 6 16:48:09 2009 UTC vs.
Revision 1.46 by spiga, Sun Mar 8 10:09:44 2009 UTC

# Line 10 | Line 10 | class cmscp:
10      def __init__(self, args):
11          """
12          cmscp
13 <
14 <        safe copy of local file in current directory to remote SE via lcg_cp/srmcp,
13 >        safe copy of local file  to/from remote SE via lcg_cp/srmcp,
14          including success checking  version also for CAF using rfcp command to copy the output to SE
15          input:
16             $1 middleware (CAF, LSF, LCG, OSG)
# Line 30 | Line 29 | class cmscp:
29          self.params = {"source":'', "destination":'','destinationDir':'', "inputFileList":'', "outputFileList":'', \
30                             "protocol":'', "option":'', "middleware":'', "srm_version":'srmv2', "lfn":'' }
31          self.debug = 0
32 <
32 >        self.local_stage = 0
33          self.params.update( args )
34  
35          return
# Line 61 | Line 60 | class cmscp:
60                  file_to_copy.append(self.params['inputFileList'])
61              self.params['inputFileList'] = file_to_copy
62  
63 <        
65 <        if not self.params['lfn'] : HelpOptions()
63 >        if not self.params['lfn'] and self.local_stage == 1 : HelpOptions()
64          
65          ## TO DO:
66          #### add check for outFiles
# Line 257 | Line 255 | class cmscp:
255                  
256          if self.local_stage:
257              if len(list_retry):
258 <                results = self.LocaCopy(list_retry, results)
258 >                results = self.LocalCopy(list_retry, results)
259              
260          if self.debug:
261              print "\t results %s \n"%results
# Line 600 | Line 598 | class cmscp:
598   def usage():
599  
600      msg="""
601 <    required parameters:
602 <    --source        :: REMOTE           :
603 <    --destination   :: REMOTE           :
606 <    --debug             :
607 <    --inFile :: absPath : or name NOT RELATIVE PATH
608 <    --outFIle :: onlyNAME : NOT YET SUPPORTED
601 >    cmscp:
602 >        safe copy of local file  to/from remote SE via lcg_cp/srmcp,
603 >        including success checking  version also for CAF using rfcp command to copy the output to SE
604  
605 <    optional parameters
605 >    accepted parameters:
606 >       source           =
607 >       destination      =
608 >       inputFileList    =
609 >       outputFileList   =
610 >       protocol         =
611 >       option           =
612 >       middleware       =  
613 >       srm_version      =
614 >       destinationDir   =
615 >       lfn=             =
616 >       local_stage      =  activate stage fall back  
617 >       debug            =  activate verbose print out
618 >       help             =  print on line man and exit  
619 >    
620 >    mandatory:
621 >       * "source" and/or "destination" must always be defined
622 >       * either "middleware" or "protocol" must always be defined
623 >       * "inputFileList" must always be defined
624 >       * if "local_stage" = 1 also  "lfn" must be defined
625      """
626      print msg
627  
# Line 636 | Line 650 | if __name__ == '__main__' :
650  
651      allowedOpt = ["source=", "destination=", "inputFileList=", "outputFileList=", \
652                    "protocol=","option=", "middleware=", "srm_version=", \
653 <                  "destinationDir=","debug", "help", "lfn="]
653 >                  "destinationDir=", "lfn=", "local_stage", "debug", "help"]
654      try:
655          opts, args = getopt.getopt( sys.argv[1:], "", allowedOpt )
656      except getopt.GetoptError, err:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines