ConfD User Community

How to avoid "syntax error: unknown argument"


#1

I am having yang model as below

   container statistics
   {
     tailf:info "Application statistics";
 
     container detail
     {
       tailf:info "Detail statistics";
       list data {
         key "category name instance";
         config false;
         tailf:callpoint statistic-detail;

         leaf category {
           type string;
         }
         leaf name {
           type string;
         }
         leaf instance {
           type string;
         }
         leaf current
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf average
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf min
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf max
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf timestamp
         {
           type yang:date-and-time;
         }
       }
    }
  } 

I am facing ‘syntax error: unknown argument’ as below if data is absent

admin@orchestrator# show statistics detail data directortps
---------------------------------------------------------------------------^
syntax error: unknown argument

But this issue is not seen if name(directortps) is removed

admin@orchestrator[master-0]# show statistics detail data   
% No entries found.
admin@orchestrator[master-0]#

Is there any way I can avoid ‘syntax error: unknown argument’ message? Should I use tailf:default-ref for name leaf?


#2

Try adding

container detail
{
presence true;


#3

Hello, this did not help. Is there any other way to fix this?

Regards,
Kedar.


#4

There is no member with “directopts” present.
BR


#5

yes, there is no member with “directortps” as it is value of leaf

name

So, in this case, should I recommend to avoid using

directortps

as confd does not seem to have any solution to

syntax error: unknown argument

error ?

Thank you for your support.


#6

So what does the ConfD developer log (with log level set to trace) say about what your data provider is providing back to ConfD. I.e. your data provider application that registered for the “statistics-detail” callpoint?