ConfD User Community

Subscription and callpoint to the same path

I have yang data model that mixes configurational and operational parameters, which should be possible according to RFC 8342. However, if I define callpoint to the root of my model and try to subscribe to the same root the subscription fails with the error “badly formatted or nonexistent path”.
How to deal with it? Does confd limits subscription to paths not covered by callpoints?

You don’t show details of your data model, so I’m only guessing. If you do something like

container root {
  tailf:callpoint mycp;
  ...
}

then you are saying that everything in your data model is handled in an external database, i.e. it is not CDB-based; and you cannot create CDB subscriptions on data not stored in CDB.

I should have added that you can also be doing something like

container root {
  tailf:callpoint mycp {
    tailf:config false;
  }
 ...
}

In this case it should work, as the tailf:config false tells confd that the callpoint takes effect only on config false subnodes. Is this your case?

Thank you for your answer. My yang data model a little bit more complex. Here is a simplified version:

	container root {
	tailf:callpoint "mycp";
	list collection {
		key name;
		leaf name {
			type string;
		}
		leaf config {
			type string;
		}
		leaf status {
			config false;
			type string;
		}
	}
}

I want a subscription and callpoint to use the same path “/root”, however when confd starts and tries to register subscription the error happens “badly formatted or nonexistent path”.

If the data for the schema / YANG model that your path point to is not stored in CDB, you cannot use the CDB API to get the data, subscribe to it´, etc.

How to deal with such a model then? I want to store config data in CDB but I don’t want to replicate the whole list just for keeping operational data. Apparently IETF yang data models start obsoleting separate lists for config/operational data as well.

If so, seems like you want to use @mvf 's answer.

tailf:callpoint mycp {
    tailf:config false;
}

See the tailf_yang_extensions(5) man page under tailf:callpoint for details on the tailf:config substatement.

Thank you for your answer. Somehow I missed the second explanation from mvf. It works.