If you have a YANG module which contains a list, you might find that using the create command in yangcli-pro won’t allow you to specify the “name” and “description” in the “id” container.
Here is a simple example YANG module containing a list:
container myContainer { description "Example container."; list myList { key myIndex; description "List inside a container."; leaf myIndex { type myTypes:index; description "The Index of the service domain."; } container id { description "Service domain identification."; leaf name { type myTypes:name-string; description "The name of the service domain."; } leaf description { type myTypes:description-string; description "Description of the service domain."; } } } } |
To create the list item for this module with yangcli-pro, add the --optional parameter to your create operation so it will prompt you for the optional fields.
To skip values:
When prompted for a field, use ?s to skip a field and ?se to skip to the end of the current set of sibling nodes (e.g., finish the list)
Example:
create --optional /myContainer/myList