
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
Other NSO Topics
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".
