OpenDayLight Oxygen Netconf挂载数据缺失错误

时间:2018-05-08 10:16:56

标签: opendaylight

我正在使用ODL氧气释放来使用下面的curl命令连接netopeer-server(NETCONF主机)。我看到返回以下错误。我可以知道到底出了什么问题吗? netopeer服务器支持netconf-monitoring。

{ “错误”:{ “错误”:[{ “错误型”: “协议”, “错误标记”: “的缺少数据的”, “错误消息”: “挂载点不存在。”}]}}

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

我确实尝试了建议的更改。请告诉我输入有什么问题?我没有看到任何明显的东西!

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$

添加后,这有效吗?在下面的xml标签

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

1 个答案:

答案 0 :(得分:0)

这似乎是通过配置子系统安装设备的旧方法,您可以尝试使用这个更新的API:http://docs.opendaylight.org/en/stable-oxygen/user-guide/netconf-user-guide.html#netconf-connector-configuration-with-md-sal