Example #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
Example #2
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
Example #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)
Example #4
0
 def destroy(self, allowed_exit=[0, 1]):
     self.chooseCommandSet()
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
Example #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
Example #6
0
 def timeleft(self, units="hh:mm:ss", force_check=False):
     return ICredential.timeleft(self, units, force_check=force_check)
Example #7
0
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     return ICredential.renew(self, validity, maxTry, minValidity, check)
Example #8
0
 def isValid(self, validity="", log=False, force_check=False):
     return ICredential.isValid(self, validity, log, force_check)
Example #9
0
 def destroy(self, allowed_exit=[0]):
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
Example #10
0
 def timeleft(self, units="hh:mm:ss", force_check=False):
     return ICredential.timeleft(self, units, force_check)
Example #11
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)
Example #12
0
 def destroy(self, allowed_exit=[0, 1]):
     self.chooseCommandSet()
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
Example #13
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
Example #14
0
 def renew(self, validity="", maxTry=0, minValidity="", check=True):
     return ICredential.renew(self, validity, maxTry, minValidity, check)
Example #15
0
 def isValid(self, validity="", log=False, force_check=False):
     return ICredential.isValid(self, validity, log, force_check)
Example #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)
Example #17
0
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.buildOpts(self.command.init)
     return ICredential.create(self, validity, maxTry, minValidity, check)
Example #18
0
 def destroy(self, allowed_exit=[0]):
     self.buildOpts(self.command.destroy)
     return ICredential.destroy(self, allowed_exit)
Example #19
0
 def create(self, validity="", maxTry=0, minValidity="", check=False):
     self.buildOpts(self.command.init)
     return ICredential.create(self, validity, maxTry, minValidity, check)