Is it possible to execute a container after use command exit in a list?

I need to execute a container when i m exit a list.

list server {
key “name”;
unique “ip port”;
leaf name {
type string;
leaf ip {
type inet:ip-address;
leaf port {
type inet:port-number;
container do {
type empty;

$server 4
$name myserver
$exit /// i want to use conainer do before exit.

In my exemple i need to execute “do” just before i exit my server.
I didn’t see any usefull help in confd user guide.

You need to use tailf:action statement in your YANG model in order to define operations in your system. Refer to Chapter 11 of the ConfD User Guide for detailed description of this feature. You can also find an example in the examples.confd/intro/7-c_actions folder.

A container itself is only used for organization purposes in your data model. You will need to define a tailf:action statement inside your container in order for the operation to be invoked from the northbound interfaces.