cBench Python package

Submodules

cbench.client module

class cbench.client.ThreadedHTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)[source]

Bases: socketserver.ThreadingMixIn, http.server.HTTPServer

cbench.client.process_web_request(i)[source]
Input: {
http - Python http object

}

Output: { None }

cbench.client.process_web_request_post_via_tunnel(i)[source]
class cbench.client.server_handler(request, client_address, server)[source]

Bases: http.server.BaseHTTPRequestHandler

Input: Python http handler Output: None

do_GET()[source]
do_POST()[source]
log_error(format, *args)[source]
log_request(code='-', size='-')[source]
cbench.client.start(i)[source]
cbench.client.web_err(i)[source]
Input: {
http - http object type - content type bin - bytes to output

}

Output: {
return - 0

}

cbench.client.web_out(i)[source]
Input: {
http - http object type - content type bin - bytes to output (filename) - if !=’‘, substitute filename in headers

}

Output: {
return - 0

}

cbench.comm module

cbench.comm.access(i)[source]
Input: {
(filename) [str] - load JSON from this file
or
(json) [str] - parse JSON string from command line (use ‘ instead of “)
or

(dict) [dict] - dictionary to send to the cK API

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.comm.download_file(i)[source]
Input: {
url [str] - full URL for a file to download file [dict] - file to save

}

Output: {

return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

file_size - size of retreived file

}

cbench.comm.send(i)[source]
Input: {
action [str] - remote API action name config [dict] - configuration for remote server dict [dict] - dict to send to remote server ownership [dict] - info about user ownership

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.comm_min module

cbench.comm_min.send(i)[source]
Input: {
action [str] - remote API action name url [str] - URL dict [dict] - dict to send to remote server

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.config module

cbench.config.get_work_dir(i)[source]
Input: {
}
Output: {

return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

path [str] - path to work dir

}

cbench.config.load(i)[source]
Input: {
}
Output: {

return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

dict [dict] - configuration dictionary path [str] - path to CK cfg entry

}

cbench.config.update(i)[source]
Input: {
(force) [bool] - if True, force update

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.graph module

cbench.graph.init(i)[source]
Input: {
uid [str] - graph identifyer (version) [str] - graph version (desc_file) [str] - file with graph description (tags) [str] - tags separated by comma

}

Output: {

return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

dict [dict] - configuration dictionary path [str] - path to CK cfg entry

}

cbench.graph.push(i)[source]
Input: {
uid [str] - graph identifyer (version) [str] - graph version (filename) [str] - JSON file with results (json) [str] - JSON string from command line (use ‘ instead of “) (point) [str] - specific point name to add/update

}

Output: {

return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

dict [dict] - configuration dictionary path [str] - path to CK cfg entry

}

cbench.main module

cbench.main.process_error(r)[source]

cbench.obj module

cbench.obj.download(i)[source]
Input: {
components - pre-loaded components from bootstrapping
or
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
(can use wildcards)

(version) [str] - assign version (force) [bool] - if True, force download even if components already exists

(tags) [str] - can search by tags (usually soft/package)

(all) [bool] - if True, download dependencies (without force!)

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.obj.open_page(i)[source]
Input: {
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.obj.publish(i)[source]
Input: {
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
(can use wildcards)

(tags) [str] - search multiple CK components by these tags separated by comma (version) [str] - assign version

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.obj.versions(i)[source]
Input: {
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.setup module

cbench.setup.login(i)[source]
Input: {
(username) [str] (api_key) [str] (server_url) [str] (server_user) [str] (server_pass) [str] (server_skip_validation) [str]

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.setup.setup(i)[source]
Input: {
}
Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution module

cbench.solution.activate(i)[source]
Input: {
uid [str] - portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.benchmark(i)[source]
Input: {
uid [str] - Portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.deps_summary(i)[source]
Input: {
deps - resolved deps

}

Output: {
return - return code = 0, if successful
> 0, if error

(error) - error text if return > 0

deps_summary - summary of deps

}

cbench.solution.find(i)[source]
Input: {
uid [str] - Portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.get_platform_desc(i)[source]
cbench.solution.get_solution_dir(i)[source]
cbench.solution.init(i)[source]
Input: {
uid [str] - platform identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.ls(i)[source]
Input: {
(uid) [str] - portal identifier of the solution (can have wiledcards)

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.publish_result(i)[source]
Input: {
uid [str] - portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.rm(i)[source]
Input: {
uid [str] - Portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

cbench.solution.run(i)[source]
Input: {
uid [str] - Portal identifier of the solution

}

Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0

}

Module contents