yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
Configuration Edit Access Functions

Functions to manage the edit transaction. More...

Collaboration diagram for Configuration Edit Access Functions:

Functions

agt_cfg_transaction_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_cfg_first_undo (agt_cfg_transaction_t *txcb)
 Get the first undo record. More...
 
agt_cfg_undo_rec_tagt_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_tagt_cfg_last_undo (agt_cfg_transaction_t *txcb)
 Get the last undo record. More...
 
agt_cfg_undo_rec_tagt_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_tagt_cfg_first_child_undo (agt_cfg_undo_rec_t *undo)
 Get the first child undo record for EDIT2 mode. More...
 
agt_cfg_undo_rec_tagt_cfg_next_child_undo (agt_cfg_undo_rec_t *cur_undo)
 Get the next child undo record. More...
 
agt_cfg_undo_rec_tagt_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_tagt_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_tagt_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_tagt_cfg_first_trans_hook (agt_cfg_transaction_t *txcb)
 Get the first transaction hook record. More...
 
agt_cfg_trans_hook_tagt_cfg_next_trans_hook (agt_cfg_trans_hook_t *cur_hook)
 Get the next Transaction Hook callback. More...
 
agt_cfg_trans_hook_tagt_cfg_last_trans_hook (agt_cfg_transaction_t *txcb)
 Get the last Transaction Hook entry. More...
 
agt_cfg_trans_hook_tagt_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_tagt_cfg_first_active_undo (agt_cfg_transaction_t *txcb)
 Get the first active undo record. More...
 
agt_cfg_undo_rec_tagt_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_tagt_cfg_last_active_undo (agt_cfg_transaction_t *txcb)
 Get the last active undo record. More...
 
agt_cfg_undo_rec_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_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_tagt_cfg_first_set_hook (agt_cfg_transaction_t *txcb)
 Get the first Set Hook record. More...
 
agt_cfg_set_hook_tagt_cfg_next_set_hook (agt_cfg_set_hook_t *cur_hook)
 Get the next Set Hook callback. More...
 
agt_cfg_set_hook_tagt_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_tagt_cfg_get_next_expanded_sethook (agt_cfg_set_hook_t *cur_hook)
 Get the next expanded Set Hook entry that was expanded. More...
 

Detailed Description

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.

Function Documentation

◆ agt_cfg_add_edit2_silcall()

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

Parameters
txcbtransaction control block to use
editopoperation to use in SIL callback
newvalnew value struct to use in SIL callback
curvalcurrent value to use in SIL callback
subsysQQ of subsystem IDs that registered for this object
Q of agt_cb_subsys_t
callvalthe value node that is being called (may be ancestor)
Returns
status
Here is the call graph for this function:

◆ agt_cfg_add_hook_silcall()

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.

Parameters
txcbtransaction control block to use
editopoperation to use in SIL callback
newvalnew value struct to use in SIL callback
curvalcurrent value to use in SIL callback
subsysQQ of subsystem IDs that registered for this object
Q of agt_cb_subsys_t
callvalthe value node that is being called (may be ancestor)
hook_typehook type to use
Returns
status
Here is the call graph for this function:

◆ agt_cfg_add_nested_silcall()

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

Parameters
txcbtransaction control block to use
undoundo record in progress (may be NULL)
editopoperation to use in SIL callback
newvalnew value struct to use in SIL callback
curvalcurrent value to use in SIL callback
callback_objobject template for the callback function
indeleteTRUE if in middle of a sil-delete-children-first callback; FALSE if not
in_reverse_deletecurrently 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
  • delete operation on the undo record
[out]resultaddress of return result nested_silcall
*result pointer to malloced and added nested_silcall
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_add_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.

Parameters
txcbtransaction control block to use
editopoperation to use in SIL callback
newvalnew value struct to use in SIL callback
curvalcurrent value to use in SIL callback
subsysQQ of subsystem IDs that registered for this object
Q of agt_cb_subsys_t
callvalthe value node that is being called (may be ancestor)
Returns
status
Here is the call graph for this function:

◆ agt_cfg_ascendant_lists_check()

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.

