How to add annotation to an rpc?

Hi experts,

I want to used a separate annotation file to add tailf:confirm-text to IETF rfc7317 model.
How can I compose that annotation file?

rpc system-restart { // -------- I want to add a tailf:confirm-text.
nacm:default-deny-all;
description
“Request that the entire system be restarted immediately.
A server SHOULD send an rpc reply to the client before
restarting the system.”;
}

BR,
Harry Huang

The following is the syntax for how you would do it:

  tailf:annotate-module "ietf-system" {
    tailf:annotate-statement "rpc[name='system-restart']" {
      tailf:confirm-text 'Really want to do this?';
    }
  }

You can also refer to the linuxcfg example on how to create an annotation file for the ietf-system module.

Thanks WaiTai!

Further question is that the confirm-text will only pop in CLI right?
Will it pop to Netconf also?

BR,
Harry Huang

confirm-text doesn’t apply to non-interactive Northbound interfaces such as NETCONF.