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) |
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.
References beamvalidation.exit(), data_sources.json_data_node.make(), parse_arguments(), print(), and run_upload().
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(), runWizard(), and str.
Referenced by get_version(), and uploads.uploader.send_metadata().
def uploadConditions.re_upload | ( | options | ) |
Definition at line 802 of file uploadConditions.py.
References edm.decode(), fileinputsource_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().
Referenced by get_version().
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(), 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().