Parameters
test_valtest node value to use (from undo)
next_parentparent node value to use
Returns
TRUE if all parent lists match
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_check_hook_created()

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

Parameters
txcbtransaction in progress
newvalnew value struct to use in callback
curvalcurrent value to use in callback
Returns
TRUE if the agt_cfg_trans_hook_t block exist for the values; FALSE otherwise
Here is the call graph for this function:

◆ agt_cfg_check_parent_edits()

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

Parameters
txcbtransaction in progress
newnodenew node value to use
Returns
TRUE if there is already parent undo with the same child undo
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_child_edit_fields()

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.

Parameters
child_undochild undo record that was returned
[out]editopaddress of return editop
[out]newvaladdress of return new value
[out]curvaladdress of return current value
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_clean_undorec()

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!!!
Parameters
undoagt_cfg_undo_rec_t to clean

◆ agt_cfg_cleanup_transactions()

void agt_cfg_cleanup_transactions ( const xmlChar *  txidfile)

Cleanup the transaction ID functionality.

Parameters
txidfileTXID filespec to use
Here is the call graph for this function:

◆ agt_cfg_clear_config_txid()

void agt_cfg_clear_config_txid ( agt_cfg_transaction_t txcb,
cfg_template_t cfg 
)

Clear current config txid if any.

Parameters
txcbtransaction struct to free
cfgdatastore descriptor
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_dump_undo()

void agt_cfg_dump_undo ( agt_cfg_undo_rec_t undo)

Debug log a description of the undo record.

Parameters
undoundo record to dump
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_find_child_undo_node()

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

Parameters
parent_undoparent undo record
newnodenew node value to find
curnodecurrent node value to find
Returns
pointer to found undo node
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_find_duplicate_silcall()

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

Parameters
txcbtransaction in progress
newnodenew node value to find
curnodecurrent node value to find
Returns
TRUE if there is duplicates
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_find_nested_silcall()

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.

Parameters
silcallQoriginal top level silcall to check
newnodenew node value to find
curnodecurrent node value to find
Returns
pointer to found nested silcall or NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_find_undo_node()

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

Parameters
txcbtransaction in progress
newnodenew node value to find
curnodecurrent node value to find
Returns
pointer to found undo node
Here is the call graph for this function:

◆ agt_cfg_find_undo_node_ascendant()

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

Parameters
txcbtransaction in progress
newnodenew node value to find
curnodecurrent node value to find
Returns
pointer to found undo node
Here is the call graph for this function:

◆ agt_cfg_find_undo_node_slow()

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

Parameters
txcbtransaction in progress
newnodenew node value to find
curnodecurrent node value to find
Returns
pointer to found undo node
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_finish_new_transaction()

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.

Parameters
scbsession control block that is used during transaction init
txcbtransaction to use
Returns
return status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_first_active_undo()

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

Parameters
txcbtransaction in progress
Returns
pointer to first active undo node
Here is the caller graph for this function:

◆ agt_cfg_first_child_edit()

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.

Parameters
txcbtransaction control block to clean
newnodenew value node passed to callback
curnodecurrent value node passed to callback
Returns
pointer to the undo edit record for the first child node edit
NULL if none found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_first_child_undo()

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.

Parameters
undocurrent parent undo record
Returns
pointer to first child undo node
Here is the caller graph for this function:

◆ agt_cfg_first_set_hook()

agt_cfg_set_hook_t * agt_cfg_first_set_hook ( agt_cfg_transaction_t txcb)

Get the first Set Hook record.

INTERNAL API

Parameters
txcbtransaction in progress
Returns
pointer to first Hook callback
Here is the caller graph for this function:

◆ agt_cfg_first_trans_hook()

agt_cfg_trans_hook_t * agt_cfg_first_trans_hook ( agt_cfg_transaction_t txcb)

Get the first transaction hook record.

Parameters
txcbtransaction in progress
Returns
pointer to first Hook callback

◆ agt_cfg_first_undo()

agt_cfg_undo_rec_t * agt_cfg_first_undo ( agt_cfg_transaction_t txcb)

Get the first undo record.

Parameters
txcbtransaction in progress
Returns
pointer to first undo node
Here is the caller graph for this function:

