netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

edit-config callback bug

Open linbolin opened this issue 3 years ago • 3 comments

<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.

linbolin avatar Apr 12 '22 07:04 linbolin

This error does not really make sense, what project versions are you using?

michalvasko avatar Apr 12 '22 08:04 michalvasko

libyang version "2.13.7"; Sysrepo version "6.4.19";

linbolin avatar Apr 20 '22 02:04 linbolin

How exactly are you printing the values? Could you provide the YANG module to test it with?

michalvasko avatar Apr 20 '22 05:04 michalvasko