Esempio n. 1
0
def list_node(db_name, node_id, typeMatch, typeValue, lock_id, cmdId):
	params[MdbJKey.db_name] = db_name
	params[MdbJKey.lock_id] = lock_id
	params[MdbJKey.node_id] = node_id
	params[MdbJKey.type_match] = typeMatch
	params[MdbJKey.type_value] = get_type_str(typeValue)
	send_request(params, cmdId)
Esempio n. 2
0
def list_node(db_name, node_id, typeMatch, typeValue, lock_id, cmdId):
    params[MdbJKey.db_name] = db_name
    params[MdbJKey.lock_id] = lock_id
    params[MdbJKey.node_id] = node_id
    params[MdbJKey.type_match] = typeMatch
    params[MdbJKey.type_value] = get_type_str(typeValue)
    send_request(params, cmdId)
Esempio n. 3
0
def libdb_attr_get(db_name, node_id, name, lock_id):
    params = dict()
    params[MdbJKey.db_name] = db_name
    params[MdbJKey.lock_id] = lock_id
    params[MdbJKey.node_id] = node_id
    params[MdbJKey.name] = name
    send_request(params, CmdId.CMD_ATTRBUTE_GET)
    return
Esempio n. 4
0
def libdb_attr_get(db_name, node_id, name, lock_id):
	params = dict()
	params[MdbJKey.db_name] = db_name
	params[MdbJKey.lock_id] = lock_id
	params[MdbJKey.node_id] = node_id
	params[MdbJKey.name] = name
	send_request(params, CmdId.CMD_ATTRBUTE_GET)
	return
Esempio n. 5
0
def libdb_dump_nodes(db_name, lock_id):
	'''
	params = dict()
	params[MdbJKey.db_name] = db_name
	params[MdbJKey.lock_id] = lock_id
	params[MdbJKey.node_id] = 0
	'''
	req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC, 0, 0, lock_id)
	send_request(req, CmdId.CMD_DUMP_NODES)
Esempio n. 6
0
def libdb_dump_nodes(db_name, lock_id):
    '''
	params = dict()
	params[MdbJKey.db_name] = db_name
	params[MdbJKey.lock_id] = lock_id
	params[MdbJKey.node_id] = 0
	'''
    req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC, 0, 0,
                       lock_id)
    send_request(req, CmdId.CMD_DUMP_NODES)
Esempio n. 7
0
def libdb_attr_set(db_name, node_id, name, cookie, value, snapshot_flag, lock_id):
	params = dict()
	params[MdbJKey.db_name] = db_name
	params[MdbJKey.lock_id] = lock_id
	params[MdbJKey.node_id] = node_id
	params[MdbJKey.cookie] = cookie
	if isinstance(value, str) == False:
		value = str(value)
	params[MdbJKey.name] = name
	params[MdbJKey.data] = value
	params[MdbJKey.snapshot] = snapshot_flag
	send_request(params, CmdId.CMD_ATTRBUTE_SET)
Esempio n. 8
0
def libdb_attr_set(db_name, node_id, name, cookie, value, snapshot_flag,
                   lock_id):
    params = dict()
    params[MdbJKey.db_name] = db_name
    params[MdbJKey.lock_id] = lock_id
    params[MdbJKey.node_id] = node_id
    params[MdbJKey.cookie] = cookie
    if isinstance(value, str) == False:
        value = str(value)
    params[MdbJKey.name] = name
    params[MdbJKey.data] = value
    params[MdbJKey.snapshot] = snapshot_flag
    send_request(params, CmdId.CMD_ATTRBUTE_SET)
Esempio n. 9
0
def libdb_destroy_node(db_name, node_id, lock_id):
    req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC,
                       node_id, 0, lock_id)
    send_request(req, CmdId.CMD_NODE_DESTROY)
Esempio n. 10
0
def libdb_get_node_by_node_id(db_name, node_id, lock_id):
    req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC,
                       node_id, 0, lock_id)
    send_request(req, CmdId.CMD_NODE_GET_BY_NODE_ID)
Esempio n. 11
0
def libdb_create_node(db_name, parent, mctype, snapshot_flag, lock_id):
    req = get_req_info(db_name, parent, mctype, node_id, snapshot_flag,
                       lock_id)
    send_request(req, CmdId.CMD_NODE_CREATE_WITH_NODE_ID)
Esempio n. 12
0
def libdb_destroy_node(db_name, node_id, lock_id):
	req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC, node_id, 0, lock_id)
	send_request(req, CmdId.CMD_NODE_DESTROY)
Esempio n. 13
0
def libdb_get_node_by_node_id(db_name, node_id, lock_id):
	req = get_req_info(db_name, McType.MC_TYPE_RMC, McType.MC_TYPE_RMC, node_id, 0, lock_id)
	send_request(req, CmdId.CMD_NODE_GET_BY_NODE_ID)
Esempio n. 14
0
def libdb_create_node(db_name, parent, mctype, snapshot_flag, lock_id):
	req = get_req_info(db_name, parent, mctype, node_id, snapshot_flag, lock_id)
	send_request(req, CmdId.CMD_NODE_CREATE_WITH_NODE_ID)