Conditional assignment of default values in yang

Viewed 1881

I have two properties in a model:

  • leaf protocol,
  • leaf port.

I want to specify that:

  • if protocol = 'ssh' then default port value is 22,
  • if protocol = 'http' then default port value is 80,
  • etc.

How do I express this in yang ?

1 Answers
Related