Enable tab-completion in CLI for RPCs

Hi,

I noticed that tab-completion in confd_cli for configuration elements (i.e. leafrefs) in RPCs is not enabled for non-root users. Is there a way to enable this?

Thanks!

Do you have a YANG example you can share?

Sure!

  rpc my-rpc {
    tailf:actionpoint rpc-point;
    input {
      leaf some-parameter {
        type leafref {
          path "/some/path/in/the/configuration";
        }
        mandatory true;
      }
    }
 }

When I’m root, confd_cli tab-completes correctly with all the available values for the leafref variable, while when I’m not root, it doesn’t tab-complete.

OK, I found the solution. In the nacm rules of the configuration, I needed also read permission (besides exec) for the module where the RPC is defined.

 <rule>
    <name>permit-mymodule-read</name>
    <module-name>mymodule</module-name>
    <access-operations>read</access-operations>
    <action>permit</action>
  </rule>