Here is my yang definition.
list vlan {
key "vlan-id";
leaf vlan-id{
type UINT16{
range "1..4094";
}
}
}
I have configured vlan 100.
Then I show vlan 1 and expect to confd prompt some err. But confd return vlan 100.
while I show vlan 2 and confd prompt expected err.
**E3-2# show vlan 1**
** vlan 100**
E3-2# show van 2
----------------^
syntax error: unknown element
The following is the entire process between confd and my application.
step1. confd send get_elem request for callpoint status_cp path /base:status/system/vlan{1}/vlan-id.
step2. lmd can’t find vlan1(only configured vlan100), and return confd_data_reply_not_found.
step3. confd sends get_next -1 request for callpoint status_cp path /base:status/system/vlan
==>Q1: why does confd still send get_next request after receiving confd_data_reply_not_found?
step4.lmd find vlan100, and return vlan100 and next index 1 in the function confd_data_reply_value.
step5.confd sends get_next again, and lmd find there is no other vlan, return next index -1.
step6.confd does match vlan 100 successfully, and send get next request to get vlan 100 detail configuration info.
===>Q2: why shortest match 100 ?
thanks.