Functions | |
def | convert_relaxed_classes_to_uids |
def | find_and_separate_flags |
def | is_windows |
def | gen_tmp_with_json |
def | merge_array |
def | list2str |
def | is_uid |
def | cid2array |
def | return_flags |
def | error_if_no_cur_repo |
def | check_cm_json |
def | load_json_file |
def | merge_arrays |
def | array2cm |
def | str2cm |
def | access_fe_as_string |
def | cm_access |
Variables | |
string | cmx_error = 'cMX error: ' |
tuple | x = return_flags(sys.argv[1:]) |
list | argv = x['cmd'] |
tuple | il = len(argv) |
list | flags = x['flags'] |
globl = False | |
local = False | |
quiet = False | |
jsn = False | |
string | c = '' |
string | q = 'cm core gen_uid' |
list | af = argv[0] |
tuple | f = open(af, 'r') |
tuple | uid = f.readline() |
list | alias = af[8:] |
tuple | r |
list | web_host = r['cm_web_host'] |
list | index_host = r['cm_index_host'] |
tuple | r9 |
tuple | pp = r9.get('cm_path','') |
tuple | m = r9.get('cm_module_uoa','') |
tuple | md = r9.get('cm_module_uid','') |
tuple | d = r9.get('cm_data_uoa','') |
tuple | dd = r9.get('cm_data_uid','') |
tuple | rp = r9.get('cm_repo_uoa','') |
tuple | rpd = r9.get('cm_repo_uid','') |
string | cid = ':' |
string | cv = '$#cm_' |
string | c1 = '' |
string | dn = '' |
string | dn1 = '' |
dictionary | ii |
update_data = False | |
list | use_indexing = r['cm_data_obj'] |
string | mode = 'delete' |
int | qx = 1 |
string | key = 'key_' |
string | value = 'value_' |
tuple | qq = q.split('=') |
list | lc = [] |
string | l = '' |
string | q1 = 'alias-u-' |
tuple | r1 = convert_relaxed_classes_to_uids({'cm_list':r['cm_values']}) |
list | ww = r1['cm_list_match'] |
list | p = r['cm_path'] |
tuple | p1 = os.path.join('.cm','alias-a-'+dn) |
tuple | p2 = os.path.join('.cm','alias-u-'+uid) |
move = False | |
string | rp1 = '' |
tuple | password = getpass.getpass('Enter password: ') |
def cmx::access_fe_as_string | ( | s | ) |
def cmx::array2cm | ( | a | ) |
Convert list to cm array cm_module_uoa cm_action A=B C=D ... @file1.json E=F ... -- <unparsed arguments> if extension of @file is .tmp, it will be deleted after read! Input: input array Output: { cm_return - return code = 0 if successful cm_array - array cm_console - if 'cm_console' in array, set it to the value of 'cm_console' parameter }
def cmx::check_cm_json | ( | i | ) |
def cmx::cid2array | ( | i | ) |
Convert cid to array Note that this function is different from Input: { cid - in format (REPO_UOA:)KEY_UOA:DATA_UOA (prefix) - add prefic to output variables (<prefix>_repo_uoa:...) } Output: { prefix+'_repo_uoa' - repo UOA prefix+'_module_uoa' - module UOA prefix+'_data_uoa' - data UOA }
def cmx::cm_access | ( | i | ) |
Call external cm and return json Input: { cm_run_module_uoa - module UOA cm_action - action (function) from the module cm_unparsed - unparsed list to add to command line ... Set of parameters depending on the called module and action (function) } Output: { cm_return - return code = 0 if successful > 0 if error 99 - if couldn't process json from output < 0 if warning (rarely used at this moment) (cm_error) - error text, if cm_return > 0 (cm_stdout) - if no error, raw output (cm_stderr) - raw output of error stream Set of output parameters depending on the called module and action (function) }
def cmx::convert_relaxed_classes_to_uids | ( | i | ) |
Convert relaxed classes to UIDs Input: { cm_list - list with classes (wildcards * and ? can be used) } Output: { cm_return = 0 - no errors cm_error - error text if cm_return>0 cm_list_uids - updated list of UIDs cm_list_match - match of classes, i.e. {"value from cm_list":{"cm_uid","alias"}} }
def cmx::error_if_no_cur_repo | ( | i | ) |
def cmx::find_and_separate_flags | ( | i | ) |
Find flag of format flag=a(,b,c) and return list of values [a(,b,c)] Input: { cm_list - list with flags flags - list of flags to match (to support equivalent flags like -c and --classes) } Output: { cm_return = 0 (for compatibility with cM) cm_found - False, if not found True, if found cm_values - List of values }
def cmx::gen_tmp_with_json | ( | i | ) |
def cmx::is_uid | ( | str | ) |
def cmx::is_windows | ( | ) |
def cmx::list2str | ( | a | ) |
def cmx::load_json_file | ( | i | ) |
def cmx::merge_array | ( | a, | ||
b | ||||
) |
def cmx::merge_arrays | ( | i | ) |
def cmx::return_flags | ( | i | ) |
def cmx::str2cm | ( | i | ) |
list cmx::alias = af[8:] |
list cmx::c = '' |
Definition at line 745 of file cmx.py.
Referenced by org::openme::openme::remote_access().
string cmx::cmx_error = 'cMX error: ' |
Definition at line 771 of file cmx.py.
Referenced by org::openme::openme::access(), and org::openme::openme::remote_access().
list cmx::flags = x['flags'] |
cmx::globl = False |
dictionary cmx::ii |
Definition at line 637 of file cmx.py.
Referenced by openme_create_obj().
list cmx::index_host = r['cm_index_host'] |
cmx::local = False |
Definition at line 1585 of file cmx.py.
Referenced by openme_init(), and org::openme::openme::openme_run_program().
tuple cmx::password = getpass.getpass('Enter password: ') |
Definition at line 1847 of file cmx.py.
Referenced by org::openme::openme::remote_access().
cmx::quiet = False |
tuple cmx::r |
tuple cmx::r9 |
cmx::update_data = False |
list cmx::use_indexing = r['cm_data_obj'] |
string cmx::value = 'value_' |
list cmx::web_host = r['cm_web_host'] |
tuple cmx::x = return_flags(sys.argv[1:]) |
Definition at line 635 of file cmx.py.
Referenced by org::openme::openme::access(), org::openme::openme::convert_cm_array_to_uri(), org::openme::openme::convert_str_to_sha1(), and org::openme::openme::remote_access().