when the top container is choice, after confd restart, NBI can’t get the correct value.
my yang module
module e-complete {
yang-version "1.1";
namespace urn:rdns:com:e:oammodel:e-complete;
prefix ecomplete;
import tailf-common {
prefix tailf;
}
import ietf-yang-types {
prefix yang;
}
uses nested-choices;
grouping nested-choices {
container food {
choice snack {
case sports-arena {
choice subsnack {
case baseball-arena {
leaf beer {
type empty;
}
}
case icehockey-arena {
leaf pretzel {
type empty;
}
}
}
}
case late-night {
leaf chocolate {
type enumeration {
enum dark;
enum milk;
enum first-available;
}
}
}
}
}
}
}
my configuration
{
"e-complete:food": {"chocolate": "milk"}
}
step 1: Restart confd
step 2: my NBI command and response
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source><running/></source>
<filter type="subtree">
<food xmlns="urn:rdns:com:e:oammodel:e-complete">
</food>
</filter>
</get-config>
</rpc>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<data></data>
</rpc-reply>]]>]]>
step 3: If I update {“chocolate”: “dark”}, then run query it through NBI, i can get the new chocolate type.
Note: The issue only happens on top choice container.