CMS 3D CMS Logo

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.

00032                         :
00033     coralConnStr, USERNAME, PASSWORD, AUTH_PATH = getDBConnectionParams()
00034     conn_string = str(USERNAME+"/"+PASSWORD+"@"+DATABASE)
00035     conn = cx_Oracle.connect(conn_string)
00036     return conn
        
def web_results_display::extractLogin (   login)

Definition at line 16 of file web_results_display.py.

00017                        :
00018         pattern = re.compile(r'value="([^"]+)')
00019         matching = pattern.search(login)
00020         version = 0
00021         if matching:
00022                 g = matching.groups()
                return g[0]
def web_results_display::getDBConnectionParams ( )

Definition at line 37 of file web_results_display.py.

00038                            :
00039     os.environ['TNS_ADMIN'] = "/afs/cern.ch/project/oracle/admin"
00040     coralConnStr = "oracle://"+DATABASE+"/"+USERNAME+""
00041     PASSWORD = getLogin(AUTH_PATH, coralConnStr)
00042     return (coralConnStr,USERNAME,PASSWORD,AUTH_PATH)

def web_results_display::GetLabels ( )

Definition at line 119 of file web_results_display.py.

00120                :
00121     conn = createDBConnection()
00122     resDb = WebResultsDisplay( conn )
00123     webLabels = resDb.labels()
00124     conn.close
00125     return webLabels
    
def web_results_display::getLogin (   auth,
  connStr 
)

Definition at line 23 of file web_results_display.py.

00024                            :
00025         pfile = open(auth, "r")
00026         plist = pfile.readlines()
00027         for i in range (0, len(plist)):
00028                 if string.find(plist[i], '<connection name="'+connStr+'">') != -1:
00029                         PASSWORD = extractLogin(plist[i+2])
00030         return (PASSWORD)

def web_results_display::GetReadLogStatus (   label,
  runId 
)

Definition at line 140 of file web_results_display.py.

00141                                     :
00142     conn = createDBConnection()
00143     resDb = WebResultsDisplay( conn )
00144     logStatus = resDb.readLogStatus( label, runId )
00145     conn.close
00146     return logStatus
def web_results_display::GetReleasesHeaders (   label,
  release = "",
  arch = "" 
)

Definition at line 126 of file web_results_display.py.

00127                                                     :
00128     conn = createDBConnection()
00129     resDb = WebResultsDisplay( conn )
00130     relHeaders = resDb.releasesHeaders( label, release, arch)
00131     conn.close
00132     return relHeaders

def web_results_display::GetResultHeaders (   label)

Definition at line 133 of file web_results_display.py.

00134                              :
00135     conn = createDBConnection()
00136     resDb = WebResultsDisplay( conn )
00137     statusHeaders = resDb.resultHeaders( label )
00138     conn.close
00139     return statusHeaders

def web_results_display::GetResultsList (   runID)

Definition at line 112 of file web_results_display.py.

00113                            :
00114     conn = createDBConnection()
00115     resDb = WebResultsDisplay( conn )
00116     resList = resDb.stepResults( runID )
00117     conn.close
00118     return resList

def web_results_display::GetRunResults (   rid)

Definition at line 105 of file web_results_display.py.

00106                         :
00107     conn = createDBConnection()
00108     resDb = WebResultsDisplay( conn )
00109     stat = resDb.runResults( rid )
00110     conn.close
00111     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.