Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-923

Opendaylight netconf parser removes namespaces in anyxml container before sending request to router

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 2.0.13, 2.1.4
    • 2.1.5, 2.0.14, 2.0.6.6
    • codecs
    • java version "1.8.0_161"

      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)

      Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

       

      opendaylight-user*@*root>version

      4.1.3

    Description

      When sending the following restconf request to ODL, it looks like the parser is stripping off the second xmlns attribute.  

      Post request: 

      http://<ODL-Server>:8181/restconf/operations/network-topology:network-topology/topology/topology-netconf/node/<Device>/yang-ext:mount/tailf-actions:action/input/

      <action xmlns="http://tail-f.com/ns/netconf/actions/1.0">
      <data>
      <hw-module xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-hw-module">
      <oper>
      <location>
      <location>all</location>
      <actions>
      <reload/>
      </actions>
      </location>
      </oper>
      </hw-module>
      </data>
      </action>

       

      When checking the ODL logs seeing it removes the second xmlns.

      request: <rpc message-id="m-1408" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

      <action xmlns="http://tail-f.com/ns/netconf/actions/1.0">

      <data>

          <hw-module>

            <oper>

              <location>

                <location>all</location>

                <actions>

                  <reload/>

                </actions>

              </location>

            </oper>

          </hw-module>

        </data>

      </action>

      </rpc>

       

      The following raw netconf-yang rpc works:

      <rpc message-id="edcfd773-daac-4fdd-9867-053d4742d453" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <data>
          <hw-module xmlns="http://www.cisco.com/ns/yang/Cisco-IOS-XR-sysadmin-hw-module">
            <oper>
              <location>
                <location>all</location>
                <actions>
                  <reload/>
                </actions>
              </location>
            </oper>
          </hw-module>
        </data>
      </action>
      </rpc> 

      In the yang file the input rpc action is defined as:

       

        rpc action {

          description

            "Support Tail-F actions rpc format.";

       

          reference "RFC 6241, Section 7.1";

       

          input

      Unknown macro: {       anyxml data Unknown macro}

          }

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              JMorvay Jakub Morvay
              gsb5067 Gregory Brown
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: