ConfD User Community

Disable setting of attributes by default


#1

Hi,

Currently when I set container or list all the attributes under it will be set automatically to their default values.
I would like that only the attribute that I configured will be set. All other attributes won’t be set at all.
How it can be configured?

Thanks,

Evyatar Wiesel


#2

Please explain how you come to that conclusion - because the default values aren’t actually set, even though it may appear so, depending on what interface you are looking at. And the potential answer to your question depends on that.


#3

Hi,

From confd-cli I am doing the following:

evyatar_Host1(config)# routing control-plane-protocols control-plane-protocol bgp master bgp global as 345
evyatar_Host1(config-control-plane-protocol-bgp/master)# commit
Commit complete.
evyatar_Host1(config-control-plane-protocol-bgp/master)#

The traces I got are as below:
TRACE CALL data create(thandle=27,/routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/enabled, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/as, 345) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-flap-damping/half-life-reachable, 15) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-flap-damping/half-life-unreachable, 15) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-flap-damping/max-suppress, 60) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-flap-damping/reuse, 750) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-flap-damping/suppress, 3000) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/ebgp-fast-failover, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/local-preference, 100) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/bgp-routes-limit/bgp-max-routes, 10000) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/bgp-routes-limit/bgp-routes-tca-pct, 75) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/apply-policy/default-export-policy, REJECT-ROUTE) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-distance/external-route-distance, 170) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/default-route-distance/internal-route-distance, 200) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/enabled, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/restart-time, 200) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/stale-routes-time, 240) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/helper-only, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/helper-stale-routes-time, 240) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/graceful-restart/max-restart-time, 4095) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/always-compare-med, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/missing-med-worst, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/ignore-as-path-length, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/ignore-next-hop-igp-metric, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/advertise-inactive-routes, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/prefer-existing-route, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-selection-options/deterministic-med, true) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/enable-events-notifications/enable-session-events-notification, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/enable-events-notifications/enable-prefix-tca-notitification, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/enable-events-notifications/enable-bgp-rib-tca, false) --> CONFD_ACCUMULATE
TRACE CALL data set_elem(thandle=27, /routing/control-plane-protocols/control-plane-protocol{eci-bgp:bgp master}/bgp/global/route-reflector/enabled, false) --> CONFD_ACCUMULATE

As you can see Confd sending many SET operation although I set only 1 container and 1 attribute.
I was expected to get 1 create to the container and another set to the attribute.

Regards,

Evyatar Wiesel


#4

Thanks - the data provider API by default assumes that the daemon isn’t data model aware, and thus the default values that “become in use” due to the creation of the container (see https://tools.ietf.org/html/rfc7950#section-7.6.1) are reported via set_elem() callbacks. You can change this by using the CONFD_DAEMON_FLAG_NO_DEFAULTS flag, see the confd_lib_dp(3) manual page.