Default values not reflecting

Hello Team,

I have two leaf nodes: (config false)

  1. Ipv4: type inet:ipv4-address
  2. Decision: type string

I have set the default value of Decision as “-EMPTY-” but the model doesn’t honor that. The field shows empty space instead of the string “-EMPTY-”

I haven’t set any default value of the ipv4 node and the model displays “–ERROR–” if the field is not set.

The desire is to let the ipv4 field display empty space if the value is not set.
Also, if a specific row is not updated/populated with any value then can we choose to not print that row at all? (instead of printing the default values in every column of the row)

Can you please suggest.

Since you have operatinal data (config false), do you use data provider od operatinak data stored in CDB? if you use data provider, then you need to return value C_DEFAULT.

confd_value_t v;
CONFD_SET_DEFAULT(&v);
confd_data_reply_value(tctx, &v);

What command/interface do you use to display values of datamodel?
See also confd.conf sdettings

/confdConfig/defaultHandlingMode (explicit | trim | report-all) [explicit]
And change it if needed.
(in ConfD User Guide - section confd,.conf)

'explicit' If a value is set over a northbound interface, it is not considered default.
Default values are not displayed in northbound interfaces, unless asked for by the user.

I have two leaf nodes: (config false)

is it a) CDB stored operation data, or b) data provider?

I have set the default value of Decision as “-EMPTY-” but the model doesn’t honor that. The field shows empty space instead of the string “-EMPTY-”

You do not mention what northbound interface you use to “show” model/data.
CLI by default does NOT display default values, unless configured otherwise… try adding “| details” to your CL command…

Some example with config true data, but config false should behave in same manner:

dev(config)# show full-configuration llb
% No entries found.
dev(config)# show full-configuration llb | details
llb suspect [ suspect ]

(YANG with leaf-list with default value).

I haven’t set any default value of the ipv4 node and the model displays “–ERROR–” if the field is not set.

This “-ERROR-” is usually flag of some problems between YANG element specification, and data provider (assuming you are using b)) that returns “invalid” data → e.g. YANG expects string, you return integer, etc.
If this is the case, it should be visible in developer log of ConfD.

As for the last table view of data and column skip → hopefully someone else can help, I haven’t used it too much… though please note that iterating over whole table to affect formatting (of all table rows) might not be great idea performance-wise…