Skip to content

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

@manjuv1

Description

@manjuv1

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 (version 0.6.2) 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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions