Example #1
0
    def __init__(self, config):
        WebAPI.__init__(self, config)
        # Take a guess
        self.templatedir = config.templates
        self.fields = ['RequestName', 'Group', 'Requestor', 'RequestType',
                       'ReqMgrRequestBasePriority', 'RequestStatus', 'Complete', 'Success']
        self.calculatedFields = {'Written': 'percentWritten', 'Merged':'percentMerged',
                                 'Complete':'percentComplete', 'Success' : 'percentSuccess'}
        # entries in the table that show up as HTML links for that entry
        self.linkedFields = {'Group': '../admin/group', 
                             'Requestor': '../admin/user', 
                             'RequestName': 'details'}
        self.detailsFields = ['RequestName', 'RequestType', 'Requestor', 'CMSSWVersion',
            'ScramArch', 'GlobalTag', 'RequestNumEvents',
            'InputDataset', 'PrimaryDataset', 'AcquisitionEra', 'ProcessingVersion', 
            'RunWhitelist', 'RunBlacklist', 'BlockWhitelist', 'BlockBlacklist', 
            'RequestWorkflow', 'Scenario', 'Campaign', 'PrimaryDataset',
            'Acquisition Era', 'Processing Version', 'Merged LFN Base', 'Unmerged LFN Base',
            'Site Whitelist', 'Site Blacklist']

        self.adminMode = True
        # don't allow mass editing.  Make people click one at a time.
        #self.adminFields = {'RequestStatus':'statusMenu', 'ReqMgrRequestBasePriority':'Utilities.priorityMenu'}
        self.adminFields = {}
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.yuiroot = config.yuiroot
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'), config.wmstatDBName)
        cherrypy.engine.subscribe('start_thread', self.initThread)
Example #2
0
    def __init__(self, config, noSiteDB=False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.workloadDBName = config.workloadDBName
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip("/"), config.wmstatDBName)
        if not noSiteDB:
            try:
                # Download a list of all the sites from SiteDB, uses v2 API.
                sitedb = SiteDBJSON()
                self.sites = sitedb.getAllCMSNames()
                self.sites.sort()
            except Exception, ex:
                msg = "ERROR: Could not retrieve sites from SiteDB, reason: %s" % ex
                cherrypy.log(msg)
                raise
Example #3
0
    def __init__(self, config):
        WebAPI.__init__(self, config)
        # Take a guess
        self.templatedir = config.templates
        self.fields = ['RequestName', 'Group', 'Requestor', 'RequestType',
                       "RequestPriority", 'RequestStatus', 'Complete', 'Success']
        self.calculatedFields = {'Written': 'percentWritten', 'Merged':'percentMerged',
                                 'Complete':'percentComplete', 'Success' : 'percentSuccess'}
        # entries in the table that show up as HTML links for that entry
        self.linkedFields = {'Group': '../admin/group',
                             'Requestor': '../admin/user',
                             'RequestName': 'details'}
        self.detailsFields = ['RequestName', 'RequestType', 'Requestor', 'CMSSWVersion',
            'ScramArch', 'GlobalTag', 'RequestNumEvents',
            'InputDataset', 'PrimaryDataset', 'AcquisitionEra', 'ProcessingVersion',
            'RunWhitelist', 'RunBlacklist', 'BlockWhitelist', 'BlockBlacklist',
            'RequestWorkflow', 'Scenario', 'Campaign', 'PrimaryDataset',
            'Acquisition Era', 'Processing Version', 'Merged LFN Base', 'Unmerged LFN Base',
            'Site Whitelist', 'Site Blacklist']

        self.adminMode = True
        self.adminFields = {}
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.workloadDBName = config.workloadDBName
        self.yuiroot = config.yuiroot
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'), config.wmstatDBName)
        self.acdcURL = "%s/%s" % (self.couchUrl.rstrip('/'), config.acdcDBName)
        cherrypy.engine.subscribe('start_thread', self.initThread)
Example #4
0
    def __init__(self, config, noSiteDB=False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.workloadDBName = config.workloadDBName
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'),
                                         config.wmstatDBName)
        if not noSiteDB:
            try:
                # Download a list of all the sites from SiteDB, uses v2 API.
                sitedb = SiteDBJSON()
                self.sites = sitedb.getAllCMSNames()
                self.sites.sort()
            except Exception, ex:
                msg = "ERROR: Could not retrieve sites from SiteDB, reason: %s" % ex
                cherrypy.log(msg)
                raise
Example #5
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     # Take a guess
     self.templatedir = config.templates
     self.yuiroot = config.yuiroot
     self.searchFields = ["RequestName", "RequestType"]
     cherrypy.engine.subscribe('start_thread', self.initThread)
Example #6
0
    def __init__(self, config):
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.clipboardDB = config.clipboardDB
        cleanUrl = Utilities.removePasswordFromUrl(self.couchUrl)
        self.clipboardUrl = "%s/%s/_design/OpsClipboard/index.html" % (cleanUrl, self.clipboardDB)
        self.hold = config.hold
        self.configDBName = config.configDBName
        self.sites = Utilities.sites(config.sitedb)
        self.allMergedLFNBases =  [
            "/store/backfill/1", "/store/backfill/2", 
            "/store/data",  "/store/mc"]
        self.allUnmergedLFNBases = ["/store/unmerged", "/store/temp"]

        self.mergedLFNBases = {
             "ReReco" : ["/store/backfill/1", "/store/backfill/2", "/store/data"],
             "DataProcessing" : ["/store/backfill/1", "/store/backfill/2", "/store/data"],
             "ReDigi" : ["/store/backfill/1", "/store/backfill/2", "/store/data", "/store/mc"],
             "MonteCarlo" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"],
             "RelValMC" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"],
             "Resubmission" : ["/store/backfill/1", "/store/backfill/2", "/store/mc", "/store/data"],
             "MonteCarloFromGEN" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"]}

        self.yuiroot = config.yuiroot
        cherrypy.engine.subscribe('start_thread', self.initThread)
 def __init__(self, config):
     WebAPI.__init__(self, config)
     # Take a guess
     self.templatedir = config.templates
     self.yuiroot = config.yuiroot
     self.searchFields = ["RequestName", "RequestType"]
     cherrypy.engine.subscribe('start_thread', self.initThread)
Example #8
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     self.templatedir = config.templates
     self.requestor = config.requestor
     self.cmsswVersion = config.cmsswDefaultVersion
     self.couchUrl = config.couchUrl
     self.componentDir = config.componentDir
     self.configDBName = config.configDBName
     self.workloadDBName = config.workloadDBName
     self.defaultSkimConfig = "http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Configuration/DataOps/python/prescaleskimmer.py?revision=1.1"    
     self.yuiroot = config.yuiroot
     cherrypy.engine.subscribe('start_thread', self.initThread)
Example #9
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     self.templatedir = config.templates
     self.requestor = config.requestor
     self.cmsswVersion = config.cmsswDefaultVersion
     self.defaultArch = getattr(config, "defaultScramArch", "slc5_amd64_gcc434")
     self.couchUrl = config.couchUrl
     self.componentDir = config.componentDir
     self.configDBName = config.configDBName
     self.workloadDBName = config.workloadDBName
     self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip("/"), config.wmstatDBName)
     self.defaultSkimConfig = "http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Configuration/DataOps/python/prescaleskimmer.py?revision=1.1"
     self.yuiroot = config.yuiroot
     cherrypy.engine.subscribe("start_thread", self.initThread)
     self.scramArchs = []
Example #10
0
    def __init__(self, config = {}):

        self._set_formatter(config)

        self._set_model(config)

        self.__doc__ = self.model.__doc__

        WebAPI.__init__(self, config)
        self.methods.update({'handler':{'args':[],
                                 'call':self.model.handler,
                                 'version': 1}})

        # TODO: implement HEAD & TRACE
        self.supporttypes = self.formatter.supporttypes.keys()
Example #11
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     self.templatedir = config.templates
     self.requestor = config.requestor
     self.cmsswVersion = config.cmsswDefaultVersion
     self.defaultArch = getattr(config, 'defaultScramArch',
                                "slc6_amd64_gcc493")
     self.couchUrl = config.couchUrl
     self.componentDir = config.componentDir
     self.configDBName = config.configDBName
     self.workloadDBName = config.workloadDBName
     self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'),
                                      config.wmstatDBName)
     self.defaultSkimConfig = "http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Configuration/DataOps/python/prescaleskimmer.py?revision=1.1"
     self.yuiroot = config.yuiroot
     cherrypy.engine.subscribe('start_thread', self.initThread)
     self.scramArchs = []
Example #12
0
    def __init__(self, config, noSiteDB = False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.clipboardDB = config.clipboardDB
        cleanUrl = Utilities.removePasswordFromUrl(self.couchUrl)
        self.clipboardUrl = "%s/%s/_design/OpsClipboard/index.html" % (cleanUrl, self.clipboardDB)
        self.opshold = config.opshold
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'), config.wmstatDBName)
        if not noSiteDB:
            self.sites = Utilities.sites(config.sitedb)
        else:
            self.sites = []
        self.allMergedLFNBases =  [
            "/store/backfill/1", "/store/backfill/2", 
            "/store/data",  "/store/mc", "/store/generator", "/store/relval"]
        self.allUnmergedLFNBases = ["/store/unmerged", "/store/temp"]

        self.mergedLFNBases = {
             "ReReco" : ["/store/backfill/1", "/store/backfill/2", "/store/data"],
             "DataProcessing" : ["/store/backfill/1", "/store/backfill/2", "/store/data"],
             "ReDigi" : ["/store/backfill/1", "/store/backfill/2", "/store/data", "/store/mc"],
             "MonteCarlo" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"],
             "RelValMC" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"],
             "Resubmission" : ["/store/backfill/1", "/store/backfill/2", "/store/mc", "/store/data"],
             "MonteCarloFromGEN" : ["/store/backfill/1", "/store/backfill/2", "/store/mc"],
             "TaskChain": ["/store/backfill/1", "/store/backfill/2", "/store/mc", "/store/data", "/store/relval"],
             "LHEStepZero": ["/store/backfill/1", "/store/backfill/2", "/store/generator"]}

        self.yuiroot = config.yuiroot
        cherrypy.engine.subscribe('start_thread', self.initThread)

        self.wildcardKeys = getattr(config, 'wildcardKeys', {'T1*': 'T1_*',
                                                             'T2*': 'T2_*',
                                                             'T3*': 'T3_*'})
        self.wildcardSites = {}
        Utilities.addSiteWildcards(self.wildcardKeys, self.sites, self.wildcardSites)
Example #13
0
    def __init__(self, config={}):

        self._set_formatter(config)

        self._set_model(config)

        self.__doc__ = self.model.__doc__

        WebAPI.__init__(self, config)
        self.methods.update({
            'handler': {
                'args': [],
                'call': self.model.handler,
                'version': 1
            }
        })

        # TODO: implement HEAD & TRACE
        self.supporttypes = self.formatter.supporttypes.keys()
Example #14
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     # Take a guess
     self.templatedir = config.templates
     self.htmldir  = config.html
     cherrypy.engine.subscribe('start_thread', self.initThread)
Example #15
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     self.methods = {}
     self.daofactory = False
     # If not set expire data after 5 mins
     self.defaultExpires = config.default_expires
Example #16
0
 def __init__(self, config):
     WebAPI.__init__(self, config)
     self.methods = {}
     self.daofactory = False
     # If not set expire data after 5 mins
     self.defaultExpires = config.default_expires
Example #17
0
    def __init__(self, config, noSiteDB=False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.workloadDBName = config.workloadDBName
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'), config.wmstatDBName)
        if not noSiteDB:
            try:
                # Download a list of all the sites from SiteDB, uses v2 API.
                sitedb = SiteDBJSON()
                self.sites = sitedb.getAllCMSNames()
                self.sites.sort()
                self.phedexNodes = sitedb.getAllPhEDExNodeNames(excludeBuffer=True)
                self.phedexNodes.sort()
            except Exception as ex:
                msg = "ERROR: Could not retrieve sites from SiteDB, reason: %s" % ex
                cherrypy.log(msg)
                raise
        else:
            self.sites = []

        # store result lfn base with all Physics group
        storeResultLFNBase = ["/store/results/analysisops",
                              "/store/results/b_physics",
                              "/store/results/b_tagging",
                              "/store/results/b2g",
                              "/store/results/e_gamma_ecal",
                              "/store/results/ewk",
                              "/store/results/exotica",
                              "/store/results/forward",
                              "/store/results/heavy_ions",
                              "/store/results/higgs",
                              "/store/results/jets_met_hcal",
                              "/store/results/muon",
                              "/store/results/qcd",
                              "/store/results/susy",
                              "/store/results/tau_pflow",
                              "/store/results/top",
                              "/store/results/tracker_dpg",
                              "/store/results/tracker_pog",
                              "/store/results/trigger"]
        # yet 0.9.40 had also another self.mergedLFNBases which was differentiating
        # list of mergedLFNBases based on type of request, removed and all bases
        # will be displayed regardless of the request type (discussion with Edgar)
        self.allMergedLFNBases = [
            "/store/backfill/1",
            "/store/backfill/2",
            "/store/data",
            "/store/mc",
            "/store/generator",
            "/store/relval",
            "/store/hidata",
            "/store/himc"]

        self.allMergedLFNBases.extend(storeResultLFNBase)

        self.allUnmergedLFNBases = ["/store/unmerged", "/store/temp"]

        self.yuiroot = config.yuiroot
        cherrypy.engine.subscribe('start_thread', self.initThread)

        self.wildcardKeys = getattr(config, 'wildcardKeys', {'T1*': 'T1_*',
                                                             'T2*': 'T2_*',
                                                             'T3*': 'T3_*'})
        self.wildcardSites = {}
        Utilities.addSiteWildcards(self.wildcardKeys, self.sites, self.wildcardSites)
Example #18
0
    def __init__(self, config, noSiteDB=False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        self.configDBName = config.configDBName
        self.workloadDBName = config.workloadDBName
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip("/"), config.wmstatDBName)
        if not noSiteDB:
            try:
                # Download a list of all the sites from SiteDB, uses v2 API.
                sitedb = SiteDBJSON()
                self.sites = sitedb.getAllCMSNames()
                self.sites.sort()
                self.phedexNodes = sitedb.getAllPhEDExNodeNames(excludeBuffer=True)
                self.phedexNodes.sort()
            except Exception as ex:
                msg = "ERROR: Could not retrieve sites from SiteDB, reason: %s" % ex
                cherrypy.log(msg)
                raise
        else:
            self.sites = []

        # store result lfn base with all Physics group
        storeResultLFNBase = [
            "/store/results/analysisops",
            "/store/results/b_physics",
            "/store/results/b_tagging",
            "/store/results/b2g",
            "/store/results/e_gamma_ecal",
            "/store/results/ewk",
            "/store/results/exotica",
            "/store/results/forward",
            "/store/results/heavy_ions",
            "/store/results/higgs",
            "/store/results/jets_met_hcal",
            "/store/results/muon",
            "/store/results/qcd",
            "/store/results/susy",
            "/store/results/tau_pflow",
            "/store/results/top",
            "/store/results/tracker_dpg",
            "/store/results/tracker_pog",
            "/store/results/trigger",
        ]
        # yet 0.9.40 had also another self.mergedLFNBases which was differentiating
        # list of mergedLFNBases based on type of request, removed and all bases
        # will be displayed regardless of the request type (discussion with Edgar)
        self.allMergedLFNBases = [
            "/store/backfill/1",
            "/store/backfill/2",
            "/store/data",
            "/store/mc",
            "/store/generator",
            "/store/relval",
            "/store/hidata",
            "/store/himc",
        ]

        self.allMergedLFNBases.extend(storeResultLFNBase)

        self.allUnmergedLFNBases = ["/store/unmerged", "/store/temp"]

        self.yuiroot = config.yuiroot
        cherrypy.engine.subscribe("start_thread", self.initThread)

        self.wildcardKeys = getattr(config, "wildcardKeys", {"T1*": "T1_*", "T2*": "T2_*", "T3*": "T3_*"})
        self.wildcardSites = {}
        Utilities.addSiteWildcards(self.wildcardKeys, self.sites, self.wildcardSites)
Example #19
0
    def __init__(self, config, noSiteDB=False):
        """
        _init_

        Note, noSiteDB added for TESTING PURPOSED ONLY!
        """
        WebAPI.__init__(self, config)
        ReqMgrAuth.assign_roles = config.security_roles
        # Take a guess
        self.templatedir = config.templates
        self.couchUrl = config.couchUrl
        cleanUrl = Utilities.removePasswordFromUrl(self.couchUrl)
        self.configDBName = config.configDBName
        self.wmstatWriteURL = "%s/%s" % (self.couchUrl.rstrip('/'),
                                         config.wmstatDBName)
        if not noSiteDB:
            self.sites = Utilities.sites(config.sitedb)
        else:
            self.sites = []
        self.allMergedLFNBases = [
            "/store/backfill/1", "/store/backfill/2", "/store/data",
            "/store/mc", "/store/generator", "/store/relval", "/store/hidata",
            "/store/himc"
        ]
        self.allUnmergedLFNBases = ["/store/unmerged", "/store/temp"]

        self.mergedLFNBases = {
            "ReReco": [
                "/store/backfill/1", "/store/backfill/2", "/store/data",
                "/store/hidata"
            ],
            "DataProcessing": [
                "/store/backfill/1", "/store/backfill/2", "/store/data",
                "/store/hidata"
            ],
            "ReDigi": [
                "/store/backfill/1", "/store/backfill/2", "/store/data",
                "/store/mc", "/store/himc"
            ],
            "MonteCarlo": [
                "/store/backfill/1", "/store/backfill/2", "/store/mc",
                "/store/himc"
            ],
            "RelValMC": [
                "/store/backfill/1", "/store/backfill/2", "/store/mc",
                "/store/himc"
            ],
            "Resubmission": [
                "/store/backfill/1", "/store/backfill/2", "/store/mc",
                "/store/data", "/store/hidata"
            ],
            "MonteCarloFromGEN": [
                "/store/backfill/1", "/store/backfill/2", "/store/mc",
                "/store/himc"
            ],
            "TaskChain": [
                "/store/backfill/1", "/store/backfill/2", "/store/mc",
                "/store/data", "/store/relval"
            ],
            "LHEStepZero":
            ["/store/backfill/1", "/store/backfill/2", "/store/generator"]
        }

        self.yuiroot = config.yuiroot
        cherrypy.engine.subscribe('start_thread', self.initThread)

        self.wildcardKeys = getattr(config, 'wildcardKeys', {
            'T1*': 'T1_*',
            'T2*': 'T2_*',
            'T3*': 'T3_*'
        })
        self.wildcardSites = {}
        Utilities.addSiteWildcards(self.wildcardKeys, self.sites,
                                   self.wildcardSites)