opendaylight

OpenDayLight Oxygen Netconf mount data-missing error


I am using ODL oxygen release to connect a netopeer-server (NETCONF host) using the below curl command. I see the following error being returned. May I know what exactly is wrong? netopeer server supports netconf-monitoring.

{"errors":{"error":[{"error-type":"protocol","error-tag":"data-missing","error-message":"Mount point does not exist."}]}}

curl -H "Content-Type: application/xml" -u admin:admin -X POST -d "<?xml version=\"1.0\" encoding=\"UTF-8\"> <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal netconf-connector</type> <name>netopeer</name> <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">192.168.56.101</address> <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">830</port> <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">netopeer-server</username> <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">pass</password> <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">true</tcp-only> <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type> <name>global-event-executor</name> </event-executor> <binding-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type> <name>binding-osgi-broker</name> </binding-registry> <dom-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type> <name>dom-broker</name> </dom-registry> <client-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-client-dispatcher</type> <name>global-netconf-dispatcher</name> </client-dispatcher> <processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</type> <name>global-netconf-processing-executor</name> </processing-executor> <keepalive-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf"> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:scheduled-threadpool</type> <name>global-netconf-ssh-scheduled-executor</name> </keepalive-executor> </module>" http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules

I did try the suggested changes. COuld you please tell me what is wrong with the input? I do not see anything obvious!

curl -H "Content-Type: application/xml" -u admin:admin -X PUT -d "<?xml version=\"1.0\" encoding=\"UTF-8\"><node xmlns=\"urn:TBD:params:xml:ns:yang:network-topology\">
<node-id>netopeer</node-id>
<host xmlns=\"urn:opendaylight:netconf-node-topology\">192.168.56.101</host>
<port xmlns=\"urn:opendaylight:netconf-node-topology\">830</port>
<username xmlns=\"urn:opendaylight:netconf-node-topology\">netopeergui</username>
<password xmlns=\"urn:opendaylight:netconf-node-topology\">netopeergui</password>
<tcp-only xmlns=\"urn:opendaylight:netconf-node-topology\">false</tcp-only>
</node>" http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/netopeer
{"errors":{"error":[{"error-type":"protocol","error-tag":"malformed-message","error-message":"**Error parsing input: A pseudo attribute name is expected.** ","error-info":"A pseudo attribute name is expected. "}]}}shrikanth@mds:~/Applications/karaf-0.8.1/bin$

This worked after adding the ? at to the xml tag as below

curl -H "Content-Type: application/xml" -u admin:admin -X PUT -d "<?xml version=\"1.0\" encoding=\"UTF-8\"?><node xmlns=\"urn:TBD:params:xml:ns:yang:network-topology\">
    <node-id>netopeer</node-id>
    <host xmlns=\"urn:opendaylight:netconf-node-topology\">192.168.56.101</host>
    <port xmlns=\"urn:opendaylight:netconf-node-topology\">830</port>
    <username xmlns=\"urn:opendaylight:netconf-node-topology\">netopeergui</username>
    <password xmlns=\"urn:opendaylight:netconf-node-topology\">netopeergui</password>
    <tcp-only xmlns=\"urn:opendaylight:netconf-node-topology\">false</tcp-only>
    </node>" http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/netopeer

Solution

  • This seems like old way of mounting devices through config sub-system, can you try with this more recent API: http://docs.opendaylight.org/en/stable-oxygen/user-guide/netconf-user-guide.html#netconf-connector-configuration-with-md-sal