cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
2
Helpful
2
Replies

ydk doesn't seem to understand the "<" or ">" operations in the yang.

Manju_V1
Level 1
Level 1


Our yang model has a condition like below (sample)
   container timers {
      leaf config-1 {
        type uint16;
        default "60";
        units "seconds";
      }
      leaf config-2 {
        type uint16;
        default "180";
        units "seconds";
      }
      must "number(config-1) < number(config-2)" {
        error-message "config-1 should be lesser than config-2.";
        description
          "config-1 should be lesser than config-2";
      }
    }

But the ydk doesn't seem to understand the "<" or ">" operations in the yang.

We get the below error on doing any crud operation on this model.
ydk.errors.YPYModelError:  Unexpected character(s) '&' (&lt; number(con). Path:

On analysing, we saw that YDK copies the yang model to ~/.ydk/<MachineIP:SessionID> after replacing all “<” to “&lt” and “>” to “&gt” and uses it for its CRUD operations.

Is there any way to get past this error?

2 Replies 2