libyang  1.0.184
YANG data modeling language library
Data path creation options
Collaboration diagram for Data path creation options:

Macros

#define LYD_PATH_OPT_UPDATE   0x01
 
#define LYD_PATH_OPT_NOPARENT   0x02
 
#define LYD_PATH_OPT_OUTPUT   0x04
 
#define LYD_PATH_OPT_DFLT   0x08
 
#define LYD_PATH_OPT_NOPARENTRET   0x10
 
#define LYD_PATH_OPT_EDIT   0x20
 

Detailed Description

Various options to change lyd_new_path() behavior.

Default behavior:

Macro Definition Documentation

◆ LYD_PATH_OPT_UPDATE

#define LYD_PATH_OPT_UPDATE   0x01

If the target node exists, is a leaf, and it is updated with a new value or its default flag is changed, it is returned. If the target node exists and is not a leaf or generally no change occurs in the data_tree, NULL is returned and no error set.

Definition at line 850 of file tree_data.h.

◆ LYD_PATH_OPT_NOPARENT

#define LYD_PATH_OPT_NOPARENT   0x02

If any parents of the target node do not exist, return an error instead of implicitly creating them.

Definition at line 852 of file tree_data.h.

◆ LYD_PATH_OPT_OUTPUT

#define LYD_PATH_OPT_OUTPUT   0x04

Changes the behavior to ignoring RPC/action input schema nodes and using only output ones.

Definition at line 853 of file tree_data.h.

◆ LYD_PATH_OPT_DFLT

#define LYD_PATH_OPT_DFLT   0x08

The created node (nodes, if also creating the parents) is a default one. If working with data tree of type LYD_OPT_DATA, LYD_OPT_CONFIG, LYD_OPT_RPC, LYD_OPT_RPCREPLY, or LYD_OPT_NOTIF, this flag is never needed and therefore should not be used. However, if the tree is LYD_OPT_GET, LYD_OPT_GETCONFIG, or LYD_OPT_EDIT, the default nodes are not created during validation and using this flag one can set them (see howtodatawd).

Definition at line 858 of file tree_data.h.

◆ LYD_PATH_OPT_NOPARENTRET

#define LYD_PATH_OPT_NOPARENTRET   0x10

Changes the return value in the way that even if some parents were created in addition to the path-referenced node, the path-referenced node will always be returned.

Definition at line 860 of file tree_data.h.

◆ LYD_PATH_OPT_EDIT

#define LYD_PATH_OPT_EDIT   0x20

Allows the creation of special leaves without value. These leaves are valid if used in a NETCONF edit-config with delete/remove operation.

Definition at line 862 of file tree_data.h.