Public Member Functions | |
def | __init__ (self) |
def | discardCookies (self) |
def | getCookies (self) |
def | getToken (self, username, password) |
def | query (self, url, data=None, files=None, keepCookies=True) |
def | setBaseUrl (self, baseUrl='') |
def | setProxy (self, proxy='') |
def | setRetries (self, retries=()) |
def | setTimeout (self, timeout=0) |
Public Attributes | |
baseUrl | |
curl | |
retries | |
token | |
Class used for querying URLs using the HTTP protocol.
Definition at line 230 of file uploadConditions.py.
def uploadConditions.HTTP.__init__ | ( | self | ) |
Definition at line 236 of file uploadConditions.py.
References upload_popcon.HTTP.setBaseUrl(), uploadConditions.HTTP.setBaseUrl(), upload_popcon.HTTP.setRetries(), and uploadConditions.HTTP.setRetries().
def uploadConditions.HTTP.discardCookies | ( | self | ) |
Discards cookies.
Definition at line 258 of file uploadConditions.py.
Referenced by uploadConditions.HTTP.query().
def uploadConditions.HTTP.getCookies | ( | self | ) |
def uploadConditions.HTTP.getToken | ( | self, | |
username, | |||
password | |||
) |
Definition at line 298 of file uploadConditions.py.
References upload_popcon.HTTP.baseUrl, uploadConditions.HTTP.baseUrl, harvestTrackValidationPlots.str, cond::TagInfo_t.token, upload_popcon.HTTP.token, uploadConditions.HTTP.token, and upload_popcon.ConditionsUploader.token.
Queries a URL, optionally with some data (dictionary). If no data is specified, a GET request will be used. If some data is specified, a POST request will be used. If files is specified, it must be a dictionary like data but the values are filenames. By default, cookies are kept in-between requests. A HTTPError exception is raised if the response's HTTP code is not 200.
Definition at line 361 of file uploadConditions.py.
References upload_popcon.HTTP.baseUrl, uploadConditions.HTTP.baseUrl, upload_popcon.HTTP.discardCookies(), uploadConditions.HTTP.discardCookies(), list(), upload_popcon.HTTP.retries, uploadConditions.HTTP.retries, harvestTrackValidationPlots.str, cond::TagInfo_t.token, upload_popcon.HTTP.token, uploadConditions.HTTP.token, and upload_popcon.ConditionsUploader.token.
Referenced by production_tasks.BaseDataset.run(), and edmIntegrityCheck.IntegrityCheck.test().
def uploadConditions.HTTP.setBaseUrl | ( | self, | |
baseUrl = '' |
|||
) |
Allows to set a base URL which will be prefixed to all the URLs that will be queried later.
Definition at line 264 of file uploadConditions.py.
References upload_popcon.HTTP.baseUrl, and uploadConditions.HTTP.baseUrl.
Referenced by uploadConditions.HTTP.__init__().
def uploadConditions.HTTP.setProxy | ( | self, | |
proxy = '' |
|||
) |
def uploadConditions.HTTP.setRetries | ( | self, | |
retries = () |
|||
) |
Allows to set retries. The retries are a sequence of the seconds to wait per retry. The retries are done on: * PyCurl errors (includes network problems, e.g. not being able to connect to the host). * 502 Bad Gateway (for the moment, to avoid temporary Apache-CherryPy issues). * 503 Service Temporarily Unavailable (for when we update the frontends).
Definition at line 283 of file uploadConditions.py.
Referenced by uploadConditions.HTTP.__init__().
def uploadConditions.HTTP.setTimeout | ( | self, | |
timeout = 0 |
|||
) |
uploadConditions.HTTP.baseUrl |
Definition at line 249 of file uploadConditions.py.
Referenced by uploadConditions.HTTP.getToken(), uploadConditions.HTTP.query(), and uploadConditions.HTTP.setBaseUrl().
uploadConditions.HTTP.curl |
Definition at line 240 of file uploadConditions.py.
uploadConditions.HTTP.retries |
Definition at line 296 of file uploadConditions.py.
Referenced by uploadConditions.HTTP.query().
uploadConditions.HTTP.token |
Definition at line 251 of file uploadConditions.py.
Referenced by uploadConditions.HTTP.getToken(), uploadConditions.HTTP.query(), uploadConditions.ConditionsUploader.setHost(), uploadConditions.ConditionsUploader.signIn(), and uploadConditions.ConditionsUploader.signOut().