yumapro
24.10-1
YumaPro SDK
|
Configuration templates allow pre-configured YANG subtrees to be applied to incomplete edits to produce a complete subtree. More...
Functions | |
status_t | agt_templates_init (void) |
initialize the yumaworks-templates More... | |
void | agt_templates_cleanup (void) |
Cleanup the yumaworks-templates. More... | |
status_t | agt_templates_set (const xmlChar *name, const xmlChar *targstr, obj_template_t *targobj, val_value_t *targval) |
Set a config template (new or replace) More... | |
void | agt_templates_clear (const xmlChar *name) |
Clear a config template if found. More... | |
status_t | agt_templates_validate_parm (ses_cb_t *scb, rpc_msg_t *msg, xml_node_t *methnode) |
Check for with-template parameter. More... | |
status_t | agt_templates_apply_parm (rpc_msg_t *msg, val_value_t *newval) |
Apply a template to a subtree. More... | |
status_t | u_yumaworks_templates_templates_template_edit (ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval, val_value_t **child_errorval, const xmlChar *k_templates_template_name) |
Edit database object callback. More... | |
status_t | u_yumaworks_templates_templates_edit (ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval) |
Edit database object callback. More... | |
status_t | u_yumaworks_templates_init (const xmlChar *modname, const xmlChar *revision) |
initialize the yumaworks-templates server instrumentation library More... | |
status_t | u_yumaworks_templates_init2 (void) |
SIL init phase 2: non-config data structures. More... | |
void | u_yumaworks_templates_cleanup (void) |
cleanup the server instrumentation library More... | |
status_t | y_yumaworks_templates_init (const xmlChar *modname, const xmlChar *revision) |
initialize the yumaworks-templates server instrumentation library More... | |
status_t | y_yumaworks_templates_init2 (void) |
SIL init phase 2: non-config data structures. More... | |
void | y_yumaworks_templates_cleanup (void) |
cleanup the server instrumentation library More... | |
Configuration templates allow pre-configured YANG subtrees to be applied to incomplete edits to produce a complete subtree.
Requires –with-yumaworks-templates=true to enable.
status_t agt_templates_apply_parm | ( | rpc_msg_t * | msg, |
val_value_t * | newval | ||
) |
Apply a template to a subtree.
Go through the with-template parameters: Check the data node to see if the template should be applied If so, then add nodes to the newval as needed
msg | rpc msg for input parms and errors |
newval | value that being created to check for templates |
void agt_templates_cleanup | ( | void | ) |
Cleanup the yumaworks-templates.
Called by the server during shutdown.
void agt_templates_clear | ( | const xmlChar * | name | ) |
Clear a config template if found.
name | name of template to remove |
status_t agt_templates_init | ( | void | ) |
initialize the yumaworks-templates
status_t agt_templates_set | ( | const xmlChar * | name, |
const xmlChar * | targstr, | ||
obj_template_t * | targobj, | ||
val_value_t * | targval | ||
) |
Set a config template (new or replace)
name | template name to use |
targstr | absolute path of target entry |
targobj | target object template |
targval | target entry to apply template |
status_t agt_templates_validate_parm | ( | ses_cb_t * | scb, |
rpc_msg_t * | msg, | ||
xml_node_t * | methnode | ||
) |
Check for with-template parameter.
scb | session invoking the RPC |
msg | message in progress for this <rpc> request the msg->rpc_input value node contains the input (if any). It is a container matching the rpc/input node for the YANG rpc |
methnode | XML node for the operation, which can be used in error reporting (or ignored |
void u_yumaworks_templates_cleanup | ( | void | ) |
cleanup the server instrumentation library
Called by the server during shutdown.
status_t u_yumaworks_templates_init | ( | const xmlChar * | modname, |
const xmlChar * | revision | ||
) |
initialize the yumaworks-templates server instrumentation library
modname | requested module name |
revision | requested version (NULL for any) |
status_t u_yumaworks_templates_init2 | ( | void | ) |
SIL init phase 2: non-config data structures.
Called after running config is loaded
status_t u_yumaworks_templates_templates_edit | ( | ses_cb_t * | scb, |
rpc_msg_t * | msg, | ||
agt_cbtyp_t | cbtyp, | ||
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval | ||
) |
Edit database object callback.
Path: /templates
Add object instrumentation in COMMIT phase.
scb | session control block making the request |
msg | incoming rpc_msg_t in progress |
cbtyp | reason for the callback |
editop | the parent edit-config operation type, which is also used for all other callbacks that operate on objects |
newval | container object holding the proposed changes to apply to the current config, depending on the editop value. Will not be NULL. |
curval | current container values from the <running> or <candidate> configuration, if any. Could be NULL for create and other operations. |
status_t u_yumaworks_templates_templates_template_edit | ( | ses_cb_t * | scb, |
rpc_msg_t * | msg, | ||
agt_cbtyp_t | cbtyp, | ||
op_editop_t | editop, | ||
val_value_t * | newval, | ||
val_value_t * | curval, | ||
val_value_t ** | child_errorval, | ||
const xmlChar * | k_templates_template_name | ||
) |
Edit database object callback.
Path: /templates/template
Add object instrumentation in COMMIT phase.
scb | session control block making the request | |
msg | incoming rpc_msg_t in progress | |
cbtyp | reason for the callback | |
editop | the parent edit-config operation type, which is also used for all other callbacks that operate on objects | |
newval | container object holding the proposed changes to apply to the current config, depending on the editop value. Will not be NULL. | |
curval | current container values from the <running> or <candidate> configuration, if any. Could be NULL for create and other operations. | |
[out] | child_errorval | address of return child error node
|
k_templates_template_name | key 1 |
void y_yumaworks_templates_cleanup | ( | void | ) |
cleanup the server instrumentation library
Called by the server during shutdown.
status_t y_yumaworks_templates_init | ( | const xmlChar * | modname, |
const xmlChar * | revision | ||
) |
initialize the yumaworks-templates server instrumentation library
modname | requested module name |
revision | requested version (NULL for any) |
status_t y_yumaworks_templates_init2 | ( | void | ) |
SIL init phase 2: non-config data structures.
Called after running config is loaded