Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling the lyd_new_any interface returns inconsistent results between version 2.1.30 and version 2.1.128 #2236

Open
sicongPang opened this issue May 16, 2024 · 1 comment
Labels
is:question Issue is actually a question.

Comments

@sicongPang
Copy link

sicongPang commented May 16, 2024

image

input parameters:

data:

<edit-config xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n  <target>\n    <running/>\n  </target>\n  <default-operation>none</default-operation>\n  <error-option>stop-on-error</error-option>\n</edit-config>\n

mod:

{ctx = 0x197abc0, name = 0x196f710 "ietf-netconf", revision = 0x1970d00 "2011-06-01", ns = 0x1964d00 "urn:ietf:params:xml:ns:netconf:base:1.0", prefix = 0x196eba0 "nc",
  filepath = 0x0, org = 0x195af40 "IETF NETCONF (Network Configuration) Working Group",
  contact = 0x1970440 "WG Web:   <http://tools.ietf.org/wg/netconf/>\nWG List:  <netconf@ietf.org>\nWG Chair: Bert Wijnen\n          <bertietf@bwijnen.net>\nWG Chair: Mehmet Ersue\n          <mehmet.ersue@nsn.com>\nEditor:   Martin Bjorklund\n          <mbj@tail-f.com>\nEditor:   Juergen Schoenwaelder\n          <j.schoenwaelder@jacobs-university.de>\nEditor:   Andy Bierman\n          <andy.bierman@brocade.com>",
  dsc = 0x19705d0 "NETCONF Protocol Data Types and Protocol Operations.\nCopyright (c) 2011 IETF Trust and the persons identified as\nthe document authors.  All rights reserved.\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\nThis version of this YANG module is part of RFC 6241; see\nthe RFC itself for full legal notices.", ref = 0x0, parsed = 0x1970320, compiled = 0x19836b0, identities = 0x0, augmented_by = 0x1985ef8, deviated_by = 0x0, implemented = 1 '\001',
  to_compile = 0 '\000', latest_revision = 5 '\005'}

rpc_e->edit_cont:

<testsdk xmlns=\"urn:test:yang:test-vrp-testsdk\">
  <TsdkTypeInners>
    <TsdkTypeInner operation=\"create\">
      <TestIndex>10001</TestIndex>
      <TestBinary>42594</TestBinary>
      <TestBool>false</TestBool>
      <TestInt16>20</TestInt16>
      <TestInt32>2147483647</TestInt32>
      <TestInt64>2000</TestInt64>
      <TestInt8>127</TestInt8>
      <TestString1>test</TestString1>
      <TestString2>writebackadd</TestString2>
      <TestUint16>3</TestUint16>
      <TestUint32>100</TestUint32>
      <TestUint64>4294967295</TestUint64>
      <TestUint8>255</TestUint8>
      <TestName>1</TestName>
      <TestTimeticks>4294967295</TestTimeticks>
      <TestIpversion>ipv4</TestIpversion>
      <TestIpaddress>0.0.0.0</TestIpaddress>
      <TestIpnozone>::</TestIpnozone>
      <TestIpv4nozone>158.5.156.1</TestIpv4nozone>
      <TestIpv6nozone>1234:ABCD:1234:ABCD:1234:ABCD:1234:ABCD</TestIpv6nozone>
      <TestDate>1970-01-01</TestDate>
      <TestTime>11:11:11</TestTime>
      <TestDatetime>1971-01-01T10:10:10</TestDatetime>
      <TestTimehhmm>11:11</TestTimehhmm>
      <TestPassword>test#$</TestPassword>
      <TestPasswordex>test#$~@-^*%/.+:;=</TestPasswordex>
      <TestTribit1>0</TestTribit1>
      <TestTribit2>0</TestTribit2>
      <TestTribit4>0</TestTribit4>
      <TestTribit8>0</TestTribit8>
      <TestCistring>jidajiojhwiuehrd328bhb</TestCistring>
      <TestMAC>0000-0000-0000</TestMAC>
    </TsdkTypeInner>
  </TsdkTypeInners>
</testsdk>

ouput:
"data" results output from version 2.1.128:

