Classes | |
class | ConditionsUploader |
class | HTTP |
class | HTTPError |
Functions | |
def | addToTarFile (tarFile, fileobj, arcname) |
def | get_version (url) |
def | getCredentials (options) |
def | getInput (default, prompt='') |
def | getInputChoose (optionsList, default, prompt='') |
def | getInputRepeat (prompt='') |
def | getInputWorkflow (prompt='') |
def | main () |
def | parse_arguments () |
def | re_upload (options) |
def | run_upload (parameters) |
def | runWizard (basename, dataFilename, metadataFilename) |
def | testTier0Upload () |
def | upload (options, arguments) |
def | uploadAllFiles (options, arguments) |
def | uploadTier0Files (filenames, username, password, cookieFileName=None) |
Variables | |
string | __author__ = 'Andreas Pfeiffer' |
string | __copyright__ = 'Copyright 2015, CERN CMS' |
list | __credits__ = ['Giacomo Govi', 'Salvatore Di Guida', 'Miguel Ojeda', 'Andreas Pfeiffer'] |
string | __email__ = 'giacomo.govi@cern.ch' |
string | __license__ = 'Unknown' |
string | __maintainer__ = 'Giacomo Govi' |
int | __version__ = 1 |
string | authPathEnvVar = 'COND_AUTH_PATH' |
string | CERN_SSO_CURL_CAPATH = '/etc/pki/tls/certs' |
string | defaultBackend = 'online' |
string | defaultDevHostname = 'cms-conddb-dev.cern.ch' |
string | defaultHostname = 'cms-conddb-prod.cern.ch' |
string | defaultNetrcHost = 'ConditionUploader' |
string | defaultTemporaryFile = 'upload.tar.bz2' |
string | defaultUrlTemplate = 'https://%s/cmsDbUpload/' |
string | defaultWorkflow = 'offline' |
string | devLogDbSrv = 'cms_orcoff_prep' |
def | final_service_url = upload_metadata["server"] |
string | horizontal_rule = "="*60 |
string | logDbSchema = 'CMS_COND_DROPBOX' |
string | prodLogDbSrv = 'cms_orcoff_prod' |
def | response = get_version(final_service_url) |
def | server_version = response.json() |
def | upload_metadata = parse_arguments() |
dictionary | upload_metadata_argument = {} |
int | waitForRetry = 15 |
Primary Author: Joshua Dawes - CERN, CMS - The University of Manchester Debugging, Integration and Maintenance: Andres Cardenas - CERN, CMS - Universidad San Francisco Upload script wrapper - controls the automatic update system. Note: the name of the file follows a different convention to the others because it should be the same as the current upload script name. Takes user arguments and passes them to the main upload module CondDBFW.uploads, once the correct version exists. 1. Ask the server corresponding to the database we're uploading to which version of CondDBFW it has (query the /conddbfw_version/ url). 2. Decide which directory that we can write to - either the current local directory, or /tmp/random_string/. 3. Pull the commit returned from the server into the directory from step 2. 4. Invoke the CondDBFW.uploads module with the arguments given to this script.
Script that uploads to the new CMS conditions uploader. Adapted to the new infrastructure from v6 of the upload.py script for the DropBox from Miguel Ojeda.
def uploadConditions.addToTarFile | ( | tarFile, | |
fileobj, | |||
arcname | |||
) |
Definition at line 428 of file uploadConditions.py.
Referenced by uploadConditions.ConditionsUploader.uploadFile().
def uploadConditions.get_version | ( | url | ) |
Definition at line 435 of file uploadConditions.py.
Referenced by ValidationMatrix_v2.ReleaseComparison.compare().
def uploadConditions.getCredentials | ( | options | ) |
Definition at line 617 of file uploadConditions.py.
References getInput().
Referenced by uploadAllFiles().
def uploadConditions.getInput | ( | default, | |
prompt = '' |
|||
) |
Like raw_input() but with a default and automatic strip().
Like input() but with a default and automatic strip().
Definition at line 61 of file uploadConditions.py.
Referenced by getCredentials(), getInputChoose(), getInputWorkflow(), parse_arguments(), runWizard(), and uploadAllFiles().
def uploadConditions.getInputChoose | ( | optionsList, | |
default, | |||
prompt = '' |
|||
) |
Makes the user choose from a list of options.
Definition at line 85 of file uploadConditions.py.
References getInput(), createfilelist.int, and print().
Referenced by runWizard().
def uploadConditions.getInputRepeat | ( | prompt = '' | ) |
Like raw_input() but repeats if nothing is provided and automatic strip().
Like input() but repeats if nothing is provided and automatic strip().
Definition at line 100 of file uploadConditions.py.
References print().
Referenced by runWizard().
def uploadConditions.getInputWorkflow | ( | prompt = '' | ) |
Like getInput() but tailored to get target workflows (synchronization options).
Definition at line 72 of file uploadConditions.py.
References getInput(), and print().
def uploadConditions.main | ( | ) |
Entry point.
Definition at line 886 of file uploadConditions.py.
References print(), re_upload(), and upload().
def uploadConditions.parse_arguments | ( | ) |
Definition at line 232 of file uploadConditions.py.
References beamvalidation.exit(), getInput(), join(), print(), RooUtil::StringUtil.rsplit(), runWizard(), and str.
def uploadConditions.re_upload | ( | options | ) |
Definition at line 802 of file uploadConditions.py.
References edm.decode(), SiPixelLorentzAngle_cfi.read, str, and upload().
Referenced by main().
def uploadConditions.run_upload | ( | parameters | ) |
Imports CondDBFW.uploads and runs the upload with the upload metadata obtained.
Definition at line 47 of file uploadConditions.py.
References beamvalidation.exit().
def uploadConditions.runWizard | ( | basename, | |
dataFilename, | |||
metadataFilename | |||
) |
Definition at line 111 of file uploadConditions.py.
References getInput(), getInputChoose(), getInputRepeat(), createfilelist.int, print(), and reco.zip().
Referenced by parse_arguments(), and uploadAllFiles().
def uploadConditions.testTier0Upload | ( | ) |
Definition at line 965 of file uploadConditions.py.
References uploadTier0Files().
def uploadConditions.upload | ( | options, | |
arguments | |||
) |
Definition at line 875 of file uploadConditions.py.
References print(), and uploadAllFiles().
Referenced by main(), and re_upload().
def uploadConditions.uploadAllFiles | ( | options, | |
arguments | |||
) |
Definition at line 647 of file uploadConditions.py.
References getCredentials(), getInput(), RooUtil::StringUtil.rsplit(), runWizard(), and str.
Referenced by upload().
def uploadConditions.uploadTier0Files | ( | filenames, | |
username, | |||
password, | |||
cookieFileName = None |
|||
) |
Uploads a bunch of files coming from Tier0. This has the following requirements: * Username/Password based authentication. * Uses the online backend. * Ignores errors related to the upload/content (e.g. duplicated file).
Definition at line 765 of file uploadConditions.py.
Referenced by testTier0Upload().
|
private |
Definition at line 7 of file uploadConditions.py.
|
private |
Definition at line 8 of file uploadConditions.py.
|
private |
Definition at line 9 of file uploadConditions.py.
|
private |
Definition at line 12 of file uploadConditions.py.
|
private |
Definition at line 10 of file uploadConditions.py.
|
private |
Definition at line 11 of file uploadConditions.py.
|
private |
Definition at line 22 of file uploadConditions.py.
string uploadConditions.authPathEnvVar = 'COND_AUTH_PATH' |
Definition at line 40 of file uploadConditions.py.
string uploadConditions.CERN_SSO_CURL_CAPATH = '/etc/pki/tls/certs' |
Definition at line 218 of file uploadConditions.py.
string uploadConditions.defaultBackend = 'online' |
Definition at line 30 of file uploadConditions.py.
string uploadConditions.defaultDevHostname = 'cms-conddb-dev.cern.ch' |
Definition at line 32 of file uploadConditions.py.
string uploadConditions.defaultHostname = 'cms-conddb-prod.cern.ch' |
Definition at line 31 of file uploadConditions.py.
string uploadConditions.defaultNetrcHost = 'ConditionUploader' |
Definition at line 35 of file uploadConditions.py.
string uploadConditions.defaultTemporaryFile = 'upload.tar.bz2' |
Definition at line 34 of file uploadConditions.py.
string uploadConditions.defaultUrlTemplate = 'https://%s/cmsDbUpload/' |
Definition at line 33 of file uploadConditions.py.
string uploadConditions.defaultWorkflow = 'offline' |
Definition at line 36 of file uploadConditions.py.
string uploadConditions.devLogDbSrv = 'cms_orcoff_prep' |
Definition at line 38 of file uploadConditions.py.
def uploadConditions.final_service_url = upload_metadata["server"] |
Definition at line 444 of file uploadConditions.py.
string uploadConditions.horizontal_rule = "="*60 |
Definition at line 45 of file uploadConditions.py.
string uploadConditions.logDbSchema = 'CMS_COND_DROPBOX' |
Definition at line 39 of file uploadConditions.py.
string uploadConditions.prodLogDbSrv = 'cms_orcoff_prod' |
Definition at line 37 of file uploadConditions.py.
def uploadConditions.response = get_version(final_service_url) |
Definition at line 446 of file uploadConditions.py.
Referenced by JetTester.analyze(), JetTester_HeavyIons.analyze(), evf::EvFDaqDirector.contactFileBroker(), HBHEDarkening.degradation(), HLTTauCertifier.dqmEndJob(), PFJetAnalyzerDQM.fillJetResponse(), PFJetFilter.filter(), GBRForest.GetGradBoostClassifier(), HCALResponse.getHCALEnergyResponse(), GBRForest.GetResponse(), GBRForestD.GetResponse(), XrdAdaptor::Source.getXrootdSiteFromURL(), XrdAdaptor::ClientRequest.HandleResponse(), SendMonitoringInfoHandler.HandleResponse(), QueryAttrHandler.HandleResponse(), L1TPhase2CorrelatorOffline.medianResponseCorrResolution(), PhotonMVAEstimator.mvaValue(), ElectronMVAEstimatorRun2.mvaValue(), cms::MuonTCMETValueMapProducer.produce(), MVAValueMapProducer< ParticleType >.produce(), GBRForest.SetInitialResponse(), and GBRForestD.SetInitialResponse().
def uploadConditions.server_version = response.json() |
Definition at line 447 of file uploadConditions.py.
Referenced by evf::EvFDaqDirector.contactFileBroker().
def uploadConditions.upload_metadata = parse_arguments() |
Definition at line 441 of file uploadConditions.py.
dictionary uploadConditions.upload_metadata_argument = {} |
Definition at line 473 of file uploadConditions.py.
int uploadConditions.waitForRetry = 15 |
Definition at line 41 of file uploadConditions.py.