CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
web_results_display Namespace Reference

Classes

class  WebResultsDisplay
 

Functions

def createDBConnection
 
def extractLogin
 
def getDBConnectionParams
 
def GetLabels
 
def getLogin
 
def GetReadLogStatus
 
def GetReleasesHeaders
 
def GetResultHeaders
 
def GetResultsList
 
def GetRunResults
 

Variables

string AUTH_PATH = "/afs/cern.ch/cms/DB/conddb/test/authentication.xml"
 
string DATABASE = "cms_orcoff_prep"
 
string USERNAME = "CMS_COND_REGRESSION"
 

Function Documentation

def web_results_display.createDBConnection ( )

Definition at line 31 of file web_results_display.py.

References getDBConnectionParams().

Referenced by GetLabels(), GetReadLogStatus(), GetReleasesHeaders(), GetResultHeaders(), GetResultsList(), and GetRunResults().

31 
32 def createDBConnection():
33  coralConnStr, USERNAME, PASSWORD, AUTH_PATH = getDBConnectionParams()
34  conn_string = str(USERNAME+"/"+PASSWORD+"@"+DATABASE)
35  conn = cx_Oracle.connect(conn_string)
36  return conn
def web_results_display.extractLogin (   login)

Definition at line 16 of file web_results_display.py.

Referenced by getLogin().

16 
17 def extractLogin(login):
18  pattern = re.compile(r'value="([^"]+)')
19  matching = pattern.search(login)
20  version = 0
21  if matching:
22  g = matching.groups()
return g[0]
def web_results_display.getDBConnectionParams ( )

Definition at line 37 of file web_results_display.py.

References getLogin().

Referenced by createDBConnection().

37 
39  os.environ['TNS_ADMIN'] = "/afs/cern.ch/project/oracle/admin"
40  coralConnStr = "oracle://"+DATABASE+"/"+USERNAME+""
41  PASSWORD = getLogin(AUTH_PATH, coralConnStr)
42  return (coralConnStr,USERNAME,PASSWORD,AUTH_PATH)
def web_results_display.GetLabels ( )

Definition at line 119 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.index().

120 def GetLabels():
121  conn = createDBConnection()
122  resDb = WebResultsDisplay( conn )
123  webLabels = resDb.labels()
124  conn.close
125  return webLabels
def web_results_display.getLogin (   auth,
  connStr 
)

Definition at line 23 of file web_results_display.py.

References extractLogin().

Referenced by getDBConnectionParams().

23 
24 def getLogin(auth, connStr):
25  pfile = open(auth, "r")
26  plist = pfile.readlines()
27  for i in range (0, len(plist)):
28  if string.find(plist[i], '<connection name="'+connStr+'">') != -1:
29  PASSWORD = extractLogin(plist[i+2])
30  return (PASSWORD)
def web_results_display.GetReadLogStatus (   label,
  runId 
)

Definition at line 140 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.showLogs().

141 def GetReadLogStatus( label, runId ):
142  conn = createDBConnection()
143  resDb = WebResultsDisplay( conn )
144  logStatus = resDb.readLogStatus( label, runId )
145  conn.close
146  return logStatus
def web_results_display.GetReleasesHeaders (   label,
  release = "",
  arch = "" 
)

Definition at line 126 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.index().

127 def GetReleasesHeaders( label, release="", arch="" ):
128  conn = createDBConnection()
129  resDb = WebResultsDisplay( conn )
130  relHeaders = resDb.releasesHeaders( label, release, arch)
131  conn.close
132  return relHeaders
def web_results_display.GetResultHeaders (   label)

Definition at line 133 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.index().

134 def GetResultHeaders( label ):
135  conn = createDBConnection()
136  resDb = WebResultsDisplay( conn )
137  statusHeaders = resDb.resultHeaders( label )
138  conn.close
139  return statusHeaders
def web_results_display.GetResultsList (   runID)

Definition at line 112 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.ShowTable().

113 def GetResultsList( runID ):
114  conn = createDBConnection()
115  resDb = WebResultsDisplay( conn )
116  resList = resDb.stepResults( runID )
117  conn.close
118  return resList
def web_results_display.GetRunResults (   rid)

Definition at line 105 of file web_results_display.py.

References createDBConnection().

Referenced by webApp.Server.ShowTable().

106 def GetRunResults( rid ):
107  conn = createDBConnection()
108  resDb = WebResultsDisplay( conn )
109  stat = resDb.runResults( rid )
110  conn.close
111  return stat

Variable Documentation

string web_results_display.AUTH_PATH = "/afs/cern.ch/cms/DB/conddb/test/authentication.xml"

Definition at line 13 of file web_results_display.py.

string web_results_display.DATABASE = "cms_orcoff_prep"

Definition at line 10 of file web_results_display.py.

string web_results_display.USERNAME = "CMS_COND_REGRESSION"

Definition at line 11 of file web_results_display.py.