Disregarding the errors in your YANG snippets (e.g. annotate instead of tailf:annotate), which I assume are due to writing āfrom memoryā instead of just cut&pasteāing from your actual modules (I donāt see why people do that, but youāre certainly not the only one:-), the most likely cause of your problem is that you havenāt actually used your annotation module when compiling the main module.
A simple way to check this, that doesnāt require starting up ConfD or your application, is to create a .h file from the .fxs (perhaps you do that anyway) - it should include #defines for all actionpoints, callpoints, etc. Demo:
$ confdc -c -a ni-ann.yang ni.yang
$ confdc --emit-h ni.h ni.fxs
$ grep point ni.h
#define ni__actionpointid_loopback_point "loopback-point"
Do you have such a #define in your .h file? By the way, it is a good idea to actually use the defined symbol instead of the string in your code - that way you avoid spelling errors, since they will be caught by your (C) compiler. But using the string should also work fine.
Edit: Sorry, I see that you actually had tailf:annotate, it was just that scrolling the snippet sideways in my browser caused exactly the tailf: part to ādisappearāā¦
Double check that you really have definition of actionpoint in executed fxs files/models.
Try running āconfd --statusā command in bash, and look into āactionpoints:ā section, you should see something like this:
(I copy&pasted actionpoint names/status examples from ConfD example - intro/7-c_actions)
actionpoints:
id=reboot-point ** not registered
when you donāt have data provider registered, or, in case you already do:
Actually, this error means exactly that there is no actionpoint in the model. If there is an actionpoint, but it hasnāt been registered for, you would get an āapplication communication failureā error when ConfD attemps to invoke your callback - the problem would also be logged with more details in the devel.log.
In that case it seems that this .h file was not generated from the .fxs that you are actually loading into ConfD. One possibility (rather far-fetched) for that could be that you generate the .h from the .yang file, using the annotation module, and then compile the .yang to .fxs without the annotation module:
I.e. in that case there would be no actionpoint in the .fxs, as demonstrated by the ni2.h file not having the #define (while ni.h does). Please review the exact steps you are taking, starting with the .yang file, up to the point where you provide the .fxs file for ConfD to load.
You can take a look at $CONFD_DIR/examples.confd/intro/7-c_actions for how registration works. When you register the callbacks for the action you call confd_register_action_cbs(). You can set up separate sets of callback functions for the different actions, and call this again for a second action. Once you are done registering all the actions that this application will handle, then you can call confd_register_done() so that ConfD knows that your application is finished with the registration, and the application is ready to begin processing actions.
Note too that in this example, the same actionpoint is used for multiple actions, so that you donāt need to necessarily have a separate action handler for each action.