<edit-config xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">
  <target>
    <running/>
  </target>
  <default-operation>none</default-operation>
  <error-option>stop-on-error</error-option>
  <config>
    <testsdk xmlns="urn:test:yang:test-vrp-testsdk">
      <TsdkTypeInners>
        <TsdkTypeInner>
          <TestIndex>10001</TestIndex>
          <TestName>1</TestName>
          <TestBinary>42594</TestBinary>
          <TestBool>false</TestBool>
          <TestInt16>20</TestInt16>
          <TestInt32>2147483647</TestInt32>
          <TestInt64>2000</TestInt64>
          <TestInt8>127</TestInt8>
          <TestString1>test</TestString1>
          <TestString2>writebackadd</TestString2>
          <TestUint16>3</TestUint16>
          <TestUint32>100</TestUint32>
          <TestUint64>4294967295</TestUint64>
          <TestUint8>255</TestUint8>
          <TestTimeticks>4294967295</TestTimeticks>
          <TestIpversion>ipv4</TestIpversion>
          <TestIpaddress>0.0.0.0</TestIpaddress>
          <TestIpnozone>::</TestIpnozone>
          <TestIpv4nozone>158.5.156.1</TestIpv4nozone>
          <TestIpv6nozone>1234:abcd:1234:abcd:1234:abcd:1234:abcd</TestIpv6nozone>
          <TestDate>1970-01-01</TestDate>
          <TestTime>11:11:11</TestTime>
          <TestDatetime>1971-01-01T10:10:10</TestDatetime>
          <TestTimehhmm>11:11</TestTimehhmm>
          <TestPassword>test#$</TestPassword>
          <TestPasswordex>test#$~@-^*%/.+:;=</TestPasswordex>
          <TestTribit1>0</TestTribit1>
          <TestTribit2>0</TestTribit2>
          <TestTribit4>0</TestTribit4>
          <TestTribit8>0</TestTribit8>
          <TestCistring>jidajiojhwiuehrd328bhb</TestCistring>
          <TestMAC>0000-0000-0000</TestMAC>
        </TsdkTypeInner>
      </TsdkTypeInners>
    </testsdk>
  </config>
</edit-config>

"data" results output from version 2.1.30:

<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <running/>
  </target>
  <default-operation>none</default-operation>
  <error-option>stop-on-error</error-option>
  <config><testsdk xmlns="urn:test:yang:test-vrp-testsdk">
  <TsdkTypeInners>
    <TsdkTypeInner operation="create">
      <TestIndex>10001</TestIndex>
      <TestBinary>42594</TestBinary>
      <TestBool>false</TestBool>
      <TestInt16>20</TestInt16>
      <TestInt32>2147483647</TestInt32>
      <TestInt64>2000</TestInt64>
      <TestInt8>127</TestInt8>
      <TestString1>test</TestString1>
      <TestString2>writebackadd</TestString2>
      <TestUint16>3</TestUint16>
      <TestUint32>100</TestUint32>
      <TestUint64>4294967295</TestUint64>
      <TestUint8>255</TestUint8>
      <TestName>1</TestName>
      <TestTimeticks>4294967295</TestTimeticks>
      <TestIpversion>ipv4</TestIpversion>
      <TestIpaddress>0.0.0.0</TestIpaddress>
      <TestIpnozone>::</TestIpnozone>
      <TestIpv4nozone>158.5.156.1</TestIpv4nozone>
      <TestIpv6nozone>1234:ABCD:1234:ABCD:1234:ABCD:1234:ABCD</TestIpv6nozone>
      <TestDate>1970-01-01</TestDate>
      <TestTime>11:11:11</TestTime>
      <TestDatetime>1971-01-01T10:10:10</TestDatetime>
      <TestTimehhmm>11:11</TestTimehhmm>
      <TestPassword>test#$</TestPassword>
      <TestPasswordex>test#$~@-^*%/.+:;=</TestPasswordex>
      <TestTribit1>0</TestTribit1>
      <TestTribit2>0</TestTribit2>
      <TestTribit4>0</TestTribit4>
      <TestTribit8>0</TestTribit8>
      <TestCistring>jidajiojhwiuehrd328bhb</TestCistring>
      <TestMAC>0000-0000-0000</TestMAC>
    </TsdkTypeInner>
  </TsdkTypeInners>
</testsdk>
</config>
</edit-config>

The main difference between the two is the output TsdkTypeInner field. 2.1.30 has the "create" operator, but 2.1.128 does not have the "create" operator.

@michalvasko
Copy link
Member

Not sure what that create attribute is supposed to represent but it does even have a namespace, which makes it invalid in YANG. So I assume it is a bug and it is correctly fixed in newer versions.

@michalvasko michalvasko added the is:question Issue is actually a question. label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

2 participants