cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
989
Views
0
Helpful
1
Replies

multiple enum values

previousqna
Level 5
Level 5

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?

1 Accepted Solution

Accepted Solutions

previousqna
Level 5
Level 5

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".

View solution in original post

1 Reply 1

previousqna
Level 5
Level 5

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".

Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?