yumapro  20.10-12
YumaPro SDK
agt_yangapi_edit.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
3  *
4  * Unless required by applicable law or agreed to in writing,
5  * software distributed under the License is distributed on an
6  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7  * KIND, either express or implied. See the License for the
8  * specific language governing permissions and limitations
9  * under the License.
10  */
11 #if defined(WITH_YANGAPI) || defined(WITH_YCONTROL) || defined(WITH_RESTCONF)
12 #ifndef _H_agt_yangapi_edit
13 #define _H_agt_yangapi_edit
14 /* FILE: agt_yangapi_edit.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 17-mar-13 abb Begun.; split from agt_yangapi.c
36 */
37 
38 #ifndef _H_ses
39 #include "ses.h"
40 #endif
41 
42 #ifndef _H_rpc
43 #include "rpc.h"
44 #endif
45 
46 #ifndef _H_status
47 #include "status.h"
48 #endif
49 
50 #ifndef _H_yangapi
51 #include "yangapi.h"
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 
59 /********************************************************************
60 * *
61 * C O N S T A N T S *
62 * *
63 *********************************************************************/
64 
65 
66 /********************************************************************
67 * *
68 * T Y P E S *
69 * *
70 *********************************************************************/
71 
72 
73 /********************************************************************
74 * *
75 * F U N C T I O N S *
76 * *
77 *********************************************************************/
78 
79 /* Group defined in agt_yangapi.h */
80 
96 extern status_t
97  agt_yangapi_edit_request (ses_cb_t *scb,
98  yangapi_cb_t *rcb,
99  rpc_msg_t *msg);
100 
101 
102 
120 extern status_t
121  agt_yangapi_edit_request_ex (ses_cb_t *scb,
122  yangapi_cb_t *rcb,
123  rpc_msg_t *msg,
124  val_value_t *force_editval,
125  op_editop_t force_editop,
126  boolean skip_sil,
127  boolean skip_save,
128  const xmlChar *comment_str,
129  yang_patch_edit_t *edit);
130 
131 
132 
133 
154 extern status_t
155  agt_yangapi_edit_request_ex2 (ses_cb_t *scb,
156  yangapi_cb_t *rcb,
157  rpc_msg_t *msg,
158  val_value_t *force_editval,
159  op_editop_t force_editop,
160  boolean skip_sil,
161  boolean skip_save,
162  boolean check_candidate,
163  boolean candidate_start_dirty,
164  const xmlChar *comment_str,
165  yang_patch_edit_t *edit);
166 
167 
171 #ifdef __cplusplus
172 } /* end extern 'C' */
173 #endif
174 
175 #endif /* _H_agt_yangapi */
176 #endif // WITH_YANGAPI || WITH_YCONTROL || WITH_RESTCONF
NCX_AGT_TARG_RUNNING
@ NCX_AGT_TARG_RUNNING
target=running
Definition: ncxtypes.h:355
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.
Definition: agt_cfg.c:1089
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
ncx_get_empty_npcon_presence
boolean ncx_get_empty_npcon_presence(void)
Get the empty_npcon_presence value.
Definition: ncx.c:13615
agt_cap.h
NETCONF Server capabilities handler.
DUMP_VAL_LOG
@ DUMP_VAL_LOG
dump val to main log
Definition: val.h:777
cfg.h
AGT_CCPARM_NONE
@ AGT_CCPARM_NONE
not set
Definition: agt.h:674
val_move_children
void val_move_children(val_value_t *srcval, val_value_t *destval)
Move all the child nodes from src to dest Source and dest must both be containers!
Definition: val.c:12651
ncx_decode_url_string
status_t ncx_decode_url_string(const xmlChar *urlstr, uint32 urlstrlen, xmlChar *buffer, uint32 *cnt)
Fill buffer with a plain string from a URL string.
Definition: ncx.c:10822
OP_EDITOP_CREATE
@ OP_EDITOP_CREATE
edit op is create
Definition: op.h:126
agt_ses.h
Server Session Management.
agt_util.h
Utility Functions for NCX Server method routines.
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
cfg_ok_to_write
status_t cfg_ok_to_write(const cfg_template_t *cfg, ses_id_t sesid)
Check if the specified config can be written right now by the specified session ID.
Definition: cfg.c:2286
agt_ncx_cfg_save
status_t agt_ncx_cfg_save(cfg_template_t *cfg)
Save the specified cfg to the its startup source, which should be stored in the cfg struct.
Definition: agt_ncx.c:5489
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
ERR_NCX_RESOURCE_UNKNOWN
@ ERR_NCX_RESOURCE_UNKNOWN
385
Definition: status_enum.h:428
AGT_CFG_EDIT_TYPE_FULL
@ AGT_CFG_EDIT_TYPE_FULL
REPLACE = full database replace.
Definition: agt_cfg.h:191
YANGAPI_LAUNCHPT_DATA
@ YANGAPI_LAUNCHPT_DATA
/restconf/data/foo launch point
Definition: yangapi.h:137
val_index_compare
int val_index_compare(const val_value_t *val1, const val_value_t *val2)
Check 2 val_value structs for the same instance ID.
Definition: val.c:9062
agt_yangapi_edit.h
Yuma REST API Edit Handler.
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
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.
Definition: agt_cfg.c:3578
val.h
Value Node Basic Support.
ERR_NCX_MISSING_KEY
@ ERR_NCX_MISSING_KEY
383
Definition: status_enum.h:426
NCX_IFMT_RESTCONF
@ NCX_IFMT_RESTCONF
RESTCONF URI with list1=key1,key2.
Definition: ncxtypes.h:404
xml_util.h
XML Utilities.
obj_next_key
obj_key_t * obj_next_key(obj_key_t *objkey)
Get the next key record.
Definition: obj.c:9559
xpath_new_pcb
xpath_pcb_t * xpath_new_pcb(const xmlChar *xpathstr, xpath_getvar_fn_t getvar_fn)
malloc a new XPath parser control block
Definition: xpath.c:2739
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
agt_ncx_commit_invoke
status_t agt_ncx_commit_invoke(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *running, const xmlChar *comment_str, boolean confirmed, uint32 confirm_timeout, const xmlChar *persist, const xmlChar *persist_id, agt_ccparm_t *ret_ccparm, boolean *errdone, boolean *save_startup)
commit : invoke commit or confirmed-commit API
Definition: agt_ncx.c:6369
obj_first_key
obj_key_t * obj_first_key(obj_template_t *obj)
Get the first key record.
Definition: obj.c:9472
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
xml_wr.h
XML Write functions.
val_delete_children
void val_delete_children(val_value_t *val)
Check if the value is a complex type and if so then delete all child nodes.
Definition: val.c:13640
ncx_num.h
NCX Module Library Number Utility Functions.
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
val_set_canonical_order
void val_set_canonical_order(val_value_t *val)
Set canonical order No longer used.
Definition: val_util.c:2467
obj_npcon_has_defaults_slow
boolean obj_npcon_has_defaults_slow(obj_template_t *obj)
Check if the specified NP container has defaults within it Must be a config object!...
Definition: obj.c:11776
agt_restcmn_record_error
void agt_restcmn_record_error(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errnode, const xmlChar *badval)
Record an rpc-error for YANG-API/RESTCONF response translation.
Definition: agt_restcmn.c:7326
agt_xml.h
NETCONF Server XML Reader interface.
agt_yangapi_edit_request
status_t agt_yangapi_edit_request(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
Perform an internal <edit-config> and <commit> if needed.
Definition: agt_yangapi_edit.c:1299
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
ncxconst.h
Contains NCX constants.
ncxmod.h
NCX Module Load Manager.
xpath_yang_make_instanceid_val
val_value_t * xpath_yang_make_instanceid_val(xpath_pcb_t *pcb, status_t *retres, val_value_t **deepest)
Make a value subtree out of an instance-identifier Used by yangcli to send PDUs from CLI target param...
Definition: xpath_yang.c:2838
NCX_PROTO_YUMA_YANGAPI
@ NCX_PROTO_YUMA_YANGAPI
YumaPro YANG-API 1.0.
Definition: ncxtypes.h:785
cfg_get_dirty_flag
boolean cfg_get_dirty_flag(const cfg_template_t *cfg)
Get the config dirty flag value.
Definition: cfg.c:2066
agt_yangapi.h
Yuma REST API Message Handler.
cfg_get_root
val_value_t * cfg_get_root(ncx_cfg_t cfgid)
Get the config root for the specified config.
Definition: cfg.c:3240
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
AGT_CFG_SET_TOP_REPLACE
#define AGT_CFG_SET_TOP_REPLACE(C)
set the top replace mode
Definition: agt_cfg.h:150
agt_val.h
NETCONF Server database callback handler.
xpath1.h
XPath 1.0 expression support.
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
agt_ncx_check_commit_parms
status_t agt_ncx_check_commit_parms(boolean confirmed, uint32 confirm_timeout, const xmlChar *persist, const xmlChar *persist_id)
Check the commit parameters from a RESTCONF edit to see if they are valid for the current datastore s...
Definition: agt_ncx.c:6293
NCX_PROTO_RESTCONF
@ NCX_PROTO_RESTCONF
IETF RESTCONF.
Definition: ncxtypes.h:788
xml_val.h
Utility functions for creating value structs.
AGT_CFG_EDIT_TYPE_PARTIAL
@ AGT_CFG_EDIT_TYPE_PARTIAL
REPLACE = subtree replace.
Definition: agt_cfg.h:192
ERR_NCX_PRECONDITION_FAILED
@ ERR_NCX_PRECONDITION_FAILED
392
Definition: status_enum.h:435
agt_val_root_check
status_t agt_val_root_check(ses_cb_t *scb, xml_msg_hdr_t *msghdr, agt_cfg_transaction_t *txcb, val_value_t *root)
Perform a YANG validation root-check.
Definition: agt_val.c:12863
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
agt_ncx.h
NETCONF Server standard method routines.
ses_get_protocol
ncx_protocol_t ses_get_protocol(const ses_cb_t *scb)
Get the NETCONF protocol set (or unset) for this session.
Definition: ses.c:3854
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
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.
Definition: agt_cfg.c:3730
OP_ERROP_STOP
@ OP_ERROP_STOP
stop-on-error
Definition: op.h:175
OP_EDITOP_DELETE
@ OP_EDITOP_DELETE
edit op is delete
Definition: op.h:127
agt_val_apply_write
status_t agt_val_apply_write(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, val_value_t *pducfg, op_editop_t editop)
Apply the requested write operation.
Definition: agt_val.c:13229
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
NCX_AGT_TARG_CANDIDATE
@ NCX_AGT_TARG_CANDIDATE
target=candidate
Definition: ncxtypes.h:354
val_child_add
status_t val_child_add(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node.
Definition: val_child.c:1542
val_util.h
Value Node Utilities.
agt_ncx_internal_commit
status_t agt_ncx_internal_commit(ses_cb_t *scb, rpc_msg_t *msg, boolean write_backup, boolean save_nvstore, ses_id_t rollback_sid, xmlChar **backup_source, boolean *errdone, boolean *rootcheck_done, status_t *rootcheck_res)
Apply a commit from candidate to running.
Definition: agt_ncx.c:5926
json_wr.h
JSON Write functions.
ses_indent_count
int32 ses_indent_count(const ses_cb_t *scb)
Get the logging indent count for this session.
Definition: ses.c:2801
YANGAPI_LAUNCHPT_NEW_DATA
@ YANGAPI_LAUNCHPT_NEW_DATA
/restconf/data/foo/new-bar launch point
Definition: yangapi.h:140
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.
Definition: agt_cfg.c:906
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
NCX_CFGID_CANDIDATE
@ NCX_CFGID_CANDIDATE
candidate datastore
Definition: ncxtypes.h:385
rpc.h
NETCONF protocol remote procedure call common definitions.
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_clone
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
val_child.h
Value Node Child Access Support.
AGT_CFG_SET_COMMENT
#define AGT_CFG_SET_COMMENT(C, S)
set the transaction comment
Definition: agt_cfg.h:136
OP_INSOP_NONE
@ OP_INSOP_NONE
not set
Definition: op.h:138
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
agt_modified_since
boolean agt_modified_since(val_value_t *val, time_t *timerec)
Check if the timestamp for the object is later then the specified timestamp.
Definition: agt_util.c:5501
agt_get_error_count
uint32 agt_get_error_count(rpc_msg_t *msg)
Get the current number of errors in the rpc msg Q.
Definition: agt_util.c:6460
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
yangconst.h
Contains YANG constants separated to prevent H file include loops.
AGT_CFG_SET_SKIP_SIL_PARTIAL
#define AGT_CFG_SET_SKIP_SIL_PARTIAL(C)
set the skip SIL partial callback flag
Definition: agt_cfg.h:121
agt_restcmn_method_is_read
boolean agt_restcmn_method_is_read(yangapi_method_t method)
Check if this is a read method.
Definition: agt_restcmn.c:6332
NCX_AGT_START_MIRROR
@ NCX_AGT_START_MIRROR
with-startup=false
Definition: ncxtypes.h:365
val_new_editvars
status_t val_new_editvars(val_value_t *val)
Malloc and initialize the val->editvars field.
Definition: val.c:13350
val_dump_value_max
void val_dump_value_max(val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5859
agt_yangapi_reply.h
RESTCONF Reply Handler.
OP_INSOP_LAST
@ OP_INSOP_LAST
insert last (default)
Definition: op.h:140
agt_restcmn.h
Common function for RESTCONF and YANG-API protocols.
obj_is_np_container
boolean obj_is_np_container(const obj_template_t *obj)
Check if the object is an Non-Presence-container.
Definition: obj.c:14487
SES_YPMODE_NONE
@ SES_YPMODE_NONE
not set
Definition: ses.h:310
xpath_yang.h
YANG-specific Xpath support.
xml_msg.h
XML and JSON Message send and receive support.
NCX_AGT_START_DISTINCT
@ NCX_AGT_START_DISTINCT
with-startup=true
Definition: ncxtypes.h:366
agt_yangpatch.h
YumaPro YANG-PATCH Edit Handler for HA/RESTCONF/NETCONF.
agt_val_parse.h
XML Parameter Value Parser Module.
agt_restcmn_obj_error
void agt_restcmn_obj_error(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, obj_template_t *errobj, const xmlChar *badval)
Record an rpc-error for YANG-API/RESTCONF response translation.
Definition: agt_restcmn.c:7389
agt_restcmn_val_error
void agt_restcmn_val_error(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errval, const xmlChar *badval)
Record an rpc-error for YANG-API/RESTCONF response translation.
Definition: agt_restcmn.c:7438
val_find_child_obj
val_value_t * val_find_child_obj(const val_value_t *parent, const struct obj_template_t_ *chobj)
Find the first instance of the specified child node Use the object template pointer to match the obje...
Definition: val.c:8612
agt_cfg_free_transaction
void agt_cfg_free_transaction(agt_cfg_transaction_t *txcb)
Clean and free a agt_cfg_transaction_t struct.
Definition: agt_cfg.c:1278
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
YANGAPI_METHOD_POST
@ YANGAPI_METHOD_POST
POST method.
Definition: yangapi.h:120
agt_sys.h
NETCONF system.yang DM module support.
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
agt_yangapi_edit_request_ex
status_t agt_yangapi_edit_request_ex(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, val_value_t *force_editval, op_editop_t force_editop, boolean skip_sil, boolean skip_save, const xmlChar *comment_str, yang_patch_edit_t *edit)
Perform an internal <edit-config> and <commit> if needed.
Definition: agt_yangapi_edit.c:1336
rpc_err.h
NETCONF protocol standard error definitions.
agt_cfg.h
Manage Server configuration edit transactions.
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_acm.h
NETCONF Server Access Control Entry Points.
val_child_swap
status_t val_child_swap(val_value_t *newchild, val_value_t *curchild)
Swap a child value node with a current value node.
Definition: val_child.c:2253
AGT_CFG_SET_SKIP_SIL
#define AGT_CFG_SET_SKIP_SIL(C)
set the skip SIL callback flag
Definition: agt_cfg.h:115
YANGAPI_LAUNCHPT_DATASTORE
@ YANGAPI_LAUNCHPT_DATASTORE
/restconf/data launch point
Definition: yangapi.h:134
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
val_get_index_string
status_t val_get_index_string(xml_msg_hdr_t *mhdr, ncx_instfmt_t format, boolean force_quotes, const val_value_t *val, xmlChar *buff, uint32 *len)
Get the index string for the specified table or container entry.
Definition: val_util.c:3707
cap.h
NETCONF protocol capabilities.
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ncx.h
YANG module utility functions.
agt_val_check_commit_edits
status_t agt_val_check_commit_edits(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source, cfg_template_t *target)
Check if the requested commit operation would cause any ACM or partial lock violations in the running...
Definition: agt_val.c:13723
VAL_INS_MODE_POINT
@ VAL_INS_MODE_POINT
YANG-API point param.
Definition: val.h:769
YANGAPI_METHOD_PATCH
@ YANGAPI_METHOD_PATCH
PATCH method.
Definition: yangapi.h:122
agt_rpcerr.h
NETCONF protocol <rpc-error> server-side handler.
obj.h
Data Object Support.
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
cfg_fill_candidate_from_running
status_t cfg_fill_candidate_from_running(ses_id_t sesid)
Fill the <candidate> config with the config contents of the <running> config.
Definition: cfg.c:1582
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
NCX_DISPLAY_MODE_MODULE
@ NCX_DISPLAY_MODE_MODULE
plain CLI display mode with YANG module names added to nodes
Definition: ncxtypes.h:457
val_convert_anyxml_to_real
status_t val_convert_anyxml_to_real(val_value_t *anyxml_val, val_value_t *real_val, val_value_t **error_val)
Convert anydata nodes to match a real template.
Definition: val_util.c:7246
agt_val_validate_write
status_t agt_val_validate_write(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, val_value_t *valroot, op_editop_t editop, boolean with_sil_callbacks)
Validate the requested <edit-config> write operation.
Definition: agt_val.c:12983
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
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.
Definition: agt_cfg.c:1716
agt_match_etag
boolean agt_match_etag(val_value_t *val, const xmlChar *etag)
Check if the etag matches the specified value string.
Definition: agt_util.c:5444
agt_yangapi_edit_request_ex2
status_t agt_yangapi_edit_request_ex2(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, val_value_t *force_editval, op_editop_t force_editop, boolean skip_sil, boolean skip_save, boolean check_candidate, boolean candidate_start_dirty, const xmlChar *comment_str, yang_patch_edit_t *edit)
Handle an edit request from DB-API (extra 2)
Definition: agt_yangapi_edit.c:1377
AGT_CFG_SET_SKIP_SAVE
#define AGT_CFG_SET_SKIP_SAVE(C)
set the skip save flag
Definition: agt_cfg.h:127
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
agt_restcmn_new_config_wrapper
val_value_t * agt_restcmn_new_config_wrapper(void)
Create a <config> wrapper val and return it.
Definition: agt_restcmn.c:7131
xmlns.h
XML namespace support.
val_free_value
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
obj_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
status.h
Global error messages for status code enumerations.
yangapi.h
YANG-API definitions (pre-RESTCONF)
YANGAPI_METHOD_PUT
@ YANGAPI_METHOD_PUT
PUT method.
Definition: yangapi.h:121
log_debug3_append
void void void void void void void void void void void void log_debug3_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG3 log entry.
xpath_convert_url_to_path
xmlChar * xpath_convert_url_to_path(const xmlChar *urlpath, ncx_name_match_t match_names, boolean alt_naming, boolean wildcards, boolean withkeys, boolean fullkeys, boolean withmod, ncx_protocol_t proto, status_t *res)
Convert a URL format path to XPath format path.
Definition: xpath.c:4374
dlq.h
dlq provides general double-linked list and queue support:
ERR_NCX_MISSING_INSTANCE
@ ERR_NCX_MISSING_INSTANCE
350 - 13.6
Definition: status_enum.h:393
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
YANGAPI_METHOD_DELETE
@ YANGAPI_METHOD_DELETE
DELETE method.
Definition: yangapi.h:123