netopeer2
netopeer2 copied to clipboard
edit-config callback bug
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<sncp-function xmlns="http://openconfig.ntp/yang/brilliance-sncp">
<facility>
<rack-id>0</rack-id>
<shelf-id>1</shelf-id>
<sncp-protect>
<pg-id>0</pg-id>
<cmd-type>ADD</cmd-type>
<switch-mode>SNC-I</switch-mode>
<level>E1</level>
<direction>ONEWAY</direction>
<sd-enable>false</sd-enable>
<holdoff-time>10</holdoff-time>
<rvt-mode>true</rvt-mode>
<wtr-time>300</wtr-time>
<source-slot-index>1</source-slot-index>
<source-port-index>2</source-port-index>
<source-time-slot>3-1-1-1</source-time-slot>
<protect-slot-index>2</protect-slot-index>
<protect-port-index>1</protect-port-index>
<protect-time-slot>3-1-1-1</protect-time-slot>
<work-slot-index>3</work-slot-index>
<work-port-index>1</work-port-index>
<work-time-slot>3-1-1-1</work-time-slot>
</sncp-protect>
</facility>
</sncp-function>
</config>
</edit-config>
source-time-slot、protect-time-slot、work-time-slot node type is string.
When configured as above,protecttime-time-slot and work-time-slot the value obtained in the callback function is error, As follows:
cmd-type : ADD
switch-mode : SNC-I
level : E1
direction : ONEWAY
sd-enable : false
holdoff-time : 10
rvt-mode : true
wtr-time : 300
source-slot-index : 1
source-port-index : 2
source-time-slot : 3-1-1-1
protect-slot-index : 2
protect-port-index : 1
protect-time-slot : 3
work-slot-index : 3
work-port-index : 1
work-time-slot : 3
protect-time-slot and work-time-slot value should be 3-1-1-1, But the actual value is 3.
This error does not really make sense, what project versions are you using?
libyang version "2.13.7"; Sysrepo version "6.4.19";
How exactly are you printing the values? Could you provide the YANG module to test it with?