libyang 2.0.231
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Data path creation options
Collaboration diagram for Data path creation options:

Macros

#define LYD_NEW_PATH_BIN_VALUE   0x08
 
#define LYD_NEW_PATH_CANON_VALUE   0x10
 
#define LYD_NEW_PATH_OPAQ   0x04
 
#define LYD_NEW_PATH_OUTPUT   0x02
 
#define LYD_NEW_PATH_UPDATE   0x01
 

Detailed Description

Various options to change lyd_new_path*() behavior.

Default behavior:

Macro Definition Documentation

◆ LYD_NEW_PATH_BIN_VALUE

#define LYD_NEW_PATH_BIN_VALUE   0x08

Interpret the provided leaf/leaf-list value as being in the binary LY_VALUE_LYB format, to learn what exactly is expected see LYB Binary Format.

Definition at line 1533 of file tree_data.h.

◆ LYD_NEW_PATH_CANON_VALUE

#define LYD_NEW_PATH_CANON_VALUE   0x10

Interpret the provided leaf/leaf-list value as being in the canonical (or JSON if no defined) LY_VALUE_CANON format. If it is not, it may lead to unexpected behavior.

Definition at line 1536 of file tree_data.h.

◆ LYD_NEW_PATH_OPAQ

#define LYD_NEW_PATH_OPAQ   0x04

Enables the creation of opaque nodes with some specific rules. If the last node in the path is not uniquely defined ((leaf-)list without a predicate) or has an invalid value (leaf/leaf-list), it is created as opaque.

Definition at line 1531 of file tree_data.h.

◆ LYD_NEW_PATH_OUTPUT

#define LYD_NEW_PATH_OUTPUT   0x02

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

Definition at line 1528 of file tree_data.h.

◆ LYD_NEW_PATH_UPDATE

#define LYD_NEW_PATH_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 parent tree, NULL is returned and no error set.

Definition at line 1526 of file tree_data.h.