Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-825

Invalid element order in generated Netconf message

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • netconf
    • None
    • Operating System: Linux
      Platform: PC

    • 1848

    Description

      The NETCONF messages sent to a device do not have elements in the RFC-required order. For instance, with the device data model containing this part

      container root {
      list policy {
      key name;
      leaf name

      { type string; }
      list rule {
      key name;
      leaf name { type string; }

      }
      }
      }

      and a POST sent to http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/mexample/yang-ext:mount/ with data

      <?xml version="1.0"?>
      <dhex:root xmlns:dhex="http://acme.com/ns/example/dhcpd">
      <dhex:policy>
      <dhex:name>e</dhex:name>
      <dhex:rule>
      <dhex:name>rule-default</dhex:name>
      </dhex:rule>
      </dhex:policy>
      </dhex:root>

      this RPC is sent to the device:

      <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-19">
      <edit-config>
      <target>
      <candidate/>
      </target>
      <error-option>rollback-on-error</error-option>
      <config>
      <root xmlns="http://tail-f.com/ns/example/dhcpd">
      <policy>
      <rule>
      <name>rule-default</name>
      </rule>
      <name>e</name>
      </policy>
      </root>
      </config>
      </edit-config>
      </rpc>

      But this is not valid, since the element "name" must be the first child of the element "policy", as required by RFC 6020.

      Note that there is already fixed yangtools YANGTOOLS-282 but it does not seem to apply here.

      Attachments

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

        Activity

          People

            tcere Tomas Cere
            volf@cngroup.dk Martin Volf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: