I have the following data model. Is it possible to provide options as below??
list list-of-names {
key "name";
ordered-by user;
leaf name {
type string;
}
leaf next-name {
typedef leafref "../name";
}
leaf prev-name {
typedef leafref "../name";
}
}
list-of-names name a
list-of-names name b
list-of-names name c
list-of-names name d
**Need to provide following way of options to the user.**
list-of-names name a next-name ? <-- Should show only b,c,d
list-of-names name b next-name ? <-- Should show only c,d
list-of-names name c next-name ? <-- Should show only d
list-of-names name d next-name ? <-- Should show nothing..As nothing is configured after d
list-of-names name d prev-name ? <-- Should show c,b,a
list-of-names name c prev-name ? <-- Should show b,a
list-of-names name b prev-name ? <-- Should show a
I don’t think this is possible to achieve without using a Tab completion callback and a validation callback to make sure the values for next and prev are valid.
Thanks for the reply, But tab completion applies only specific NorthBound API (CLI)… We want to cover all the NorthBound api’s. Instead of writing individually, is there any better approach for these issues ??