예제 #1
0
    def isValid(self, validity="", log=False, force_check=False):

        # Do parent check
        if not ICredential.isValid(self, validity, log, force_check):
            return False

        # check vo names
        if self.voname() != self.voms:
            if log:
                logger.warning("Grid Proxy not valid. Certificate VO '%s' does not match requested '%s'"
                               % (self.voname(), self.voms))
            return False

        return True
예제 #2
0
파일: GridProxy.py 프로젝트: pseyfert/ganga
    def isValid(self, validity="", log=False, force_check=False):

        # Do parent check
        if not ICredential.isValid(self, validity, log, force_check):
            return False

        # check vo names
        if self.voname() != self.voms:
            if log:
                logger.warning("Grid Proxy not valid. Certificate VO '%s' does not match requested '%s'"
                               % (self.voname(), self.voms))
            return False

        return True
예제 #3
0
    def __init__(self):
        self.active = True
        self.credential = ICredential()  # FIXME: or the real one
        #import Ganga.Core.FileWorkspace
        #basedir = Ganga.Core.FileWorkspace.gettop()
        #basedir = '/tmp'
        basedir = '.'
        self.gridmap_filename = '%s/lcg_simulator_gridmap' % basedir
        import shelve
        # map Grid job id into inputdir (where JDL file is)
        self.jobid_map = shelve.open(self.gridmap_filename, writeback=False)
        self.jobid_map.setdefault('_job_count', 0)

        # here we store the job finish times as seen by ganga
        self.finished_jobs_filename = '%s/lcg_simulator_finished_jobs' % basedir
        self.ganga_finish_time = shelve.open(self.finished_jobs_filename,
                                             writeback=False)

        self.shell = getShell('GLITE')

        logger.critical('Grid Simulator data files: %s %s',
                        self.gridmap_filename, self.finished_jobs_filename)
예제 #4
0
 def destroy(self, allowed_exit=[0, 1]):
     self.chooseCommandSet()
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
예제 #5
0
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.chooseCommandSet()
     self.buildOpts(self.command.init)
     status = ICredential.create(self, validity, maxTry, minValidity, check)
     return status
예제 #6
0
 def timeleft(self, units="hh:mm:ss", force_check=False):
     return ICredential.timeleft(self, units, force_check=force_check)
예제 #7
0
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     return ICredential.renew(self, validity, maxTry, minValidity, check)
예제 #8
0
 def isValid(self, validity="", log=False, force_check=False):
     return ICredential.isValid(self, validity, log, force_check)
예제 #9
0
파일: AfsToken.py 프로젝트: MannyMoo/ganga
 def destroy(self, allowed_exit=[0]):
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
예제 #10
0
 def timeleft(self, units="hh:mm:ss", force_check=False):
     return ICredential.timeleft(self, units, force_check)
예제 #11
0
파일: GridProxy.py 프로젝트: pseyfert/ganga
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     self.chooseCommandSet()
     if self.voms:
         if not self.voname():
             check = False
     return ICredential.renew(self, validity, maxTry, minValidity, check)
예제 #12
0
파일: GridProxy.py 프로젝트: pseyfert/ganga
 def destroy(self, allowed_exit=[0, 1]):
     self.chooseCommandSet()
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
예제 #13
0
파일: GridProxy.py 프로젝트: pseyfert/ganga
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.chooseCommandSet()
     self.buildOpts(self.command.init)
     status = ICredential.create(self, validity, maxTry, minValidity, check)
     return status
예제 #14
0
파일: AfsToken.py 프로젝트: MannyMoo/ganga
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     return ICredential.renew(self, validity, maxTry, minValidity, check)
예제 #15
0
파일: AfsToken.py 프로젝트: MannyMoo/ganga
 def isValid(self, validity="", log=False, force_check=False):
     return ICredential.isValid(self, validity, log, force_check)
예제 #16
0
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     self.chooseCommandSet()
     if self.voms:
         if not self.voname():
             check = False
     return ICredential.renew(self, validity, maxTry, minValidity, check)
예제 #17
0
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.buildOpts(self.command.init)
     return ICredential.create(self, validity, maxTry, minValidity, check)
예제 #18
0
 def destroy(self, allowed_exit=[0]):
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
예제 #19
0
파일: AfsToken.py 프로젝트: MannyMoo/ganga
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.buildOpts(self.command.init)
     return ICredential.create(self, validity, maxTry, minValidity, check)