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