◆ agt_cfg_force_full_root_check()

void agt_cfg_force_full_root_check ( agt_cfg_transaction_t txcb)

Tag this transaction as needing a full root check.

Parameters
txcbtransaction struct to tag
Here is the caller graph for this function:

◆ agt_cfg_free_auditrec()

void agt_cfg_free_auditrec ( agt_cfg_audit_rec_t auditrec)

Free all the memory used by the specified agt_cfg_audit_rec_t.

Parameters
auditrecagt_cfg_audit_rec_t to clean and delete
Here is the caller graph for this function:

◆ agt_cfg_free_commit_test()

void agt_cfg_free_commit_test ( agt_cfg_commit_test_t commit_test)

Free a previously malloced agt_cfg_commit_test_t struct.

Parameters
commit_testcommit test record to free
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_free_set_hook()

void agt_cfg_free_set_hook ( agt_cfg_set_hook_t hook)

Clean and free a malloced Set Hook callback.

Parameters
hookpointer to struct to delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_free_silcall()

void agt_cfg_free_silcall ( agt_cfg_silcall_t silcall)

Clean and free a mallocedremote SIL callback back pointer.

Parameters
silcallpointer to struct to delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_free_trans_hook()

void agt_cfg_free_trans_hook ( agt_cfg_trans_hook_t hook)

Clean and free a malloced Trans Hook callback.

Parameters
hookpointer to struct to delete
Here is the caller graph for this function:

◆ agt_cfg_free_transaction()

void agt_cfg_free_transaction ( agt_cfg_transaction_t txcb)

Clean and free a agt_cfg_transaction_t struct.

Parameters
txcbtransaction struct to free
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_free_undorec()

void agt_cfg_free_undorec ( agt_cfg_undo_rec_t undo)

Free all the memory used by the specified agt_cfg_undo_rec_t.

Parameters
undoagt_cfg_undo_rec_t to clean and delete
Here is the caller graph for this function:

◆ agt_cfg_generate_edit2_newval()

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

Parameters
txcbtransaction in progress
newvalnode from PDU
curvalnode from database (if any)
Returns
malloced val value; must be freed by caller
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_get_first_expanded_sethook()

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

Parameters
txcbtransaction in progress
Returns
pointer to first Hook callback
Here is the call graph for this function:

◆ agt_cfg_get_next_expanded_sethook()

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

Parameters
cur_hookcurrent hook record
Returns
pointer to next Hook callback
Here is the call graph for this function:

◆ agt_cfg_has_added_edits()

boolean agt_cfg_has_added_edits ( agt_cfg_transaction_t txcb)

Check if there are added edits in the Queue.

Parameters
txcbtransaction in progress
Returns
TRUE if there are added edits in the Queue; FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_init_transactions()

status_t agt_cfg_init_transactions ( const xmlChar *  txidfile,
boolean  foundfile 
)

Initialize the transaction ID functionality.

Parameters
txidfileTXID filespec to use
foundfileTRUE if file found; FALSE if this is first write
Returns
status
Here is the call graph for this function:

◆ agt_cfg_init_undorec()

void agt_cfg_init_undorec ( agt_cfg_undo_rec_t undo)

Initialize a new agt_cfg_undo_rec_t struct.

Parameters
undocfg_undo_rec_t memory to initialize
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_last_active_child_undo()

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

Parameters
txcbtransaction in progress
parent_undoparent undo record
Returns
pointer to last active child undo node
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_last_active_undo()

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

Parameters
txcbtransaction in progress
Returns
pointer to last active undo node
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_last_trans_hook()

agt_cfg_trans_hook_t * agt_cfg_last_trans_hook ( agt_cfg_transaction_t txcb)

Get the last Transaction Hook entry.

Parameters
txcbtransaction in progress
Returns
pointer to last Hook entry
Here is the caller graph for this function:

◆ agt_cfg_last_undo()

agt_cfg_undo_rec_t * agt_cfg_last_undo ( agt_cfg_transaction_t txcb)

Get the last undo record.

Parameters
txcbtransaction in progress
Returns
pointer to last undo node
Here is the caller graph for this function:

◆ agt_cfg_new_auditrec()

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.

Parameters
targeti-i string of edit target
editopedit operation enum
Returns
pointer to struct or NULL or memory error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_new_commit_test()

agt_cfg_commit_test_t * agt_cfg_new_commit_test ( void  )

Malloc a agt_cfg_commit_test_t struct.

Returns
malloced commit test struct or NULL if ERR_INTERNAL_MEM

◆ agt_cfg_new_set_hook()

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

Parameters
target_objobject that holds the callback
newvalnew value struct to use in callback
curvalcurrent value to use in callback
editopoperation to use in callback
Returns
malloced and filled in struct
Here is the call graph for this function:

◆ agt_cfg_new_silcall()

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.

Parameters
editopoperation to use in SIL callback
newvalnew value struct to use in SIL callback
curvalcurrent value to use in SIL callback
subsysQQ of subsystem IDs that registered for this object
Q of agt_cb_subsys_t
Returns
malloced and filled in struct
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_new_trans_hook()

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.

Parameters
target_objobject that holds the callback
newvalnew value struct to use in callback
curvalcurrent value to use in callback
editopoperation to use in callback
Returns
malloced and filled in struct

◆ agt_cfg_new_transaction()

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.

Parameters
cfgidconfig ID to use
edit_typedatabase edit type
rootcheckTRUE 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_validateTRUE 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_rollbackTRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation
FALSE if this is some other type of transaction
[out]resaddress of return status; *res return status
Returns
malloced transaction struct; need to call agt_cfg_free_transaction
Here is the call graph for this function:

◆ agt_cfg_new_transaction_ex()

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.

Parameters
cfgidconfig ID to use
edit_typedatabase edit type
rootcheckTRUE 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_validateTRUE 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_rollbackTRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation
FALSE if this is some other type of transaction
no_cbtrue to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction
[out]resaddress of return status; *res return status
Returns
malloced transaction struct; need to call agt_cfg_free_transaction
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_new_transaction_ex2()

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.

Parameters
cfgidconfig ID to use
edit_typedatabase edit type
rootcheckTRUE 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_validateTRUE 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_rollbackTRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation
FALSE if this is some other type of transaction
no_cbtrue to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction
scbsession control block that is used during transaction init
[out]resaddress of return status; *res return status
Returns
malloced transaction struct; need to call agt_cfg_free_transaction
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_new_transaction_ex3()

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.

Parameters
cfgidconfig ID to use
edit_typedatabase edit type
rootcheckTRUE 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_validateTRUE 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_rollbackTRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation
FALSE if this is some other type of transaction
no_cbtrue to skip start transaction callback; false = normal must call agt_cfg_finish_new_transaction and free the transaction
no_silsa_cbtrue to skip start transaction callback for SIL-SA
false = normal invocation. Used for Load-config
scbsession control block that is used during transaction init
[out]resaddress of return status; *res return status
Returns
malloced transaction struct; need to call agt_cfg_free_transaction
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_new_undorec()

agt_cfg_undo_rec_t * agt_cfg_new_undorec ( void  )

Malloc and initialize a new agt_cfg_undo_rec_t struct.

Returns
pointer to struct or NULL or memory error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_next_active_undo()

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

Parameters
txcbtransaction in progress
cur_undocurrent undo record
Returns
pointer to next undo node
Here is the caller graph for this function:

◆ agt_cfg_next_child_edit()

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.

Parameters
cureditpointer to the current child edit
Returns
pointer to the undo edit record for the next child node edit
NULL if none found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_next_child_undo()

agt_cfg_undo_rec_t * agt_cfg_next_child_undo ( agt_cfg_undo_rec_t cur_undo)

Get the next child undo record.

Parameters
cur_undocurrent child undo record
Returns
pointer to next child undo node
Here is the caller graph for this function:

◆ agt_cfg_next_set_hook()

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

Parameters
cur_hookcurrent hook record
Returns
pointer to next Hook callback
Here is the caller graph for this function:

◆ agt_cfg_next_trans_hook()

agt_cfg_trans_hook_t * agt_cfg_next_trans_hook ( agt_cfg_trans_hook_t cur_hook)

Get the next Transaction Hook callback.

Parameters
cur_hookcurrent hook record
Returns
pointer to next Hook callback

◆ agt_cfg_next_undo()

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.

Parameters
txcbtransaction in progress
cur_undocurrent undo record
Returns
pointer to next undo node
Here is the caller graph for this function:

◆ agt_cfg_prev_active_child_undo()

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

Parameters
txcbtransaction in progress
cur_undocurrent undo record
Returns
pointer to prev active child undo node
Here is the caller graph for this function:

◆ agt_cfg_prev_active_undo()

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

Parameters
txcbtransaction in progress
cur_undocurrent undo record
Returns
pointer to prev active undo node
Here is the caller graph for this function:

◆ agt_cfg_prev_trans_hook()

agt_cfg_trans_hook_t * agt_cfg_prev_trans_hook ( agt_cfg_trans_hook_t cur_hook)

Get the previous Trans Hook entry.

Parameters
cur_hookcurrent hook record
Returns
pointer to previous Hook entry
Here is the caller graph for this function:

◆ agt_cfg_prev_undo()

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.

Parameters
txcbtransaction in progress
cur_undocurrent undo record
Returns
pointer to prev undo node
Here is the caller graph for this function:

◆ agt_cfg_remove_module_commit_tests()

void agt_cfg_remove_module_commit_tests ( ncx_module_t mod)

Remove module commit tests for specified module.

Parameters
modmodule to check and remove tests for
Here is the call graph for this function:

◆ agt_cfg_rerun_transaction()

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

Parameters
cfgidconfig ID to use
edit_typedatabase edit type
rootcheckTRUE 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_validateTRUE 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_rollbackTRUE if this is a confirmed commit timeout or a cancel-confirmed-commit operation
FALSE if this is some other type of transaction
no_silsa_cbtrue to skip start transaction callback for SIL-SA
false = normal invocation. Used for Load-config
txidtransaction ID to use
scbsession control block that is used during transaction init
[out]resaddress of return status; *res return status
Returns
malloced transaction struct; need to call agt_cfg_free_transaction
Here is the call graph for this function:

◆ agt_cfg_restore_newnode()

void agt_cfg_restore_newnode ( agt_cfg_undo_rec_t undo)

Swap the newnode and newnode_pointers.

Parameters
undoundo record to use
Here is the call graph for this function:

◆ agt_cfg_set_transaction_commit()

void agt_cfg_set_transaction_commit ( agt_cfg_transaction_t txcb)

Tag this transaction as a commit from candidate to running.

Parameters
txcbtransaction struct to tag
Here is the caller graph for this function:

◆ agt_cfg_set_transaction_unload()

void agt_cfg_set_transaction_unload ( agt_cfg_transaction_t txcb)

Tag this transaction as a commit for unloading a module.

Parameters
txcbtransaction struct to tag

◆ agt_cfg_transaction_edit_count()

uint32 agt_cfg_transaction_edit_count ( agt_cfg_transaction_t txcb)

Check the undo record count for the transaction.

Parameters
txcbtransaction struct to check
Returns
count of undo records; 0 == empty commit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_transaction_is_unload()

boolean agt_cfg_transaction_is_unload ( agt_cfg_transaction_t txcb)

Check if this transaction is a commit for unloading a module.

Parameters
txcbtransaction struct to tag
Returns
true if marked as an unload module transaction
Here is the caller graph for this function:

◆ agt_cfg_txid_in_progress()

ncx_transaction_id_t agt_cfg_txid_in_progress ( ncx_cfg_t  cfgid)

Return the ID of the current transaction ID in progress.

Parameters
cfgidconfig ID to check
Returns
txid of transaction in progress or 0 if none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cfg_undo_match()

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.

Parameters
undoundo to check
newnodenew node in operation
curnodecurrent node in operation
Returns
TRUE if the undo matches the newval curval FALSE otherwise
Here is the call graph for this function:

◆ agt_cfg_use_child_undo()

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.

Parameters
undoparent undo record
child_undochild undo (or NULL)
Returns
TRUE if object should be skipped
FALSE if object should not be skipped
Here is the call graph for this function:
Here is the caller graph for this function: