yumapro
24.10-2
YumaPro SDK
|
Manage Server configuration edit transactions. More...
#include <time.h>
#include "agt.h"
#include "cfg.h"
#include "dlq.h"
#include "ncxtypes.h"
#include "op.h"
#include "status.h"
#include "val.h"
#include "xpath.h"
Go to the source code of this file.
Data Structures | |
struct | agt_cfg_transaction_t |
Transaction Control Block. More... | |
struct | agt_cfg_nested_silcall_t |
struct of data for 1 nested SIL callback within 1 undo. More... | |
struct | agt_cfg_undo_rec_t |
struct of params to undo an edit operation. More... | |
struct | agt_cfg_child_silcall_t |
struct of data for 1 children of one remote SIL callback More... | |
struct | agt_cfg_silcall_t |
struct of data for 1 remote SIL callback More... | |
struct | agt_cfg_audit_rec_t |
struct of params to use when generating sysConfigChange notification. More... | |
struct | agt_cfg_commit_test_t |
struct for the commit-time tests for a single object More... | |
struct | agt_cfg_xpath_visit_t |
struct to keep track of XPath tests run in this transaction More... | |
struct | agt_cfg_trans_hook_t |
struct of Transaction Hooks parameters More... | |
struct | agt_cfg_set_hook_t |
struct of Set Hooks parameters More... | |
Macros | |
#define | AGT_CFG_SET_VALIDATE_DEF(C) (C)->is_validate_def = TRUE |
set the validate-only flag | |
#define | AGT_CFG_GET_VALIDATE_DEF(C) (C)->is_validate_def |
check the validate-only flag | |
#define | AGT_CFG_SET_SKIP_SIL(C) (C)->skip_sil = TRUE |
set the skip SIL callback flag | |
#define | AGT_CFG_GET_SKIP_SIL(C) (C)->skip_sil |
check the skip SIL callback flag | |
#define | AGT_CFG_SET_SKIP_SIL_PARTIAL(C) (C)->skip_sil_partial = TRUE |
set the skip SIL partial callback flag | |
#define | AGT_CFG_GET_SKIP_SIL_PARTIAL(C) (C)->skip_sil_partial |
check the skip SIL partial callback flag | |
#define | AGT_CFG_SET_SKIP_SAVE(C) (C)->skip_save = TRUE |
set the skip save flag | |
#define | AGT_CFG_GET_SKIP_SAVE(C) (C)->skip_save |
check the skip save flag | |
#define | AGT_CFG_GET_COMMENT(C) (C)->comment |
get the transaction comment | |
#define | AGT_CFG_SET_COMMENT(C, S) (C)->comment = S |
set the transaction comment | |
#define | AGT_CFG_GET_TXCB(M) (M)->rpc_txcb |
rpc_msg_t has a pointer to the transaction in progress for that message | |
#define | AGT_CFG_SET_CUR_SILCALL(C, S) (C)->cur_silcall = S |
set the current SIL callback | |
#define | AGT_CFG_GET_CUR_SILCALL(C) (C)->cur_silcall |
get the current SIL callback | |
#define | AGT_CFG_SET_TOP_REPLACE(C) (C)->top_replace = TRUE |
set the top replace mode | |
#define | AGT_CFG_IS_TOP_REPLACE(C) (C)->top_replace |
check the top replace mode | |
#define | AGT_CFG_NEWMPIDQ(C) &((C)->newmpidQ) |
access the newmpidQ of backptrs | |
#define | AGT_CFG_CHECK_REDO(C) (C)->check_redo_root_check |
access the check_redo_root_check | |
#define | AGT_CFG_IS_CC_TIMEOUT(C) (C)->is_cc_timeout |
access the confirmed-commit timeout flag | |
#define | AGT_CFG_TEST_ONLY_CLEANUP(C) (C)->test_only_cleanup |
access the test_only_cleanup flag | |
Enumerations | |
enum | agt_cfg_edit_action_t { AGT_CFG_EDIT_ACTION_NONE , AGT_CFG_EDIT_ACTION_ADD , AGT_CFG_EDIT_ACTION_SET , AGT_CFG_EDIT_ACTION_MOVE , AGT_CFG_EDIT_ACTION_REPLACE , AGT_CFG_EDIT_ACTION_DELETE , AGT_CFG_EDIT_ACTION_DELETE_DEFAULT } |
classify the config edit action type More... | |
enum | agt_cfg_edit_type_t { AGT_CFG_EDIT_TYPE_NONE , AGT_CFG_EDIT_TYPE_FULL , AGT_CFG_EDIT_TYPE_PARTIAL } |
classify the config edit type 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... | |
Manage Server configuration edit transactions.