Functions | |
def | get_version (url) |
def | getInput (default, prompt='') |
def | getInputChoose (optionsList, default, prompt='') |
def | getInputRepeat (prompt='') |
def | getInputWorkflow (prompt='') |
def | parse_arguments () |
def | run_upload (parameters) |
def | runWizard (basename, dataFilename, metadataFilename) |
Variables | |
int | __version__ = 1 |
def | final_service_url = upload_metadata["server"] |
string | horizontal_rule = "="*60 |
def | response = get_version(final_service_url) |
server_version = json.loads(response) | |
def | upload_metadata = parse_arguments() |
dictionary | upload_metadata_argument = {} |
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.
def uploadConditions_v2.get_version | ( | url | ) |
Definition at line 453 of file uploadConditions_v2.py.
def uploadConditions_v2.getInput | ( | default, | |
prompt = '' |
|||
) |
Like raw_input() but with a default and automatic strip().
Definition at line 62 of file uploadConditions_v2.py.
Referenced by getInputChoose(), getInputWorkflow(), parse_arguments(), and runWizard().
def uploadConditions_v2.getInputChoose | ( | optionsList, | |
default, | |||
prompt = '' |
|||
) |
Makes the user choose from a list of options.
Definition at line 86 of file uploadConditions_v2.py.
References getInput(), createfilelist.int, and print().
Referenced by runWizard().
def uploadConditions_v2.getInputRepeat | ( | prompt = '' | ) |
Like raw_input() but repeats if nothing is provided and automatic strip().
Definition at line 101 of file uploadConditions_v2.py.
References print().
Referenced by runWizard().
def uploadConditions_v2.getInputWorkflow | ( | prompt = '' | ) |
Like getInput() but tailored to get target workflows (synchronization options).
Definition at line 73 of file uploadConditions_v2.py.
References getInput(), and print().
def uploadConditions_v2.parse_arguments | ( | ) |
Definition at line 233 of file uploadConditions_v2.py.
References beamvalidation.exit(), getInput(), join(), print(), runWizard(), and str.
def uploadConditions_v2.run_upload | ( | parameters | ) |
Imports CondDBFW.uploads and runs the upload with the upload metadata obtained.
Definition at line 48 of file uploadConditions_v2.py.
References beamvalidation.exit().
def uploadConditions_v2.runWizard | ( | basename, | |
dataFilename, | |||
metadataFilename | |||
) |
Definition at line 112 of file uploadConditions_v2.py.
References getInput(), getInputChoose(), getInputRepeat(), createfilelist.int, print(), and reco.zip().
Referenced by parse_arguments().
|
private |
Definition at line 22 of file uploadConditions_v2.py.
def uploadConditions_v2.final_service_url = upload_metadata["server"] |
Definition at line 464 of file uploadConditions_v2.py.
string uploadConditions_v2.horizontal_rule = "="*60 |
Definition at line 46 of file uploadConditions_v2.py.
def uploadConditions_v2.response = get_version(final_service_url) |
Definition at line 466 of file uploadConditions_v2.py.
uploadConditions_v2.server_version = json.loads(response) |
Definition at line 467 of file uploadConditions_v2.py.
def uploadConditions_v2.upload_metadata = parse_arguments() |
Definition at line 461 of file uploadConditions_v2.py.
dictionary uploadConditions_v2.upload_metadata_argument = {} |
Definition at line 493 of file uploadConditions_v2.py.