【发布时间】:2019-10-28 22:22:56
【问题描述】:
使用 APIExplorer,我尝试将 RESTCONF 设备连接到 Opendaylight。不幸的是,它的 Hello Message 没有读入功能列表。
我让 Opendaylight Neon 运行在其名称中包含“restconf”或“netconf”的每个功能。操作系统是 Ubuntu 18.04。 为了模拟 netconf 设备,我使用了 docker 镜像中的 netopeer2 (benjaminsh/netopeer2)。
我确信我拥有正确的 ODL IP,因为我能够连接和接收拓扑数据。 此外,我确信我的模拟设备会发出一个 hello 消息,因为当我尝试 SSH 进入它时我会看到它。
我用这个命令启动 docker 容器:
sudo docker run -it --name netopeer2 -p 1831:830 --rm benjaminsh/netopeer2:latest
我通过这个 REST 命令添加 netconf 设备:
post /restconf/operations/netconf-node-topology:create-device
{
"netconf-node-topology:input": {
"netconf-node-topology:pass-through": {},
"key-based": {
"netconf-node-topology:key-id": "netconf",
"netconf-node-topology:username": "netconf"
},
"netconf-node-topology:host": "192.168.56.2",
"netconf-node-topology:port": "830",
"netconf-node-topology:tcp-only": "false",
"netconf-node-topology:reconnect-on-changed-schema": "false",
"netconf-node-topology:connection-timeout-millis": "20000",
"netconf-node-topology:max-connection-attempts": "0",
"netconf-node-topology:between-attempts-timeout-millis": "2000",
"netconf-node-topology:sleep-factor": "1.5",
"netconf-node-topology:keepalive-delay": "120",
"netconf-node-topology:node-id": "new-netconf-device"
}
}
之后,我尝试使用以下 REST 命令从收到的 hello 消息中访问功能:
get /restconf/config/network-topology:network-topology/topology/topology-netconf/node/new-netconf-device/netconf-node-topology:odl-hello-message-capabilities
我希望看到 odl-hello-message-capabilites 中的功能,但它只是说数据模型内容不存在。
【问题讨论】: