yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches

SIL Transactions are initiated from the main server. More...

Collaboration diagram for SIL Transaction APIs:

Data Structures

struct  agt_sil_added_edit_t
 Set Hook added edits from subsystem(s) More...
 

Typedefs

typedef void(* agt_sil_get_walker_fn_t) (getcb_get2_t *get2cb, const xmlChar *subsys_id, status_t get_status, val_value_t *return_val)
 get walker function for processing results from remote GET transaction from 1 or more subsystems More...
 
typedef status_t(* agt_sil_rpc_walker_fn_t) (const xmlChar *subsys_id, status_t rpc_status, val_value_t *return_val, dlq_hdr_t *saveQ)
 RPC walker function for processing results from remote GET transaction from 1 or more subsystems. More...
 
typedef status_t(* agt_sil_shook_walker_fn_t) (ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, const xmlChar *subsys_id, status_t tx_status, dlq_hdr_t *edded_editQ)
 Set Hook walker function. More...
 

Functions

status_t agt_sil_init (void)
 Initialize the SIL features module (phase 2) More...
 
void agt_sil_cleanup (void)
 Cleanup the SIL Features Module. More...
 
status_t agt_sil_start_transaction (agt_cfg_transaction_t *txcb, const xmlChar *user_id, const xmlChar *client_addr, const xmlChar *target, boolean is_validate, boolean is_replay, boolean is_reverse_edit, boolean is_load_config, boolean is_hook_load, boolean is_hook_validate, dlq_hdr_t *editQ)
 Start Transaction Handler. More...
 
status_t agt_sil_continue_start_transaction (agt_cfg_transaction_t *txcb, const xmlChar *user_id, const xmlChar *client_addr, const xmlChar *target, boolean is_replay, dlq_hdr_t *editQ)
 Continue already existed Start Transaction. More...
 
status_t agt_sil_continue_transaction (const xmlChar *txid_str, agt_cbtyp_t cur_phase)
 Continue a transaction to apply or commit phase. More...
 
void agt_sil_end_transaction (const xmlChar *txid_str)
 End a transaction. More...
 
void agt_sil_cancel_transaction (const xmlChar *txid_str)
 Cancel and delete the transaction. More...
 
status_t agt_sil_send_load_event (const xmlChar *name, boolean is_bundle, boolean is_load)
 Send a <load-event> to all subsystems. More...
 
status_t agt_sil_send_stream_callback_event (const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *stream_name, boolean all_streams, agt_not_subevent_t subevent)
 Send a "<stream-callback-event>" message to one subsystem. More...
 
boolean agt_sil_edit_transaction_in_progress (void)
 Check if a SIL-SA transaction is in progress. More...
 
void agt_sil_check_deleted_edits (agt_cfg_transaction_t *txcb)
 Check for deleted edits. More...
 
status_t agt_sil_start_get_transaction (ses_cb_t *client_scb, getcb_get2_t *get2cb, xml_msg_hdr_t *msg, const xmlChar **txid_str)
 Start a GET2 transaction. More...
 
status_t agt_sil_get_transaction_status (const xmlChar *txid_str)
 Get the GET2 transaction status. More...
 
void agt_sil_walk_get_results (const xmlChar *txid_str, agt_sil_get_walker_fn_t get_walker_fn)
 Walk the GET2 results. More...
 
status_t agt_sil_walk_rpc_results (const xmlChar *txid_str, agt_sil_rpc_walker_fn_t rpc_walker_fn, dlq_hdr_t *saveQ)
 Walk the RPC transaction results. More...
 
status_t agt_sil_walk_shook_results (ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, const xmlChar *txid_str, agt_sil_shook_walker_fn_t shook_walker_fn)
 Walk the Set Hook results. More...
 
void agt_sil_end_get_transaction (const xmlChar *txid_str)
 End a GET2 transaction. More...
 
void agt_sil_set_subsys_timeout (uint32 val)
 Set the subsys-timeout parameter. More...
 
status_t agt_sil_start_rpc_transaction (ses_cb_t *client_scb, rpc_msg_t *msg, obj_template_t *obj, val_value_t *actionval, const xmlChar **txid_str)
 Start an RPC transaction. More...
 
status_t agt_sil_rpc_transaction_status (const xmlChar *txid_str)
 Get RPC transaction status. More...
 
void agt_sil_end_rpc_transaction (const xmlChar *txid_str)
 End an RPC transaction. More...
 
status_t agt_sil_handle_remote_trans_start (ses_cb_t *client_scb, const xmlChar *client_txid, boolean isvalidate, boolean isrollback, boolean isrunning)
 Handle a remote transaction. More...
 
status_t agt_sil_transaction_complete_cb (const xmlChar *txid_str)
 SIL transaction complete callback. More...
 
status_t agt_sil_get_exit_mode_edit (const xmlChar *txid_str, agt_tx_type_t tx_type, val_value_t **error_val, xmlChar **error_path, xmlChar **error_msg, boolean *need_reverse_edit)
 Get the transaction exit code. More...
 
status_t agt_sil_get_exit_mode (const xmlChar *txid_str, agt_tx_type_t tx_type)
 Get the transaction exit code. More...
 
boolean agt_sil_last_in_transaction (const xmlChar *txid_str, ses_id_t sid)
 Check if the session is the last in the current transaction. More...
 
void agt_sil_unload_module (const xmlChar *modname)
 Unload a module from the subsystem register messages so the cleanup is not attempted again during system cleanup. More...
 
status_t agt_sil_bundle_walker (const xmlChar *name, void *cookie)
 Callback for bundles. More...
 
status_t agt_sil_module_walker (const xmlChar *name, void *cookie)
 Callback for dynamically loaded modules. More...
 
status_t agt_sil_handle_remote_commit_completeness (ses_cb_t *client_scb, const xmlChar *client_txid, agt_cbtyp_t cbtyp, agt_commit_type_t commit_type)
 Handle remote SIL-SA subsytem Commit Completeness callbacks. More...
 
boolean agt_sil_subsys_registered (const xmlChar *subsys_id)
 Check if the subsystem has a SIL-SA service registered. More...
 
boolean agt_sil_has_subsys_glob_action (void)
 
  • Check if there is Global Action callback in subsystem
More...
 
boolean agt_sil_has_subsys_glob_edit2 (void)
 
  • Check if there is Global EDIT2 callback in subsystem
More...
 
boolean agt_sil_has_subsys_glob_edit3 (void)
 
  • Check if there is Global EDIT3 callback in subsystem
More...
 
boolean agt_sil_has_subsys_glob_get (void)
 
  • Check if there is Global GET2 callback in subsystem
More...
 
boolean agt_sil_has_subsys_glob_rpc (void)
 
  • Check if there is Global RPC callback in subsystem
More...
 
boolean agt_sil_has_subsys_glob_any (void)
 Check if there any any Global callbacks in subsystem. More...
 
boolean agt_sil_has_subsys_glob_edit (void)
 Check if there any EDIT2/3 Global callbacks in subsystem. More...
 
xmlChar * agt_sil_get_edit_subsys_id (void)
 Get the subsystem ID that holds Global EDIT callback. More...
 

Detailed Description

SIL Transactions are initiated from the main server.

The local or remote SIL callbacks are invoked as needed for a transaction-in-progress.

Typedef Documentation

◆ agt_sil_get_walker_fn_t

typedef void(* agt_sil_get_walker_fn_t) (getcb_get2_t *get2cb, const xmlChar *subsys_id, status_t get_status, val_value_t *return_val)

get walker function for processing results from remote GET transaction from 1 or more subsystems

Parameters
get2cbrequest get2 control block
subsys_idsubsystem ID string
get_statusoperation status for this subsystem
return_val<get-response> value for this subsystem, if any

◆ agt_sil_rpc_walker_fn_t

typedef status_t(* agt_sil_rpc_walker_fn_t) (const xmlChar *subsys_id, status_t rpc_status, val_value_t *return_val, dlq_hdr_t *saveQ)

RPC walker function for processing results from remote GET transaction from 1 or more subsystems.

Parameters
subsys_idsubsystem ID string
rpc_statusoperation status for this subsystem
return_val<rpc-response> value for this subsystem, if any
saveQQ to save val_value_t structs from responsess
Returns
status: any error to end the walk

◆ agt_sil_shook_walker_fn_t

typedef status_t(* agt_sil_shook_walker_fn_t) (ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, const xmlChar *subsys_id, status_t tx_status, dlq_hdr_t *edded_editQ)

Set Hook walker function.

Set Hook walker function for processing added edit lists from remote EDIT transaction from 1 or more subsystems

Parameters
scbsession control block invoking the callback
msgRPC message in progress
txcbtransaction control block to check
subsys_idsubsystem ID string
tx_statusoperation status for this subsystem
[out]edded_editQQ of edded edits from 1 subsystem
edded_editQ entries may be added
Returns
status

Function Documentation

◆ agt_sil_bundle_walker()

status_t agt_sil_bundle_walker ( const xmlChar *  name,
void *  cookie 
)

Callback for bundles.

Parameters
namethe bundle name
cookiecookie passed to agt_ncx_load_for_all_bundles
Returns
status; will stop on error exit
Here is the call graph for this function:

◆ agt_sil_cancel_transaction()

void agt_sil_cancel_transaction ( const xmlChar *  txid_str)

Cancel and delete the transaction.

The transaction may have any subsystems active

Parameters
txid_strtransaction-id string
Here is the caller graph for this function:

◆ agt_sil_check_deleted_edits()

void agt_sil_check_deleted_edits ( agt_cfg_transaction_t txcb)

Check for deleted edits.

Parameters
txcbtransaction in progress to check
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_cleanup()

void agt_sil_cleanup ( void  )

Cleanup the SIL Features Module.

Called by the server during shutdown

Here is the call graph for this function:

◆ agt_sil_continue_start_transaction()

status_t agt_sil_continue_start_transaction ( agt_cfg_transaction_t txcb,
const xmlChar *  user_id,
const xmlChar *  client_addr,
const xmlChar *  target,
boolean  is_replay,
dlq_hdr_t *  editQ 
)

Continue already existed Start Transaction.

Used for Added by Set Hook edits. Can be called only right after Start Transaction. Using the same message as for Start Transaction

Parameters
txcbtransaction control block to check
user_iduser initiating this transaction
client_addrIP address of client session
targetdatastore target
is_replayTRUE for <replay-config> operation;
FALSE for normal edit
editQQ of edits to encode (Q of agt_cfg_silcall_t)
Returns
status of the operation
Here is the call graph for this function:

◆ agt_sil_continue_transaction()

status_t agt_sil_continue_transaction ( const xmlChar *  txid_str,
agt_cbtyp_t  cur_phase 
)

Continue a transaction to apply or commit phase.

Parameters
txid_strtransaction-id string
cur_phasetransaction callback phase to invoke
Returns
status of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_edit_transaction_in_progress()

boolean agt_sil_edit_transaction_in_progress ( void  )

Check if a SIL-SA transaction is in progress.

Returns
TRUE if a transaction could be in progress; FALSE if not
Here is the caller graph for this function:

◆ agt_sil_end_get_transaction()

void agt_sil_end_get_transaction ( const xmlChar *  txid_str)

End a GET2 transaction.

Parameters
txid_strtransaction ID string to end

◆ agt_sil_end_rpc_transaction()

void agt_sil_end_rpc_transaction ( const xmlChar *  txid_str)

End an RPC transaction.

Parameters
txid_strtransaction ID string to end

◆ agt_sil_end_transaction()

void agt_sil_end_transaction ( const xmlChar *  txid_str)

End a transaction.

Parameters
txid_strtransaction-id string
Here is the caller graph for this function:

◆ agt_sil_get_edit_subsys_id()

xmlChar * agt_sil_get_edit_subsys_id ( void  )

Get the subsystem ID that holds Global EDIT callback.

INTERNAL API

Returns
Subsystem ID that holds the Global callback; NULL otherwise

◆ agt_sil_get_exit_mode()

status_t agt_sil_get_exit_mode ( const xmlChar *  txid_str,
agt_tx_type_t  tx_type 
)

Get the transaction exit code.

YPW-1545: memory usage malfanction

Get the reason code for exiting YControl IO mode Can only be called once for each txid value!!! Causes stored txid_in_progress record to be deleted and txid_doneQ will be also cleaned up

Checks the status of the transaction phase that completed: The agt_ncxserver_run loop exited because the timer expired or the phase completed OK, or 1 of the subsystems responded with an error

Parameters
txid_strtransaction-id string
tx_typetransaction type (GET|HOOK|RPC)
Returns
status of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_get_exit_mode_edit()

status_t agt_sil_get_exit_mode_edit ( const xmlChar *  txid_str,
agt_tx_type_t  tx_type,
val_value_t **  error_val,
xmlChar **  error_path,
xmlChar **  error_msg,
boolean *  need_reverse_edit 
)

Get the transaction exit code.

YPW-1872: SIL-SA custom error messages support

Get the reason code for exiting YControl IO mode For EDIT requests only

Checks the status of the transaction phase that completed: The agt_ncxserver_run loop exited because the timer expired or the phase completed OK, or 1 of the subsystems responded with an error

Parameters
txid_strtransaction-id string. Find this transaction.
tx_typetransaction type (EDIT). Find this transaction type.
[out]error_valaddress of newval or curval causing error
*error_val set to the value causing the error
[out]error_pathaddress of error string to use in error response;
*error_path set to the error path string to use in the error report.
[out]error_msgpointer to error message string to use in error response;
*error_msg set to the error message string to use.
[out]need_reverse_editaddress of return address flag
*need_reverse_edit TRUE if need for reverse edit detected
Returns
status of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_get_transaction_status()

status_t agt_sil_get_transaction_status ( const xmlChar *  txid_str)

Get the GET2 transaction status.

Parameters
txid_strtransaction-id string
Returns
status of the GET transaction that completed The agt_ncxserver_run loop exited because the timer expired or the phase completed OK
Here is the caller graph for this function:

◆ agt_sil_handle_remote_commit_completeness()

status_t agt_sil_handle_remote_commit_completeness ( ses_cb_t client_scb,
const xmlChar *  client_txid,
agt_cbtyp_t  cbtyp,
agt_commit_type_t  commit_type 
)

Handle remote SIL-SA subsytem Commit Completeness callbacks.

INTERNAL API

Parameters
client_scbsession to use
client_txidserver transaction ID string to use
cbtypcallback phase enum
commit_typecommit type; only if phase is Commit
Returns
status; will stop on error exit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_handle_remote_trans_start()

status_t agt_sil_handle_remote_trans_start ( ses_cb_t client_scb,
const xmlChar *  client_txid,
boolean  isvalidate,
boolean  isrollback,
boolean  isrunning 
)

Handle a remote transaction.

Parameters
client_scbsession to use
client_txidServer transaction ID string to use
isvalidateTRUE if this is Transaction is for Validate
isrollbackTRUE if this is Transaction for Rollback or Load
isrunningTRUE if running datastore is being modified
Returns
status of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_action()

boolean agt_sil_has_subsys_glob_action ( void  )

  • Check if there is Global Action callback in subsystem

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_any()

boolean agt_sil_has_subsys_glob_any ( void  )

Check if there any any Global callbacks in subsystem.

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered

◆ agt_sil_has_subsys_glob_edit()

boolean agt_sil_has_subsys_glob_edit ( void  )

Check if there any EDIT2/3 Global callbacks in subsystem.

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_edit2()

boolean agt_sil_has_subsys_glob_edit2 ( void  )

  • Check if there is Global EDIT2 callback in subsystem

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_edit3()

boolean agt_sil_has_subsys_glob_edit3 ( void  )

  • Check if there is Global EDIT3 callback in subsystem

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_get()

boolean agt_sil_has_subsys_glob_get ( void  )

  • Check if there is Global GET2 callback in subsystem

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_has_subsys_glob_rpc()

boolean agt_sil_has_subsys_glob_rpc ( void  )

  • Check if there is Global RPC callback in subsystem

Can be only one at a time for any given subsystem

INTERNAL API

Returns
TRUE if registered; FALSE if not registered
Here is the caller graph for this function:

◆ agt_sil_init()

status_t agt_sil_init ( void  )

Initialize the SIL features module (phase 2)

Returns
status of the initialization procedure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_last_in_transaction()

boolean agt_sil_last_in_transaction ( const xmlChar *  txid_str,
ses_id_t  sid 
)

Check if the session is the last in the current transaction.

Figure out if the specified session ID is the only one in the specified transaction. If so, the caller will exit the agt_ncxserver_run_ycontrol function. If the SID is not involved in this transaction, or other subsystems are involved besides the specified SID, then the function will return FALSE

Parameters
txid_strtransaction ID string to check
sidsession ID to check
Returns
TRUE if this is last or only session in the specified transaction
FALSE otherwise
Here is the call graph for this function:

◆ agt_sil_module_walker()

status_t agt_sil_module_walker ( const xmlChar *  name,
void *  cookie 
)

Callback for dynamically loaded modules.

Parameters
namethe module name
cookiecookie passed to agt_ncx_load_for_all_bundles
Returns
status; will stop on error exit
Here is the call graph for this function:

◆ agt_sil_rpc_transaction_status()

status_t agt_sil_rpc_transaction_status ( const xmlChar *  txid_str)

Get RPC transaction status.

Parameters
txid_strtransaction-id string
Returns
status of the RPC transaction that completed. The agt_ncxserver_run loop exited because the timer expired or the phase completed OK
Here is the caller graph for this function:

◆ agt_sil_send_load_event()

status_t agt_sil_send_load_event ( const xmlChar *  name,
boolean  is_bundle,
boolean  is_load 
)

Send a <load-event> to all subsystems.

TBD: send to specific subsystems

Parameters
namename of module or bundle
is_bundleTRUE if name is a bundle; FALSE if a module
is_loadTRUE if load event; FALSE if unload event
Returns
status of the operation
Here is the call graph for this function:

◆ agt_sil_send_stream_callback_event()

status_t agt_sil_send_stream_callback_event ( const xmlChar *  subsys_id,
const xmlChar *  modname,
const xmlChar *  stream_name,
boolean  all_streams,
agt_not_subevent_t  subevent 
)

Send a "<stream-callback-event>" message to one subsystem.

Parameters
subsys_idname of subsystem to get this event
modnamename of module that registered callback
stream_namestream that this callback is about
all_streamsflag used to register entry
subeventsubevent code to use
Returns
status of the operation
Here is the call graph for this function:

◆ agt_sil_set_subsys_timeout()

void agt_sil_set_subsys_timeout ( uint32  val)

Set the subsys-timeout parameter.

Parameters
valvalue to use for timeout in seconds
Here is the call graph for this function:

◆ agt_sil_start_get_transaction()

status_t agt_sil_start_get_transaction ( ses_cb_t client_scb,
getcb_get2_t get2cb,
xml_msg_hdr_t msg,
const xmlChar **  txid_str 
)

Start a GET2 transaction.

Parameters
client_scbclient session requesting GET operation
get2cbget2 control block to use
msgmessage header to use
[out]txid_straddress of return transaction ID string
*txid_str backptr to transaction ID string
Returns
status of the operation
Here is the call graph for this function:

◆ agt_sil_start_rpc_transaction()

status_t agt_sil_start_rpc_transaction ( ses_cb_t client_scb,
rpc_msg_t msg,
obj_template_t obj,
val_value_t actionval,
const xmlChar **  txid_str 
)

Start an RPC transaction.

Parameters
client_scbsession control block to use
msgrpc message
objRPC object being invoked
actionvalaction value in use if ACTION
[out]txid_straddress of return transaction ID string
*txid_str backptr to transaction ID string
Returns
status of the operation
Here is the call graph for this function:

◆ agt_sil_start_transaction()

status_t agt_sil_start_transaction ( agt_cfg_transaction_t txcb,
const xmlChar *  user_id,
const xmlChar *  client_addr,
const xmlChar *  target,
boolean  is_validate,
boolean  is_replay,
boolean  is_reverse_edit,
boolean  is_load_config,
boolean  is_hook_load,
boolean  is_hook_validate,
dlq_hdr_t *  editQ 
)

Start Transaction Handler.

Parameters
txcbtransaction control block to use
user_iduser initiating this transaction
client_addrIP address of client session
targetdatastore target
is_validateTRUE for <validate> operation
FALSE for normal edit
is_replayTRUE for <replay-config> operation
FALSE for normal edit
is_reverse_editTRUE for undo of commited edit(s) in the form of a new reverse edit
FALSE for normal edit
is_load_configTRUE for <load-config> operation
FALSE for normal edit
is_hook_loadTRUE if this is the LOAD operation
is_hook_validateTRUE if this is validate OP
editQQ of edits to encode (Q of agt_cfg_silcall_t)
Returns
status of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_subsys_registered()

boolean agt_sil_subsys_registered ( const xmlChar *  subsys_id)

Check if the subsystem has a SIL-SA service registered.

INTERNAL API

Parameters
subsys_idsubsys identifier to check
Returns
TRUE if registered; FALSE if not registered

◆ agt_sil_transaction_complete_cb()

status_t agt_sil_transaction_complete_cb ( const xmlChar *  txid_str)

SIL transaction complete callback.

Parameters
txid_strtransaction ID string to end
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_sil_unload_module()

void agt_sil_unload_module ( const xmlChar *  modname)

Unload a module from the subsystem register messages so the cleanup is not attempted again during system cleanup.

Parameters
modnamemodule name to find and remove register message

◆ agt_sil_walk_get_results()

void agt_sil_walk_get_results ( const xmlChar *  txid_str,
agt_sil_get_walker_fn_t  get_walker_fn 
)

Walk the GET2 results.

Check the results of the get retrieval from each subsystem The walker function is called for each subsystem

Parameters
txid_strget transaction IS string
get_walker_fnget results walker function

◆ agt_sil_walk_rpc_results()

status_t agt_sil_walk_rpc_results ( const xmlChar *  txid_str,
agt_sil_rpc_walker_fn_t  rpc_walker_fn,
dlq_hdr_t *  saveQ 
)

Walk the RPC transaction results.

Check the results of the RPC retrieval from each subsystem The walker function is called for each subsystem

Parameters
txid_strget transaction IS string
rpc_walker_fnRPC results walker function
saveQQ to save the results
Returns
status

◆ agt_sil_walk_shook_results()

status_t agt_sil_walk_shook_results ( ses_cb_t scb,
rpc_msg_t msg,
agt_cfg_transaction_t txcb,
const xmlChar *  txid_str,
agt_sil_shook_walker_fn_t  shook_walker_fn 
)

Walk the Set Hook results.

Check the results of the RPC retrieval from each subsystem The walker function is called for each subsystem

Parameters
scbsession control block invoking the callback
msgRPC message in progress
txcbtransaction control block to check
txid_strget transaction IS string
shook_walker_fnHook results walker function
Returns
status