|
Python Api
IE10.1
|
Functions | |
| def | set_certification_begin (certification_name) |
| Notifiy backend certification begin, last certification record would be cleaned. More... | |
| def | set_certification_end (certification_name) |
| Notifiy backend certification end, all cached result would be flushed to DB. More... | |
| def | save_certification_db (table_name, input_data, sync=False) |
| save certification result in db, it would be cache in memory, and batch write into db in size 16 More... | |
| def | query_certification_db (table_name, query_condition) |
| query certification result in db More... | |
| def | export_certification_report (report_name, report_content, export_path='certification') |
| save report to specified folder on webserver, default is Public/certification More... | |
| def | export_map (devices, map_name, map_path='certification') |
| draw devices on map and save to folder on webserver, default is Public/certification More... | |
| def | read_report (file_name, folder='certification') |
| read report from webserver desktop, MUST be placed at Public More... | |
| def | remove_file (file_name, folder='certification') |
| remove file from webserver desktop, MUST be placed at Public More... | |
| def | clear_certification_dbs () |
| def | get_benchmark (name) |
| DO NOT USE THIS API EXCEPT IN CERTIFICATION. More... | |
| def | save_benchmark (benchmark) |
| DO NOT USE THIS API EXCEPT IN CERTIFICATION. More... | |
| def | execute_benchmark (name) |
| DO NOT USE THIS API EXCEPT IN CERTIFICATION. More... | |
| def | get_latest_device_benchmark_results (devIds) |
| DO NOT USE THIS API EXCEPT IN CERTIFICATION. More... | |
Variables | |
| str_stack = traceback.format_exc(); | |
| export_result = namedtuple('export_result', ["success", "error"]) | |
| export_map_request = namedtuple('export_map_request', ['devices', "map_name", "map_path"]) | |
| read_file_result = namedtuple('read_file_result', ['success', 'error', 'data']) | |
| def netbrain.sysapi.certification.clear_certification_dbs | ( | ) |
| def netbrain.sysapi.certification.execute_benchmark | ( | name | ) |
DO NOT USE THIS API EXCEPT IN CERTIFICATION.
| def netbrain.sysapi.certification.export_certification_report | ( | report_name, | |
| report_content, | |||
export_path = 'certification' |
|||
| ) |
save report to specified folder on webserver, default is Public/certification
| report_name(string) | name of report |
| report_content(string) | content of report |
| export_path(string) | target folder, we search folder from Public |
| def netbrain.sysapi.certification.export_map | ( | devices, | |
| map_name, | |||
map_path = 'certification' |
|||
| ) |
draw devices on map and save to folder on webserver, default is Public/certification
| devices(list) | device name list |
| map_name(string) | name of map |
| def netbrain.sysapi.certification.get_benchmark | ( | name | ) |
DO NOT USE THIS API EXCEPT IN CERTIFICATION.
| def netbrain.sysapi.certification.get_latest_device_benchmark_results | ( | devIds | ) |
DO NOT USE THIS API EXCEPT IN CERTIFICATION.
| def netbrain.sysapi.certification.query_certification_db | ( | table_name, | |
| query_condition | |||
| ) |
query certification result in db
| table_name(string) | name of collection, should be one of
|
| query_condition(dict) | query dict, should be same as db query |
| def netbrain.sysapi.certification.read_report | ( | file_name, | |
folder = 'certification' |
|||
| ) |
read report from webserver desktop, MUST be placed at Public
| folder(string) | folder name, we add prefix "public" at backend |
| file_name(string) | name of file |
| def netbrain.sysapi.certification.remove_file | ( | file_name, | |
folder = 'certification' |
|||
| ) |
remove file from webserver desktop, MUST be placed at Public
| folder(string) | folder name, we add prefix "public" at backend |
| file_name(string) | name of file |
| def netbrain.sysapi.certification.save_benchmark | ( | benchmark | ) |
DO NOT USE THIS API EXCEPT IN CERTIFICATION.
| def netbrain.sysapi.certification.save_certification_db | ( | table_name, | |
| input_data, | |||
sync = False |
|||
| ) |
save certification result in db, it would be cache in memory, and batch write into db in size 16
| table_name(string) | name of collection, should be one of
|
| input_data(dict) | record, 'certificateName' MUST be one key |
| sync | save to db instantly, default is false |
| def netbrain.sysapi.certification.set_certification_begin | ( | certification_name | ) |
Notifiy backend certification begin, last certification record would be cleaned.
| certification_name(string) | name of certification |
| def netbrain.sysapi.certification.set_certification_end | ( | certification_name | ) |
Notifiy backend certification end, all cached result would be flushed to DB.
| certification_name(string) | name of certification |
| netbrain.sysapi.certification.export_map_request = namedtuple('export_map_request', ['devices', "map_name", "map_path"]) |
| netbrain.sysapi.certification.export_result = namedtuple('export_result', ["success", "error"]) |
| netbrain.sysapi.certification.read_file_result = namedtuple('read_file_result', ['success', 'error', 'data']) |
| netbrain.sysapi.certification.str_stack = traceback.format_exc(); |
1.8.14