I need to implement a yang mode for CLI: "member instance [template <name> | <instance-id>]" . The CLI has 3 prototypes: "member instance", "member instance template <name>", "member instance <id>". "member instance" means using the default template which equals "member instance template default".
Like below:
container member {
list instance {
key "instance-id";
leaf instance-id {
type uint16;
}
}
}
container member {
container instance {
list template {
key "template-name"
leaf template-name {
type string;
}
}
}
}
container member {
leaf instance {
type empty;
}
}
But I want to merge them under the same member container node. I am blocked because the list does not support empty key, how would I be able to do it? I tried 2 list keys using mandatory false, but it does not work.