本文整理汇总了Python中WMCore.WebTools.WebAPI.WebAPI.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python WebAPI.__init__方法的具体用法?Python WebAPI.__init__怎么用?Python WebAPI.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.WebTools.WebAPI.WebAPI
的用法示例。
在下文中一共展示了WebAPI.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例2: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例3: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例4: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例6: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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 = []
示例7: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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()
示例8: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例9: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例10: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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)
示例11: __init__
# 需要导入模块: from WMCore.WebTools.WebAPI import WebAPI [as 别名]
# 或者: from WMCore.WebTools.WebAPI.WebAPI import __init__ [as 别名]
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