Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-221

ControllerContext#addKeyValue ignores key type when key is derived type from instance-identifier

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • restconf-nb
    • None
    • Operating System: All
      Platform: All

    • 6099

    Description

      The ovsdb.yang model includes:

      typedef ovsdb-bridge-ref

      { description "A reference to an ovsdb bridge"; type instance-identifier; }


      list managed-node-entry {
      key "bridge-ref";
      leaf bridge-ref

      { type ovsdb-bridge-ref; }

      }

      Using the md-sal apidocs explorer, I enter the following for doing a GET on managed-node-entry with a bridge-ref key value:

      topology-id: ovsdb:1
      node-id: ovsdb:HOST1
      bridge-ref: /network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb:HOST1/bridge/br-test']

      This is what the resulting request URL looks like:
      http://localhost:8181/restconf/config/network-topology:network-topology/topology/ovsdb%3A1/node/ovsdb%3AHOST1/ovsdb:managed-node-entry/%2Fnetwork-topology%3Anetwork-topology%2Fnetwork-topology%3Atopology%5Bnetwork-topology%3Atopology-id%3D'ovsdb%3A1'%5D%2Fnetwork-topology%3Anode%5Bnetwork-topology%3Anode-id%3D'ovsdb%3AHOST1%2Fbridge%2Fbr-test'%5D/

      The response code to the request is 400 and the response body is
      {
      "errors": {
      "error": [

      { "error-type": "protocol", "error-tag": "invalid-value", "error-message": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb:HOST1/bridge/br-test'] from URI can't be resolved. " }

      ]
      }
      }

      The ODL log prints out this INFO message:
      2016-06-14 02:29:14,973 | INFO | qtp810954400-800 | RestCodec$ObjectCodec | 238 - org.opendaylight.netconf.sal-rest-connector - 1.4.0.SNAPSHOT | Value is not instance of InstanceIdentifierTypeDefinition but is class java.lang.String. Therefore NULL is used as translation of - /network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb:HOST1/bridge/br-test']

      Attachments

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

        Activity

          People

            jakubtoth-0 Jakub Toth
            ivan.hrasko@pantheon.tech Ivan Hrasko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: