68#define YANG_PATCH_DEF_SKIP_SIL TRUE
87typedef enum yang_patch_op_t_ {
100typedef enum yang_patch_edit_type_t_ {
108typedef enum yang_patch_where_t_ {
118typedef struct yang_patch_edit_t_ {
155typedef struct yang_patch_cb_t_ {
221 const xmlChar *the_comment,
222 const xmlChar *target);
259 const xmlChar *target,
260 const xmlChar *point,
283 const xmlChar *target,
284 const xmlChar *point,
287 boolean plain_clone);
310 const xmlChar *edit_id);
341extern const xmlChar *
363extern const xmlChar *
385extern const xmlChar *
436 boolean preserve_editval,
456 const xmlChar *target,
457 boolean preserve_patchval,
dlq provides general double-linked list and queue support:
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
yang_patch_edit_t * yang_patch_new_edit(const xmlChar *edit_id, yang_patch_op_t operation, const xmlChar *target, const xmlChar *point, yang_patch_where_t insert_where, val_value_t *value)
Malloc a new YANG Patch edit control block Any of the fields can be NULL to add later or not use.
Definition: yang_patch.c:254
yang_patch_op_t yang_patch_editop_to_op(op_editop_t edit_op)
Convert an edit operation enum to a YANG Patch operation enum.
Definition: yang_patch.c:1219
const xmlChar * yang_patch_op_to_str(yang_patch_op_t op)
Convert a YANG Patch operation enum to the operation string for the enumeration.
Definition: yang_patch.c:525
val_value_t * yang_patch_edit_to_value(obj_template_t *edit_obj, yang_patch_edit_t *edit, status_t *res)
Convert a YANG Patch edit to a val_value_t tree.
Definition: yang_patch.c:695
yang_patch_cb_t * yang_patch_value_to_patch(val_value_t *patch_val, const xmlChar *target, boolean preserve_patchval, status_t *res)
Convert a val_value tree to a YANG Patch control block.
Definition: yang_patch.c:1074
op_editop_t yang_patch_op_to_editop(yang_patch_op_t op, boolean *is_insert)
Convert a YANG Patch operation enum to the corresponding edit operation.
Definition: yang_patch.c:1170
void yang_patch_cleanup(void)
Cleanup the yang_patch module.
Definition: yang_patch.c:140
yang_patch_cb_t * yang_patch_new_cb(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *target)
Malloc a new YANG Patch control block.
Definition: yang_patch.c:161
void yang_patch_free_edit(yang_patch_edit_t *edit)
Free a YANG Patch edit control block.
Definition: yang_patch.c:366
val_value_t * yang_patch_to_value(obj_template_t *patch_obj, yang_patch_cb_t *pcb, status_t *res)
Convert a YANG Patch control block to a val_value_t tree.
Definition: yang_patch.c:862
yang_patch_edit_t * yang_patch_value_to_edit(val_value_t *edit_val, boolean preserve_editval, status_t *res)
Convert a val_value_t tree to a YANG Patch edit.
Definition: yang_patch.c:951
yang_patch_where_t yang_patch_str_to_where(const xmlChar *wherestr)
Convert a YANG Patch where string to the where enumeration for the string.
Definition: yang_patch.c:624
status_t yang_patch_init(void)
Load the ietf-yang-patch module.
Definition: yang_patch.c:119
const xmlChar * yang_patch_where_to_str(yang_patch_where_t wh)
Convert a YANG Patch where enum to the where string for the enumeration.
Definition: yang_patch.c:660
yang_patch_where_t
YANG Patch insert location.
Definition: yang_patch.h:108
void yang_patch_free_cb(yang_patch_cb_t *pcb)
Free a YANG Patch control block.
Definition: yang_patch.c:213
const xmlChar * yang_patch_edit_type_to_str(yang_patch_edit_type_t typ)
Convert a YANG Patch edit type enum to the string for the enumeration.
Definition: yang_patch.c:596
void yang_patch_dump_pcb(yang_patch_cb_t *pcb)
Dump the current Patch Control block with all the edits.
Definition: yang_patch.c:1264
yang_patch_op_t yang_patch_str_to_op(const xmlChar *opstr)
Convert a YANG Patch operation string to the operation enumeration for the string.
Definition: yang_patch.c:472
yang_patch_edit_type_t
Internal edit type for access control and DB-API support.
Definition: yang_patch.h:100
yang_patch_edit_type_t yang_patch_str_to_edit_type(const xmlChar *str)
Convert a YANG Patch edit-type string to the edit_type enumeration for the string.
Definition: yang_patch.c:563
yang_patch_op_t
YANG Patch operation type.
Definition: yang_patch.h:87
uint32 yang_patch_edit_count(yang_patch_cb_t *pcb)
Get the number of edits in the PCB.
Definition: yang_patch.c:447
yang_patch_edit_t * yang_patch_find_edit(yang_patch_cb_t *pcb, const xmlChar *edit_id)
Find an edit by its edit_id in the YANG Patch.
Definition: yang_patch.c:416
yang_patch_edit_t * yang_patch_new_edit2(const xmlChar *edit_id, yang_patch_op_t operation, const xmlChar *target, const xmlChar *point, yang_patch_where_t insert_where, val_value_t *value, boolean plain_clone)
Malloc a new YANG Patch edit control block Any of the fields can be NULL to add later or not use.
Definition: yang_patch.c:292
void yang_patch_add_edit(yang_patch_cb_t *pcb, yang_patch_edit_t *edit)
Malloc and add new YANG Patch edit control block.
Definition: yang_patch.c:392
@ YANG_PATCH_WHERE_FIRST
insert first
Definition: yang_patch.h:112
@ YANG_PATCH_WHERE_NONE
not set
Definition: yang_patch.h:109
@ YANG_PATCH_WHERE_AFTER
insert after foo
Definition: yang_patch.h:111
@ YANG_PATCH_WHERE_BEFORE
insert before foo
Definition: yang_patch.h:110
@ YANG_PATCH_WHERE_LAST
insert lsat (default)
Definition: yang_patch.h:113
@ YANG_PATCH_EDIT_TYPE_USER
edit by user
Definition: yang_patch.h:102
@ YANG_PATCH_EDIT_TYPE_SYSTEM
edit by system
Definition: yang_patch.h:103
@ YANG_PATCH_EDIT_TYPE_NONE
not set
Definition: yang_patch.h:101
@ YANG_PATCH_OP_REMOVE
remove
Definition: yang_patch.h:95
@ YANG_PATCH_OP_MERGE
merge
Definition: yang_patch.h:92
@ YANG_PATCH_OP_INSERT
insert
Definition: yang_patch.h:91
@ YANG_PATCH_OP_CREATE
create
Definition: yang_patch.h:89
@ YANG_PATCH_OP_DELETE
delete
Definition: yang_patch.h:90
@ YANG_PATCH_OP_REPLACE
replace
Definition: yang_patch.h:94
@ YANG_PATCH_OP_MOVE
move
Definition: yang_patch.h:93
@ YANG_PATCH_OP_NONE
not set
Definition: yang_patch.h:88
status_t
global error return code
Definition: status_enum.h:210
NETCONF protocol operations.
Global error messages for status code enumerations.
One YANG data-def-stmt.
Definition: obj.h:1229
one value to match one type
Definition: val.h:912
One YANG Patch Request.
Definition: yang_patch.h:155
yang_patch_edit_type_t edit_type
edit type (user or system)
Definition: yang_patch.h:163
boolean skip_sil
skip SIL callback; used by DB-API to control edit in main server
Definition: yang_patch.h:166
xmlChar * target
In case of HA and NETCONF this 'target' uses the datastore root '/' as the target resource and use th...
Definition: yang_patch.h:178
dlq_hdr_t editQ
Parsed edits: Q of yang_patch_edit_t.
Definition: yang_patch.h:181
dlq_hdr_t qhdr
in case used in Queue of patches
Definition: yang_patch.h:157
xmlChar * comment
comment provided for this patch
Definition: yang_patch.h:169
xmlChar * patch_id
patch ID is usually the transaction-id
Definition: yang_patch.h:160
Represents one YANG Patch edit entry.
Definition: yang_patch.h:118
xmlChar * edit_id
edit identifier string from request
Definition: yang_patch.h:123
xmlChar * point
point parameter for insert from request
Definition: yang_patch.h:132
xmlChar * target
data path target from request
Definition: yang_patch.h:129
yang_patch_op_t operation
edit operation from request
Definition: yang_patch.h:126
dlq_hdr_t qhdr
queue header
Definition: yang_patch.h:120
val_value_t * value
edit value from request (not provided for delete)
Definition: yang_patch.h:138
yang_patch_where_t insert_where
insert where parameter for insert from request
Definition: yang_patch.h:135
val_value_t * targval
REAL target value for the current EDIT.
Definition: yang_patch.h:146
boolean lastedit
flag for last edit
Definition: yang_patch.h:149
val_value_t * configval
the 'root' value struct that represents the tree of changes to apply to the target
Definition: yang_patch.h:143
Value Node Basic Support.