i have below list for interfaces; if i use key as description; it works fine. But I want that as soon new list is open; it should ask for the interface-choice…yang model is given below;
is this possible?
list interfaces {
key "description";
leaf description
{
type string {
length "0..240";
}
}
container Choice{
choice interface-choice {
case GigabitEthernet {
leaf GigabitEthernet {
type string {
pattern '[0-9]+.*';
}
}
leaf GigabitEthernet-Description {
type string {
length "0..240";
}
}
}
case TenGigabitEthernet {
leaf TenGigabitEthernet {
type string {
pattern '[0-9]+.*';
}
}
leaf TenGigabitEthernet-Description {
type string {
length "0..240";
} } } } } }