Multiple call points in a single list?

Hi All!

I have a list as below for operational data

List X {
tailf:callpoint mycp;
key a;

leaf a {
type string;
tailf:callpoint mycpa;
}

leaf b {
type string;
tailf:callpoint mycpb;
}

leaf c {
type string;
tailf:callpoint mycpc;
}
}

I see always mycp is called. Please let me know if what I am doing wrong ?. Is their a different way to acheive the same ?.

If you indeed registered for all callpoint id’s using confd_register_data_cb(), for example your get_elem() callback registered under “leaf a” will be called when ConfD want to get the leaf a string, etc.

I missed adding this I have my list configured as

List X {
tailf:callpoint mycp;
tailf:cli-incomplete-show-path;
key a;

leaf a {
type string;
tailf:callpoint mycpa;
}

leaf b {
type string;
tailf:callpoint mycpb;
}

when I entered

X --> mycp called

X a ==> without any value mycp called ==> here is it not possible to make mycpa execute ?

X a ‘string’ ==> mycpa called…

What are you doing here? Are you setting a value? Are you doing a tab completion? Are you doing a show? What existing values have you entered already? What callbacks have you implemented? E.g. get_elem, get_next_elem, create, set_elem, etc?

More importantly, why is this an issue for you?

what are you doing here ? ==> I am executing a show command and show command has different pattern
Are you setting a value ? ==> no
Are you doing a tab completion ? ==> no if this is a question on my callpoint.
Callbacks for getNext, getNextObject, getObject implemented…

Issue here is lets take below entries for the list

List X entries:

a+++++++b+++++++c
ABC+++None+++++Set
DEF+++Set++++++None
GHI+++None+++++Set
JKL+++None+++++Set
None++None++++None
so now if someone does

show X b ==> I have to show only those for which b is Set
show X c ==> I have to show only those for which c is Set
show X a ==> I have to show all entries excluding those don’t have None in a
show X ==> It will show all entries

But apparently though I have defined different callpoints I see all entries printed which means its an output of

show X for all above combinations

ConfD does not know the content of your list so you can’t get the behaviour you want, hence I suggest that you just remove the callpoints under your leafs, keeping the callpoint at the list level.

ConfD will then behave like this in your case:

show X ==> ConfD will call your get_next_object() to get the entire list
show X a ==> You mean that you pass a key, e.g. “ABC” here? ConfD will call your get_object() callback for the list entry and display all leafs in that list entry. If the list entry does not exist you call “confd_data_reply_not_found()” from your callback.
show X b ==> ConfD will call your get_next_object() callback for getting the list and from that list display only the value in leaf b for each list entry.
show X c ==> same as show X b.