yumapro
24.10-2
YumaPro SDK
|
Functions to manage the edit transaction. More...
Functions | |
agt_cfg_transaction_t * | agt_cfg_new_transaction (ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, status_t *res) |
Malloc and initialize agt_cfg_transaction_t struct. More... | |
agt_cfg_transaction_t * | agt_cfg_new_transaction_ex (ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_cb, status_t *res) |
Malloc and initialize agt_cfg_transaction_t struct Extended. More... | |
agt_cfg_transaction_t * | agt_cfg_new_transaction_ex2 (ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_cb, ses_cb_t *scb, status_t *res) |
Malloc and initialize agt_cfg_transaction_t struct Extended2. More... | |
status_t | agt_cfg_finish_new_transaction (ses_cb_t *scb, agt_cfg_transaction_t *txcb) |
Call the start transaction callback if it was deferred. More... | |
agt_cfg_transaction_t * | agt_cfg_new_transaction_ex3 (ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_cb, boolean no_silsa_cb, ses_cb_t *scb, status_t *res) |
Malloc and initialize agt_cfg_transaction_t struct Extended3. More... | |
agt_cfg_transaction_t * | agt_cfg_rerun_transaction (ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_silsa_cb, ncx_transaction_id_t txid, ses_cb_t *scb, status_t *res) |
Malloc and initialize agt_cfg_transaction_t struct. More... | |
void | agt_cfg_free_transaction (agt_cfg_transaction_t *txcb) |
Clean and free a agt_cfg_transaction_t struct. More... | |
status_t | agt_cfg_init_transactions (const xmlChar *txidfile, boolean foundfile) |
Initialize the transaction ID functionality. More... | |
void | agt_cfg_cleanup_transactions (const xmlChar *txidfile) |
Cleanup the transaction ID functionality. More... | |
ncx_transaction_id_t | agt_cfg_txid_in_progress (ncx_cfg_t cfgid) |
Return the ID of the current transaction ID in progress. More... | |
agt_cfg_undo_rec_t * | agt_cfg_new_undorec (void) |
Malloc and initialize a new agt_cfg_undo_rec_t struct. More... | |
void | agt_cfg_init_undorec (agt_cfg_undo_rec_t *undo) |
Initialize a new agt_cfg_undo_rec_t struct. More... | |
void | agt_cfg_free_undorec (agt_cfg_undo_rec_t *undo) |
Free all the memory used by the specified agt_cfg_undo_rec_t. More... | |
void | agt_cfg_clean_undorec (agt_cfg_undo_rec_t *undo) |
Clean all the memory used by the specified agt_cfg_undo_rec_t but do not free the struct itself. More... | |
agt_cfg_audit_rec_t * | agt_cfg_new_auditrec (const xmlChar *target, op_editop_t editop) |
Malloc and initialize a new agt_cfg_audit_rec_t struct. More... | |
void | agt_cfg_free_auditrec (agt_cfg_audit_rec_t *auditrec) |
Free all the memory used by the specified agt_cfg_audit_rec_t. More... | |
agt_cfg_commit_test_t * | agt_cfg_new_commit_test (void) |
Malloc a agt_cfg_commit_test_t struct. More... | |
void | agt_cfg_free_commit_test (agt_cfg_commit_test_t *commit_test) |
Free a previously malloced agt_cfg_commit_test_t struct. More... | |
void | agt_cfg_set_transaction_commit (agt_cfg_transaction_t *txcb) |
Tag this transaction as a commit from candidate to running. More... | |
void | agt_cfg_set_transaction_unload (agt_cfg_transaction_t *txcb) |
Tag this transaction as a commit for unloading a module. More... | |
boolean | agt_cfg_transaction_is_unload (agt_cfg_transaction_t *txcb) |
Check if this transaction is a commit for unloading a module. More... | |
void | agt_cfg_force_full_root_check (agt_cfg_transaction_t *txcb) |
Tag this transaction as needing a full root check. More... | |
void | agt_cfg_remove_module_commit_tests (ncx_module_t *mod) |
Remove module commit tests for specified module. More... | |
agt_cfg_silcall_t * | agt_cfg_new_silcall (op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ) |
Create and fill in a remote SIL callback back pointer. More... | |
void | agt_cfg_free_silcall (agt_cfg_silcall_t *silcall) |
Clean and free a mallocedremote SIL callback back pointer. More... | |
status_t | agt_cfg_add_hook_silcall (agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval, agt_hook_type_t hook_type) |
Create and fill in a remote Hook SIL callback back pointer Add it to the transaction control block silcall Q. More... | |
status_t | agt_cfg_add_silcall (agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval) |
Create and fill in a remote SIL callback back pointer Add it to the transaction control block silcall Q. More... | |
status_t | agt_cfg_add_edit2_silcall (agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval) |
Create and fill in a remote SIL callback back pointer. More... | |
status_t | agt_cfg_add_nested_silcall (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *undo, op_editop_t editop, val_value_t *newval, val_value_t *curval, obj_template_t *callback_obj, boolean indelete, boolean in_reverse_delete, agt_cfg_nested_silcall_t **result) |
Malloc and fill in a new nested SIL callback record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_find_undo_node (agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode) |
Find an undo node. More... | |
agt_cfg_undo_rec_t * | agt_cfg_first_child_edit (agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode) |
Get the first child node edit record for a given transaction. More... | |
agt_cfg_undo_rec_t * | agt_cfg_next_child_edit (agt_cfg_undo_rec_t *curedit) |
Get the next child node edit record for a given transaction. More... | |
void | agt_cfg_child_edit_fields (agt_cfg_undo_rec_t *child_undo, op_editop_t *editop, val_value_t **newval, val_value_t **curval) |
Get the child edit fields from the undo record. More... | |
void | agt_cfg_dump_undo (agt_cfg_undo_rec_t *undo) |
Debug log a description of the undo record. More... | |
void | agt_cfg_restore_newnode (agt_cfg_undo_rec_t *undo) |
Swap the newnode and newnode_pointers. More... | |
boolean | agt_cfg_use_child_undo (agt_cfg_undo_rec_t *undo, agt_cfg_undo_rec_t *child_undo) |
Check if the child edit node should be invoked. More... | |
agt_cfg_undo_rec_t * | agt_cfg_first_undo (agt_cfg_transaction_t *txcb) |
Get the first undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_next_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo) |
Get the next undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_last_undo (agt_cfg_transaction_t *txcb) |
Get the last undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_prev_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo) |
Get the prev undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_first_child_undo (agt_cfg_undo_rec_t *undo) |
Get the first child undo record for EDIT2 mode. More... | |
agt_cfg_undo_rec_t * | agt_cfg_next_child_undo (agt_cfg_undo_rec_t *cur_undo) |
Get the next child undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_find_child_undo_node (agt_cfg_undo_rec_t *parent_undo, val_value_t *newnode, val_value_t *curnode) |
Find a child undo node. More... | |
boolean | agt_cfg_ascendant_lists_check (val_value_t *test_val, val_value_t *next_parent) |
Test an undo node within specified parent list. More... | |
agt_cfg_undo_rec_t * | agt_cfg_find_undo_node_slow (agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode) |
Find an undo node and check for the ascendant lists match. More... | |
boolean | agt_cfg_find_duplicate_silcall (agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode) |
Check if there is already the same callback in the nested silcall. More... | |
boolean | agt_cfg_check_parent_edits (agt_cfg_transaction_t *txcb, val_value_t *newnode) |
Make sure that current undo is unique and does not have the same undo in different parent undo. More... | |
agt_cfg_trans_hook_t * | agt_cfg_new_trans_hook (obj_template_t *target_obj, val_value_t *newval, val_value_t *curval, op_editop_t editop) |
Create and fill in a Trans Hook callback back pointer. More... | |
void | agt_cfg_free_trans_hook (agt_cfg_trans_hook_t *hook) |
Clean and free a malloced Trans Hook callback. More... | |
agt_cfg_trans_hook_t * | agt_cfg_first_trans_hook (agt_cfg_transaction_t *txcb) |
Get the first transaction hook record. More... | |
agt_cfg_trans_hook_t * | agt_cfg_next_trans_hook (agt_cfg_trans_hook_t *cur_hook) |
Get the next Transaction Hook callback. More... | |
agt_cfg_trans_hook_t * | agt_cfg_last_trans_hook (agt_cfg_transaction_t *txcb) |
Get the last Transaction Hook entry. More... | |
agt_cfg_trans_hook_t * | agt_cfg_prev_trans_hook (agt_cfg_trans_hook_t *cur_hook) |
Get the previous Trans Hook entry. More... | |
boolean | agt_cfg_check_hook_created (agt_cfg_transaction_t *txcb, val_value_t *newval, val_value_t *curval) |
Check if the Transaction Hook has been already setup for the current undo record or newval/curval values. More... | |
agt_cfg_undo_rec_t * | agt_cfg_first_active_undo (agt_cfg_transaction_t *txcb) |
Get the first active undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_next_active_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo) |
Get the next active undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_last_active_undo (agt_cfg_transaction_t *txcb) |
Get the last active undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_prev_active_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo) |
Get the prev active undo record. More... | |
void | agt_cfg_clear_config_txid (agt_cfg_transaction_t *txcb, cfg_template_t *cfg) |
Clear current config txid if any. More... | |
agt_cfg_undo_rec_t * | agt_cfg_last_active_child_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *parent_undo) |
Get the last active child undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_prev_active_child_undo (agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo) |
Get the prev active child undo record. More... | |
agt_cfg_undo_rec_t * | agt_cfg_find_undo_node_ascendant (agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode) |
Find an undo node and check for the ascendant lists match. More... | |
agt_cfg_nested_silcall_t * | agt_cfg_find_nested_silcall (dlq_hdr_t *silcallQ, val_value_t *newnode, val_value_t *curnode) |
Match nested callback in provided undo record nested silcall Queue. More... | |
boolean | agt_cfg_has_added_edits (agt_cfg_transaction_t *txcb) |
Check if there are added edits in the Queue. More... | |
boolean | agt_cfg_undo_match (agt_cfg_undo_rec_t *undo, val_value_t *newnode, val_value_t *curnode) |
Check if provided undo is the one for newval and curval. More... | |
val_value_t * | agt_cfg_generate_edit2_newval (agt_cfg_transaction_t *txcb, val_value_t *newval, val_value_t *curval) |
Generate newval from child_edits. More... | |
uint32 | agt_cfg_transaction_edit_count (agt_cfg_transaction_t *txcb) |
Check the undo record count for the transaction. More... | |
agt_cfg_set_hook_t * | agt_cfg_new_set_hook (obj_template_t *target_obj, val_value_t *newval, val_value_t *curval, op_editop_t editop) |
Create and fill in a Set Hook callback back pointer. More... | |
void | agt_cfg_free_set_hook (agt_cfg_set_hook_t *hook) |
Clean and free a malloced Set Hook callback. More... | |
agt_cfg_set_hook_t * | agt_cfg_first_set_hook (agt_cfg_transaction_t *txcb) |
Get the first Set Hook record. More... | |
agt_cfg_set_hook_t * | agt_cfg_next_set_hook (agt_cfg_set_hook_t *cur_hook) |
Get the next Set Hook callback. More... | |
agt_cfg_set_hook_t * | agt_cfg_get_first_expanded_sethook (agt_cfg_transaction_t *txcb) |
Get the first expanded Set Hook entry that was expanded. More... | |
agt_cfg_set_hook_t * | agt_cfg_get_next_expanded_sethook (agt_cfg_set_hook_t *cur_hook) |
Get the next expanded Set Hook entry that was expanded. More... | |
Functions to manage the edit transaction.
A separate transaction is used for each datastore. Edits to candidate use one transaction, then the commit to running is a separate transaction.
status_t agt_cfg_add_edit2_silcall | ( | agt_cfg_transaction_t * | txcb, |
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval, | ||
dlq_hdr_t * | subsysQ, | ||
val_value_t * | callval | ||
) |
Create and fill in a remote SIL callback back pointer.
Add it to the transaction control block silcall Q
txcb | transaction control block to use |
editop | operation to use in SIL callback |
newval | new value struct to use in SIL callback |
curval | current value to use in SIL callback |
subsysQ | Q of subsystem IDs that registered for this object Q of agt_cb_subsys_t |
callval | the value node that is being called (may be ancestor) |
status_t agt_cfg_add_hook_silcall | ( | agt_cfg_transaction_t * | txcb, |
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval, | ||
dlq_hdr_t * | subsysQ, | ||
val_value_t * | callval, | ||
agt_hook_type_t | hook_type | ||
) |
Create and fill in a remote Hook SIL callback back pointer Add it to the transaction control block silcall Q.
txcb | transaction control block to use |
editop | operation to use in SIL callback |
newval | new value struct to use in SIL callback |
curval | current value to use in SIL callback |
subsysQ | Q of subsystem IDs that registered for this object Q of agt_cb_subsys_t |
callval | the value node that is being called (may be ancestor) |
hook_type | hook type to use |
status_t agt_cfg_add_nested_silcall | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | undo, | ||
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval, | ||
obj_template_t * | callback_obj, | ||
boolean | indelete, | ||
boolean | in_reverse_delete, | ||
agt_cfg_nested_silcall_t ** | result | ||
) |
Malloc and fill in a new nested SIL callback record.
Add it to the specified undo record
txcb | transaction control block to use | |
undo | undo record in progress (may be NULL) | |
editop | operation to use in SIL callback | |
newval | new value struct to use in SIL callback | |
curval | current value to use in SIL callback | |
callback_obj | object template for the callback function | |
indelete | TRUE if in middle of a sil-delete-children-first callback; FALSE if not | |
in_reverse_delete | currently in reverse-edit delete. Save all the silcalls into a simple linear Queue that will be reversed in the end. Used during combination of: –delete-children-first + –sil-prio-reverse-for-deletes
| |
[out] | result | address of return result nested_silcall *result pointer to malloced and added nested_silcall |
status_t agt_cfg_add_silcall | ( | agt_cfg_transaction_t * | txcb, |
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval, | ||
dlq_hdr_t * | subsysQ, | ||
val_value_t * | callval | ||
) |
Create and fill in a remote SIL callback back pointer Add it to the transaction control block silcall Q.
txcb | transaction control block to use |
editop | operation to use in SIL callback |
newval | new value struct to use in SIL callback |
curval | current value to use in SIL callback |
subsysQ | Q of subsystem IDs that registered for this object Q of agt_cb_subsys_t |
callval | the value node that is being called (may be ancestor) |
boolean agt_cfg_ascendant_lists_check | ( | val_value_t * | test_val, |
val_value_t * | next_parent | ||
) |
Test an undo node within specified parent list.
Used in edit2 terminal node handling to make sure that server will pick the right undo for the proper edit and proper list entry.
test_val | test node value to use (from undo) |
next_parent | parent node value to use |
boolean agt_cfg_check_hook_created | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newval, | ||
val_value_t * | curval | ||
) |
Check if the Transaction Hook has been already setup for the current undo record or newval/curval values.
The newval or curval MUST be a list object nodes
txcb | transaction in progress |
newval | new value struct to use in callback |
curval | current value to use in callback |
boolean agt_cfg_check_parent_edits | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode | ||
) |
Make sure that current undo is unique and does not have the same undo in different parent undo.
newnode must be set
txcb | transaction in progress |
newnode | new node value to use |
void agt_cfg_child_edit_fields | ( | agt_cfg_undo_rec_t * | child_undo, |
op_editop_t * | editop, | ||
val_value_t ** | newval, | ||
val_value_t ** | curval | ||
) |
Get the child edit fields from the undo record.
child_undo | child undo record that was returned | |
[out] | editop | address of return editop |
[out] | newval | address of return new value |
[out] | curval | address of return current value |
void agt_cfg_clean_undorec | ( | agt_cfg_undo_rec_t * | undo | ) |
Clean all the memory used by the specified agt_cfg_undo_rec_t but do not free the struct itself.
!!! The caller must free internal pointers that were malloced !!! instead of copied. This function does not check them!!!
undo | agt_cfg_undo_rec_t to clean |
void agt_cfg_cleanup_transactions | ( | const xmlChar * | txidfile | ) |
Cleanup the transaction ID functionality.
txidfile | TXID filespec to use |
void agt_cfg_clear_config_txid | ( | agt_cfg_transaction_t * | txcb, |
cfg_template_t * | cfg | ||
) |
Clear current config txid if any.
txcb | transaction struct to free |
cfg | datastore descriptor |
void agt_cfg_dump_undo | ( | agt_cfg_undo_rec_t * | undo | ) |
Debug log a description of the undo record.
undo | undo record to dump |
agt_cfg_undo_rec_t * agt_cfg_find_child_undo_node | ( | agt_cfg_undo_rec_t * | parent_undo, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Find a child undo node.
Used in unload mode to make sure the same nodes do not get deleted twice
1 of newnode or curnode must be set
parent_undo | parent undo record |
newnode | new node value to find |
curnode | current node value to find |
boolean agt_cfg_find_duplicate_silcall | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Check if there is already the same callback in the nested silcall.
In case of complex, nested edit with multiple list entries update.
This check is needed for undo->edit2_merge = TRUE case. In this case server will start undo for the parent as a separate undo for every complex object (list/container). But when agt_val_silcall will Start to setup of transaction callbacks in case of nested edit it may create a nested silcall for the same object. So need to make sure that there is no duplicate callbacks in order to prevent the same callback to be invoked multiple times.
newnode and curnode must be set
txcb | transaction in progress |
newnode | new node value to find |
curnode | current node value to find |
agt_cfg_nested_silcall_t * agt_cfg_find_nested_silcall | ( | dlq_hdr_t * | silcallQ, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Match nested callback in provided undo record nested silcall Queue.
silcallQ | original top level silcall to check |
newnode | new node value to find |
curnode | current node value to find |
agt_cfg_undo_rec_t * agt_cfg_find_undo_node | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Find an undo node.
Used in unload mode to make sure the same nodes do not get deleted twice
1 of newnode or curnode must be set
txcb | transaction in progress |
newnode | new node value to find |
curnode | current node value to find |
agt_cfg_undo_rec_t * agt_cfg_find_undo_node_ascendant | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Find an undo node and check for the ascendant lists match.
DO NOT dive deep into child_undo records, check ONLY parent undo records
txcb | transaction in progress |
newnode | new node value to find |
curnode | current node value to find |
agt_cfg_undo_rec_t * agt_cfg_find_undo_node_slow | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Find an undo node and check for the ascendant lists match.
1 of newnode or curnode must be set
txcb | transaction in progress |
newnode | new node value to find |
curnode | current node value to find |
status_t agt_cfg_finish_new_transaction | ( | ses_cb_t * | scb, |
agt_cfg_transaction_t * | txcb | ||
) |
Call the start transaction callback if it was deferred.
scb | session control block that is used during transaction init |
txcb | transaction to use |
agt_cfg_undo_rec_t * agt_cfg_first_active_undo | ( | agt_cfg_transaction_t * | txcb | ) |
Get the first active undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
agt_cfg_undo_rec_t * agt_cfg_first_child_edit | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Get the first child node edit record for a given transaction.
txcb | transaction control block to clean |
newnode | new value node passed to callback |
curnode | current value node passed to callback |
agt_cfg_undo_rec_t * agt_cfg_first_child_undo | ( | agt_cfg_undo_rec_t * | undo | ) |
Get the first child undo record for EDIT2 mode.
undo | current parent undo record |
agt_cfg_set_hook_t * agt_cfg_first_set_hook | ( | agt_cfg_transaction_t * | txcb | ) |
Get the first Set Hook record.
INTERNAL API
txcb | transaction in progress |
agt_cfg_trans_hook_t * agt_cfg_first_trans_hook | ( | agt_cfg_transaction_t * | txcb | ) |
Get the first transaction hook record.
txcb | transaction in progress |
agt_cfg_undo_rec_t * agt_cfg_first_undo | ( | agt_cfg_transaction_t * | txcb | ) |
Get the first undo record.
txcb | transaction in progress |
void agt_cfg_force_full_root_check | ( | agt_cfg_transaction_t * | txcb | ) |
Tag this transaction as needing a full root check.
txcb | transaction struct to tag |
void agt_cfg_free_auditrec | ( | agt_cfg_audit_rec_t * | auditrec | ) |
Free all the memory used by the specified agt_cfg_audit_rec_t.
auditrec | agt_cfg_audit_rec_t to clean and delete |
void agt_cfg_free_commit_test | ( | agt_cfg_commit_test_t * | commit_test | ) |
Free a previously malloced agt_cfg_commit_test_t struct.
commit_test | commit test record to free |
void agt_cfg_free_set_hook | ( | agt_cfg_set_hook_t * | hook | ) |
Clean and free a malloced Set Hook callback.
hook | pointer to struct to delete |
void agt_cfg_free_silcall | ( | agt_cfg_silcall_t * | silcall | ) |
Clean and free a mallocedremote SIL callback back pointer.
silcall | pointer to struct to delete |
void agt_cfg_free_trans_hook | ( | agt_cfg_trans_hook_t * | hook | ) |
Clean and free a malloced Trans Hook callback.
hook | pointer to struct to delete |
void agt_cfg_free_transaction | ( | agt_cfg_transaction_t * | txcb | ) |
Clean and free a agt_cfg_transaction_t struct.
txcb | transaction struct to free |
void agt_cfg_free_undorec | ( | agt_cfg_undo_rec_t * | undo | ) |
Free all the memory used by the specified agt_cfg_undo_rec_t.
undo | agt_cfg_undo_rec_t to clean and delete |
val_value_t * agt_cfg_generate_edit2_newval | ( | agt_cfg_transaction_t * | txcb, |
val_value_t * | newval, | ||
val_value_t * | curval | ||
) |
Generate newval from child_edits.
Clone just the newval with no children except keys. Below add actual children from child_edit to this value Deleted nodes from child_edit is ignored
YPW-2162: Newval for EDIT2 callbacks is not consistent across candidate and running processing
txcb | transaction in progress |
newval | node from PDU |
curval | node from database (if any) |
agt_cfg_set_hook_t * agt_cfg_get_first_expanded_sethook | ( | agt_cfg_transaction_t * | txcb | ) |
Get the first expanded Set Hook entry that was expanded.
INTERNAL API
txcb | transaction in progress |
agt_cfg_set_hook_t * agt_cfg_get_next_expanded_sethook | ( | agt_cfg_set_hook_t * | cur_hook | ) |
Get the next expanded Set Hook entry that was expanded.
INTERNAL API
cur_hook | current hook record |
boolean agt_cfg_has_added_edits | ( | agt_cfg_transaction_t * | txcb | ) |
Check if there are added edits in the Queue.
txcb | transaction in progress |
status_t agt_cfg_init_transactions | ( | const xmlChar * | txidfile, |
boolean | foundfile | ||
) |
Initialize the transaction ID functionality.
txidfile | TXID filespec to use |
foundfile | TRUE if file found; FALSE if this is first write |
void agt_cfg_init_undorec | ( | agt_cfg_undo_rec_t * | undo | ) |
Initialize a new agt_cfg_undo_rec_t struct.
undo | cfg_undo_rec_t memory to initialize |
agt_cfg_undo_rec_t * agt_cfg_last_active_child_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | parent_undo | ||
) |
Get the last active child undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
parent_undo | parent undo record |
agt_cfg_undo_rec_t * agt_cfg_last_active_undo | ( | agt_cfg_transaction_t * | txcb | ) |
Get the last active undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
agt_cfg_trans_hook_t * agt_cfg_last_trans_hook | ( | agt_cfg_transaction_t * | txcb | ) |
Get the last Transaction Hook entry.
txcb | transaction in progress |
agt_cfg_undo_rec_t * agt_cfg_last_undo | ( | agt_cfg_transaction_t * | txcb | ) |
Get the last undo record.
txcb | transaction in progress |
agt_cfg_audit_rec_t * agt_cfg_new_auditrec | ( | const xmlChar * | target, |
op_editop_t | editop | ||
) |
Malloc and initialize a new agt_cfg_audit_rec_t struct.
target | i-i string of edit target |
editop | edit operation enum |
agt_cfg_commit_test_t * agt_cfg_new_commit_test | ( | void | ) |
Malloc a agt_cfg_commit_test_t struct.
agt_cfg_set_hook_t * agt_cfg_new_set_hook | ( | obj_template_t * | target_obj, |
val_value_t * | newval, | ||
val_value_t * | curval, | ||
op_editop_t | editop | ||
) |
Create and fill in a Set Hook callback back pointer.
INTERNAL API
target_obj | object that holds the callback |
newval | new value struct to use in callback |
curval | current value to use in callback |
editop | operation to use in callback |
agt_cfg_silcall_t * agt_cfg_new_silcall | ( | op_editop_t | editop, |
val_value_t * | newval, | ||
val_value_t * | curval, | ||
dlq_hdr_t * | subsysQ | ||
) |
Create and fill in a remote SIL callback back pointer.
editop | operation to use in SIL callback |
newval | new value struct to use in SIL callback |
curval | current value to use in SIL callback |
subsysQ | Q of subsystem IDs that registered for this object Q of agt_cb_subsys_t |
agt_cfg_trans_hook_t * agt_cfg_new_trans_hook | ( | obj_template_t * | target_obj, |
val_value_t * | newval, | ||
val_value_t * | curval, | ||
op_editop_t | editop | ||
) |
Create and fill in a Trans Hook callback back pointer.
target_obj | object that holds the callback |
newval | new value struct to use in callback |
curval | current value to use in callback |
editop | operation to use in callback |
agt_cfg_transaction_t * agt_cfg_new_transaction | ( | ncx_cfg_t | cfgid, |
agt_cfg_edit_type_t | edit_type, | ||
boolean | rootcheck, | ||
boolean | is_validate, | ||
boolean | is_rollback, | ||
status_t * | res | ||
) |
Malloc and initialize agt_cfg_transaction_t struct.
cfgid | config ID to use | |
edit_type | database edit type | |
rootcheck | TRUE if root_check needs to be done before commit during agt_val_apply_write; FALSE if it is done manually via agt_val_root_check | |
is_validate | TRUE if this is a <validate> operation the target data nodes will not be altered at all during the transaction FALSE if this is some sort of real edit | |
is_rollback | TRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation FALSE if this is some other type of transaction | |
[out] | res | address of return status; *res return status |
agt_cfg_transaction_t * agt_cfg_new_transaction_ex | ( | ncx_cfg_t | cfgid, |
agt_cfg_edit_type_t | edit_type, | ||
boolean | rootcheck, | ||
boolean | is_validate, | ||
boolean | is_rollback, | ||
boolean | no_cb, | ||
status_t * | res | ||
) |
Malloc and initialize agt_cfg_transaction_t struct Extended.
cfgid | config ID to use | |
edit_type | database edit type | |
rootcheck | TRUE if root_check needs to be done before commit during agt_val_apply_write; FALSE if it is done manually via agt_val_root_check | |
is_validate | TRUE if this is a <validate> operation the target data nodes will not be altered at all during the transaction FALSE if this is some sort of real edit | |
is_rollback | TRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation FALSE if this is some other type of transaction | |
no_cb | true to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction | |
[out] | res | address of return status; *res return status |
agt_cfg_transaction_t * agt_cfg_new_transaction_ex2 | ( | ncx_cfg_t | cfgid, |
agt_cfg_edit_type_t | edit_type, | ||
boolean | rootcheck, | ||
boolean | is_validate, | ||
boolean | is_rollback, | ||
boolean | no_cb, | ||
ses_cb_t * | scb, | ||
status_t * | res | ||
) |
Malloc and initialize agt_cfg_transaction_t struct Extended2.
cfgid | config ID to use | |
edit_type | database edit type | |
rootcheck | TRUE if root_check needs to be done before commit during agt_val_apply_write; FALSE if it is done manually via agt_val_root_check | |
is_validate | TRUE if this is a <validate> operation the target data nodes will not be altered at all during the transaction FALSE if this is some sort of real edit | |
is_rollback | TRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation FALSE if this is some other type of transaction | |
no_cb | true to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction | |
scb | session control block that is used during transaction init | |
[out] | res | address of return status; *res return status |
agt_cfg_transaction_t * agt_cfg_new_transaction_ex3 | ( | ncx_cfg_t | cfgid, |
agt_cfg_edit_type_t | edit_type, | ||
boolean | rootcheck, | ||
boolean | is_validate, | ||
boolean | is_rollback, | ||
boolean | no_cb, | ||
boolean | no_silsa_cb, | ||
ses_cb_t * | scb, | ||
status_t * | res | ||
) |
Malloc and initialize agt_cfg_transaction_t struct Extended3.
cfgid | config ID to use | |
edit_type | database edit type | |
rootcheck | TRUE if root_check needs to be done before commit during agt_val_apply_write; FALSE if it is done manually via agt_val_root_check | |
is_validate | TRUE if this is a <validate> operation the target data nodes will not be altered at all during the transaction FALSE if this is some sort of real edit | |
is_rollback | TRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation FALSE if this is some other type of transaction | |
no_cb | true to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction | |
no_silsa_cb | true to skip start transaction callback for SIL-SA false = normal invocation. Used for Load-config | |
scb | session control block that is used during transaction init | |
[out] | res | address of return status; *res return status |
agt_cfg_undo_rec_t * agt_cfg_new_undorec | ( | void | ) |
Malloc and initialize a new agt_cfg_undo_rec_t struct.
agt_cfg_undo_rec_t * agt_cfg_next_active_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | cur_undo | ||
) |
Get the next active undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
cur_undo | current undo record |
agt_cfg_undo_rec_t * agt_cfg_next_child_edit | ( | agt_cfg_undo_rec_t * | curedit | ) |
Get the next child node edit record for a given transaction.
curedit | pointer to the current child edit |
agt_cfg_undo_rec_t * agt_cfg_next_child_undo | ( | agt_cfg_undo_rec_t * | cur_undo | ) |
Get the next child undo record.
cur_undo | current child undo record |
agt_cfg_set_hook_t * agt_cfg_next_set_hook | ( | agt_cfg_set_hook_t * | cur_hook | ) |
Get the next Set Hook callback.
INTERNAL API
cur_hook | current hook record |
agt_cfg_trans_hook_t * agt_cfg_next_trans_hook | ( | agt_cfg_trans_hook_t * | cur_hook | ) |
Get the next Transaction Hook callback.
cur_hook | current hook record |
agt_cfg_undo_rec_t * agt_cfg_next_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | cur_undo | ||
) |
Get the next undo record.
txcb | transaction in progress |
cur_undo | current undo record |
agt_cfg_undo_rec_t * agt_cfg_prev_active_child_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | cur_undo | ||
) |
Get the prev active child undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
cur_undo | current undo record |
agt_cfg_undo_rec_t * agt_cfg_prev_active_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | cur_undo | ||
) |
Get the prev active undo record.
Skip over force deleted undo by FALSE when check
txcb | transaction in progress |
cur_undo | current undo record |
agt_cfg_trans_hook_t * agt_cfg_prev_trans_hook | ( | agt_cfg_trans_hook_t * | cur_hook | ) |
Get the previous Trans Hook entry.
cur_hook | current hook record |
agt_cfg_undo_rec_t * agt_cfg_prev_undo | ( | agt_cfg_transaction_t * | txcb, |
agt_cfg_undo_rec_t * | cur_undo | ||
) |
Get the prev undo record.
txcb | transaction in progress |
cur_undo | current undo record |
void agt_cfg_remove_module_commit_tests | ( | ncx_module_t * | mod | ) |
Remove module commit tests for specified module.
mod | module to check and remove tests for |
agt_cfg_transaction_t * agt_cfg_rerun_transaction | ( | ncx_cfg_t | cfgid, |
agt_cfg_edit_type_t | edit_type, | ||
boolean | rootcheck, | ||
boolean | is_validate, | ||
boolean | is_rollback, | ||
boolean | no_silsa_cb, | ||
ncx_transaction_id_t | txid, | ||
ses_cb_t * | scb, | ||
status_t * | res | ||
) |
Malloc and initialize agt_cfg_transaction_t struct.
Do not allocate the next TXID from the global counter, but rather use the provided TXID Do not set the last-modified timestamp to 'now' but rather use the provided last-modified timestamp
cfgid | config ID to use | |
edit_type | database edit type | |
rootcheck | TRUE if root_check needs to be done before commit during agt_val_apply_write; FALSE if it is done manually via agt_val_root_check | |
is_validate | TRUE if this is a <validate> operation the target data nodes will not be altered at all during the transaction FALSE if this is some sort of real edit | |
is_rollback | TRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation FALSE if this is some other type of transaction | |
no_silsa_cb | true to skip start transaction callback for SIL-SA false = normal invocation. Used for Load-config | |
txid | transaction ID to use | |
scb | session control block that is used during transaction init | |
[out] | res | address of return status; *res return status |
void agt_cfg_restore_newnode | ( | agt_cfg_undo_rec_t * | undo | ) |
Swap the newnode and newnode_pointers.
undo | undo record to use |
void agt_cfg_set_transaction_commit | ( | agt_cfg_transaction_t * | txcb | ) |
Tag this transaction as a commit from candidate to running.
txcb | transaction struct to tag |
void agt_cfg_set_transaction_unload | ( | agt_cfg_transaction_t * | txcb | ) |
Tag this transaction as a commit for unloading a module.
txcb | transaction struct to tag |
uint32 agt_cfg_transaction_edit_count | ( | agt_cfg_transaction_t * | txcb | ) |
Check the undo record count for the transaction.
txcb | transaction struct to check |
boolean agt_cfg_transaction_is_unload | ( | agt_cfg_transaction_t * | txcb | ) |
Check if this transaction is a commit for unloading a module.
txcb | transaction struct to tag |
ncx_transaction_id_t agt_cfg_txid_in_progress | ( | ncx_cfg_t | cfgid | ) |
Return the ID of the current transaction ID in progress.
cfgid | config ID to check |
boolean agt_cfg_undo_match | ( | agt_cfg_undo_rec_t * | undo, |
val_value_t * | newnode, | ||
val_value_t * | curnode | ||
) |
Check if provided undo is the one for newval and curval.
undo | undo to check |
newnode | new node in operation |
curnode | current node in operation |
boolean agt_cfg_use_child_undo | ( | agt_cfg_undo_rec_t * | undo, |
agt_cfg_undo_rec_t * | child_undo | ||
) |
Check if the child edit node should be invoked.
undo | parent undo record |
child_undo | child undo (or NULL) |