05-10-2017 02:40 AM - edited 03-01-2019 03:49 AM
Hi team,
I want the user to choose multi enum values
For example:
leaf color {
type enumeration {
enum red;
enum blue;
enum green;
}
}
The user can choose color= ‘red’, ’red,blue’, ’red,blue,green’ etc.
How to write the YANG constrain for this?
Solved! Go to Solution.
05-10-2017 02:40 AM
Make it a leaf-list instead of a leaf. A leaf-list is like an array of scalar values.
Or use the type "bits" instead of "enumeration".
05-10-2017 02:40 AM
Make it a leaf-list instead of a leaf. A leaf-list is like an array of scalar values.
Or use the type "bits" instead of "enumeration".
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide