![]() |
yumapro
24.10-11
YumaPro SDK
|
Utility Functions for NCX Server method routines. More...
#include "agt.h"
#include "agt_cfg.h"
#include "cfg.h"
#include "dlq.h"
#include "getcb.h"
#include "ncxconst.h"
#include "ncxtypes.h"
#include "obj.h"
#include "rpc.h"
#include "ses.h"
#include "status.h"
#include "val.h"
#include "xml_msg.h"
#include "xml_util.h"
#include "xpath.h"
#include "yang_patch.h"
Go to the source code of this file.
Functions | |
const val_value_t * | agt_get_parmval (const xmlChar *parmname, rpc_msg_t *msg) |
Get the identified val_value_t for a given parameter. More... | |
void | agt_record_error (ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path) |
Generate an rpc_err_rec_t and save it in the msg. More... | |
void | agt_record_error_obj (ses_cb_t *scb, xml_msg_hdr_t *msghdr, status_t res, obj_template_t *errobj, const xmlChar *badval) |
Generate an rpc_err_rec_t and save it in the msg Use the provided object for <rpc-error> fields. More... | |
void | agt_record_error_errinfo (ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo) |
Generate an rpc_err_rec_t and save it in the msg Use provided error fields. More... | |
void | agt_record_warning (ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_parm, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo) |
Generate an rpc_err_rec_t and save it in the msg. More... | |
void | agt_record_attr_error (ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_attr_t *xmlattr, const xml_node_t *xmlnode, const xmlChar *badns, ncx_node_t nodetyp, void *errnode) |
Generate an rpc_err_rec_t and save it in the msg. More... | |
status_t | agt_check_max_access (val_value_t *newval, boolean cur_exists) |
Check if the max-access for a parameter is exceeded. More... | |
val_value_t * | agt_make_leaf (obj_template_t *parentobj, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res) |
make a string val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_uint_leaf (obj_template_t *parentobj, const xmlChar *leafname, uint32 leafval, status_t *res) |
make a uint32 val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_int_leaf (obj_template_t *parentobj, const xmlChar *leafname, int32 leafval, status_t *res) |
make an int32 val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_uint64_leaf (obj_template_t *parentobj, const xmlChar *leafname, uint64 leafval, status_t *res) |
make a uint64 val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_int64_leaf (obj_template_t *parentobj, const xmlChar *leafname, int64 leafval, status_t *res) |
make an int64 val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_idref_leaf (obj_template_t *parentobj, const xmlChar *leafname, const val_idref_t *leafval, status_t *res) |
make an identityref val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_list (obj_template_t *parentobj, const xmlChar *listname, status_t *res) |
make a val_value_t struct for a specified list More... | |
val_value_t * | agt_make_object (obj_template_t *parentobj, const xmlChar *objname, status_t *res) |
make a val_value_t struct for a specified node More... | |
val_value_t * | agt_make_virtual_leaf (obj_template_t *parentobj, const xmlChar *leafname, getcb_fn_t callbackfn, status_t *res) |
make a val_value_t struct for a specified virtual leaf or leaf-list More... | |
xpath_pcb_t * | agt_new_xpath_pcb (ses_cb_t *scb, const xmlChar *expr, status_t *res) |
Get a new XPath parser control block and set up the server variable bindings. More... | |
xmlChar * | agt_make_srid_filespec (const xmlChar *basestr, const xmlChar *patstr, const xmlChar *valstr) |
Make a filespec string needed for a filespec with SRID in it. More... | |
xmlChar * | agt_get_startup_filespec (status_t *res) |
Figure out where to store the startup file. More... | |
val_value_t * | agt_get_key_value (val_value_t *startval, val_value_t **lastkey) |
Get the next expected key value in the ancestor chain. More... | |
boolean | agt_backups_enabled (void) |
Check if the backup commands are enabled. More... | |
boolean | agt_modified_since (val_value_t *val, time_t *timerec) |
Check if the timestamp for the object is later then the specified timestamp. More... | |
boolean | agt_notifications_enabled (void) |
Check if notifications are enabled. More... | |
val_value_t * | agt_make_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_union_leaf (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const val_value_t *leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list use a val_value_t for a union More... | |
val_value_t * | agt_make_uint_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, uint32 leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_int_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, int32 leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_uint64_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, uint64 leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_int64_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, int64 leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_idref_leaf2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const val_idref_t *leafval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list More... | |
val_value_t * | agt_make_bits_leaf (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const ncx_list_t *listval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BITS or NCX_BT_SLIST) More... | |
val_value_t * | agt_make_boolean_leaf (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BOOL) More... | |
val_value_t * | agt_make_empty_leaf (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res) |
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_EMPTY) More... | |
val_value_t * | agt_make_object2 (obj_template_t *parentobj, const xmlChar *modname, const xmlChar *objname, status_t *res) |
make a val_value_t struct for a specified node More... | |
ncx_cfg_t | agt_get_edit_config_id (rpc_msg_t *rpcmsg) |
Get the enum ID of the configuration that is being edited. More... | |
boolean | agt_module_in_cli_valset (const xmlChar *modname) |
Check if there is a module=foo parameter in the CLI parameter set. More... | |
boolean | agt_check_delete_all_allowed (obj_template_t *testobj) |
Check if the delete-all or remove-all operation is enabled for for specified object. More... | |
status_t | agt_find_in_datastore (ncx_cfg_t cfg_id, val_value_t *err_value, val_value_t **retval) |
Find the node (should be from an <edit-config> content node) in the specified datastore. More... | |
uint32 | agt_get_error_count (rpc_msg_t *msg) |
Get the current number of errors in the rpc msg Q. More... | |
val_value_t * | agt_get_rpc_input (rpc_msg_t *msg) |
Get the rpc input value node. More... | |
obj_template_t * | agt_get_rpc_output_obj (rpc_msg_t *msg) |
Get the rpc output object template. More... | |
obj_template_t * | agt_get_action_output_obj (val_value_t *actionval) |
Get the action output object template. More... | |
const xmlChar * | agt_getTermReasonStr (ses_term_reason_t termreason) |
Convert the termination reason enum to a string. More... | |
boolean | agt_op_ok_for_maintenance_mode (const obj_template_t *rpcobj) |
Check if the operation is OK for maintenance mode. More... | |
const xmlChar * | agt_crl_mode_str (agt_crl_mode_t crl_mode) |
Get the string for the CRL mode enum. More... | |
agt_crl_mode_t | agt_crl_mode_enum (const xmlChar *crl_mode) |
Get the enum for the CRL mode string. More... | |
status_t | agt_add_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const xmlChar *leafstrval) |
make a child node from a string and add to parent. More... | |
status_t | agt_add_uint_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, uint32 leafval) |
make a child node from a uint32 and add to parent. More... | |
status_t | agt_add_int_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, int32 leafval) |
make a child node from a int32 and add to parent. More... | |
status_t | agt_add_uint64_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, uint64 leafval) |
make a child node from a uint64 and add to parent. More... | |
status_t | agt_add_int64_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, int64 leafval) |
make a child node from a int64 and add to parent. More... | |
status_t | agt_add_boolean_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, boolean boolval) |
make a child node from a boolean and add to parent. More... | |
status_t | agt_add_idref_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const val_idref_t *leafval) |
make a child node from a val_idref_t struct and add to parent. More... | |
status_t | agt_add_bits_leafy (val_value_t *parentval, const xmlChar *modname, const xmlChar *leafname, const ncx_list_t *leafval) |
make a child node from a ncx_list_t struct (bits) and add to parent. More... | |
val_value_t * | agt_make_string_key (const xmlChar *leafval) |
make a generic key leaf node from a string More... | |
val_value_t * | agt_make_uint_key (uint32 leafval) |
make a generic key leaf node from a uint More... | |
val_value_t * | agt_make_int_key (int32 leafval) |
make a generic key leaf node from an int More... | |
val_value_t * | agt_make_uint64_key (uint64 leafval) |
make a generic key leaf node from a uint64 More... | |
val_value_t * | agt_make_int64_key (int64 leafval) |
make a generic key leaf node from an int64 More... | |
val_value_t * | agt_make_boolean_key (boolean leafval) |
make a generic key leaf node from a boolean More... | |
val_value_t * | agt_make_idref_key (const val_idref_t *leafval) |
make a generic key leaf node from an idref struct More... | |
val_value_t * | agt_make_bits_key (const ncx_list_t *leafval) |
make a generic key leaf node from a bits struct More... | |
status_t | agt_xpath_force_true (struct xpath_pcb_t_ *pcb, val_value_t *context, val_value_t *docroot, boolean *result) |
XPath Boolean EVAL Replacement Callback. More... | |
status_t | agt_xpath_example (struct xpath_pcb_t_ *pcb, val_value_t *context, val_value_t *docroot, boolean *result) |
XPath Boolean EVAL Replacement Callback. More... | |
status_t | agt_add_patch_edit (agt_edit_parms_cb_t *parms, const xmlChar *edit_id_str, const xmlChar *edit_target, const xmlChar *edit_operation, const xmlChar *edit_xml_value, const xmlChar *insert_point, const xmlChar *insert_where) |
Create an edit request and add to YANG Patch in progress. More... | |
status_t | agt_apply_patch_edit (ses_cb_t *scb, agt_edit_parms_cb_t *parms) |
SIL version of the db_api_send_edt_full2 API. More... | |
void | agt_print_error_headers (void) |
Print the error number and error message for each error to STDOUT or the logfile; Used for doxygen header in H file. More... | |
Utility Functions for NCX Server method routines.