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

Adding topology-netconf node via Restconf/XML fails

XMLWordPrintable

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

    • 8939
    • High

      I am trying to mount netconf device as explained on the wiki:

      https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf#Spawning_netconf_connectors_via_topology_configuration

      feature:install odl-netconf-topology odl-restconf-all

      then

      PUT http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp

      <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
      <node-id>vpp</node-id>
      <host xmlns="urn:opendaylight:netconf-node-topology">127.0.0.1</host>
      <port xmlns="urn:opendaylight:netconf-node-topology">2831</port>
      <username xmlns="urn:opendaylight:netconf-node-topology">admin</username>
      <password xmlns="urn:opendaylight:netconf-node-topology">admin</password>
      <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
      <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay>
      </node>

      I got following exception:

      2017-08-07 12:28:46,751 | ERROR | tp1414323362-290 | SnapshotBackedWriteTransaction | 258 - org.opendaylight.controller.sal-core-spi - 1.6.0.SNAPSHOT | Tx: member-1-datastore-config-fe-0-txn-10-0, failed to write /(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology/topology/topology[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=topology-netconf}

      ]/node/node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ]/node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ]:ImmutableMapEntryNode{nodeIdentifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ], value=[ImmutableLeafNode{nodeIdentifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id, value=vpp, attributes={}}, ImmutableAugmentationNode{nodeIdentifier=AugmentationIdentifier

      {childNames=[(urn:opendaylight:netconf-node-topology?revision=2015-01-14)connection-status, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)clustered-connection-status, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)connected-message, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)available-capabilities, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)unavailable-capabilities, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)pass-through, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)credentials, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)schema-cache-directory, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)yang-library, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)host, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)port, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)tcp-only, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)schemaless, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)yang-module-capabilities, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)non-module-capabilities, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)reconnect-on-changed-schema, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)connection-timeout-millis, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)default-request-timeout-millis, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)max-connection-attempts, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)between-attempts-timeout-millis, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)sleep-factor, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)keepalive-delay, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)concurrent-rpc-limit, (urn:opendaylight:netconf-node-topology?revision=2015-01-14)actor-response-wait-time]}

      , value=[ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)tcp-only, value=false, attributes={}}, ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)host, value=127.0.0.1, attributes={}}, ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)keepalive-delay, value=0, attributes={}}, ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)port, value=2831, attributes={}}, ImmutableChoiceNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)credentials, value=[ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)username, value=admin, attributes={}}, ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:netconf-node-topology?revision=2015-01-14)password, value=admin, attributes={}}]}]}], attributes={}} in MutableDataTree [modification=NodeModification [identifier=(urn:ietf:params:xml:ns:netconf:base:1.0)data, modificationType=TOUCH, childModification={(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology, modificationType=MERGE, childModification={(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology, modificationType=MERGE, childModification={(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=topology-netconf}

      ]=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=topology-netconf}

      ], modificationType=MERGE, childModification={(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id, modificationType=MERGE, childModification={}], (urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node, modificationType=MERGE, childModification={(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ]=NodeModification [identifier=(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ], modificationType=MERGE, childModification={}]}]}]}]}]}]]
      org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaValidationFailedException: Child /(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology/topology/topology[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=topology-netconf}

      ]/node/node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ]/node[

      {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)node-id=vpp}

      ] is not present in schema tree.
      at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.resolveModificationFor(InMemoryDataTreeModification.java:155)
      at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.write(InMemoryDataTreeModification.java:70)
      at org.opendaylight.controller.sal.core.spi.data.SnapshotBackedWriteTransaction.write(SnapshotBackedWriteTransaction.java:62)
      at org.opendaylight.controller.cluster.datastore.modification.WriteModification.apply(WriteModification.java:45)
      at org.opendaylight.controller.cluster.datastore.LocalTransactionContext.executeModification(LocalTransactionContext.java:52)
      at org.opendaylight.controller.cluster.datastore.TransactionProxy$2.invoke(TransactionProxy.java:173)
      at org.opendaylight.controller.cluster.datastore.TransactionContextWrapper.maybeExecuteTransactionOperation(TransactionContextWrapper.java:93)
      at org.opendaylight.controller.cluster.datastore.TransactionProxy.executeModification(TransactionProxy.java:170)
      at org.opendaylight.controller.cluster.datastore.TransactionProxy.write(TransactionProxy.java:160)
      at org.opendaylight.controller.cluster.databroker.AbstractDOMBrokerWriteTransaction.put(AbstractDOMBrokerWriteTransaction.java:80)
      at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.makePut(BrokerFacade.java:1173)[303:org.opendaylight.netconf.sal-rest-connector:1.6.0.SNAPSHOT]

      Any idea what I am doing wrong?

      More detailed log attached. I tried karaf-0.7.0-20170807.063951-1585.zip and netconf/caraf from local build (033e972eaf0d009ed0c0f54a109b6046fae80c99)

            jakubtoth-0 Jakub Toth
            mgradzki Marek Gradzki
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: