私は、Opendaylight Oxigen の Restconf ノースバウンド インターフェイスと、いくつかの陽データ モデルで Netopeer を実行しているデバイスに接続された Netconf サウスバウンドを使用して、デバイスを管理しようとしています。
基本的に、私はこのチュートリアルに従っています:
問題は、hello メッセージの yang 機能と Opendaylight メソッドで取得された機能に違いがあることです。
hello メッセージ (netconf プロセスを実行しているポートへの ssh) の場合:
<hello
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
<capability>urn:ietf:params:netconf:capability:startup:1.0</capability>
<capability>urn:ietf:params:netconf:capability:xpath:1.0</capability>
<capability>urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit</capability>
<capability>urn:ietf:params:netconf:capability:notification:1.0</capability>
<capability>urn:ietf:params:netconf:capability:interleave:1.0</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05</capability>
<capability>urn:ietf:params:xml:ns:yang:1?module=yang&revision=2017-02-20</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15</capability>
<capability>urn:ietf:params:netconf:capability:yang-library:1.0?revision=2018-01-17&module-set-id=28</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2018-02-14</capability>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2011-06-01&features=writable-running,candidate,rollback-on-error,validate,startup,xpath</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2012-02-06</capability>
<capability>urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14</capability>
<capability>urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2014-12-10</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04</capability>
<capability>urn:ietf:params:xml:ns:yang:iana-crypt-hash?module=iana-crypt-hash&revision=2014-08-06</capability>
<capability>urn:ietf:params:xml:ns:yang:ietf-system?module=ietf-system&revision=2014-08-06&features=authentication,local-users</capability>
<capability>urn:ietf:params:xml:ns:yang:iana-if-type?module=iana-if-type&revision=2014-05-08</capability>
<capability>urn:ieee:std:802.1Q:yang:ieee802-dot1q-types?module=ieee802-dot1q-types&revision=2018-03-07</capability>
<capability>urn:ieee:std:802.1Q:yang:ieee802-dot1q-preemption?module=ieee802-dot1q-preemption&revision=2018-09-10</capability>
<capability>urn:ieee:std:802.1Q:yang:ieee802-dot1q-sched?module=ieee802-dot1q-sched&revision=2018-09-10&features=scheduled-traffic</capability>
<capability>urn:ieee:std:802.1Q:yang:ieee802-types?module=ieee802-types&revision=2018-03-07</capability>
<capability>urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge?module=ieee802-dot1q-bridge&revision=2018-03-07</capability>
</capabilities>
<session-id>4</session-id></hello>]]>]]>
opendaylight restconf ノースバウンド メッセージ:
http://device-ip:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/TSN-Switch/yang-ext:mount/ を取得します。
{
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoint": [
{
"name": "all-interfaces",
"ssh": {
"address": "0.0.0.0",
"port": 830,
"host-keys": {
"host-key": [
{
"name": "imported SSH key",
"public-key": "ssh_host_rsa_key"
}
]
}
}
},
{
"name": "test_tls_listen_endpt",
"tls": {
"address": "0.0.0.0",
"port": 6513,
"client-auth": {
"trusted-ca-certs": "test_trusted_ca_list",
"cert-maps": {
"cert-to-name": [
{
"id": 1,
"map-type": "ietf-x509-cert-to-name:specified",
"name": "test",
"fingerprint": ""
}
]
}
},
"certificates": {
"certificate": [
{
"name": "test_server_cert"
}
]
}
}
}
]
}
},
"ietf-keystore:keystore": {
"private-keys": {
"private-key": [
{
"name": "test_server_key",
"certificate-chains": {
"certificate-chain": [
{
"name": "test_server_cert",
"certificate": [
""
]
}
]
}
},
{
"name": "ssh_host_rsa_key"
}
]
},
"trusted-certificates": [
{
"name": "test_trusted_ca_list",
"trusted-certificate": [
{
"name": "test_ca",
"certificate": ""
}
]
}
]
}
}
ご覧のとおり、hello メッセージの機能はより多く、opendaylight で取得されたメッセージに表示される機能は含まれていません。
さらに、デバイスの yang データモデル リポジトリにチェックインしたところ、次のものが見つかりました。
- iana-crypt-hash@2014-08-06.yang ieee802-types@2018-03-07.yang
ietf-netconf-monitoring@2010-10-04.yang
ietf-tls-server@2016-11-02.yang iana-if-type@2014-05-08.yang
ietf-datastores@2017-08-17.yang
ietf-netconf-notifications@2012-02-06.yang
ietf-x509-cert-to-name@2014-12 -10.yang ieee802-dot1q-bridge@2018-03-07.yang
ietf-interfaces@2018-02-20.yang
ietf-netconf-server@2016-11-02.yang
ietf-yang-library@2018-01 -17.yang ieee802-dot1q-preemption@2018-09-10.yang
ietf-keystore@2016-10-31.yang
ietf-netconf-with-defaults@2011-06-01.yang 内部 ieee802-dot1q-sched@ 2018-09-10.yang
ietf-netconf@2011-06-01.yang ietf-ssh-server@2016-11-02.yang
nc-notifications@2008-07-14.yang ieee802-dot1q-types@2018-03-07.yang ietf-netconf-acm@2018-02-14.yang ietf-system@2014-08-06.yang
notifications@ 2008-07-14.陽
hello メッセージのモデルと、Opendaylight RESTCONF 手順にリストされているモデルが表示されます。
ODL のログは次のとおりです。
2020-11-25T12:42:33,770 | WARN | remote-connector-processing-executor-28 | NetconfDeviceCommunicator | 384 - org.opendaylight.netconf.sal-netconf-connector - 1.7.4 | RemoteDevice{TSN-Switch}: Session terminated Session closed
2020-11-25T12:42:33,774 | WARN | opendaylight-cluster-data-notification-dispatcher-9799 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.
2020-11-25T12:42:33,774 | WARN | opendaylight-cluster-data-notification-dispatcher-9795 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.
2020-11-25T12:42:33,774 | WARN | opendaylight-cluster-data-notification-dispatcher-9794 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.
2020-11-25T12:42:33,776 | WARN | opendaylight-cluster-data-notification-dispatcher-9795 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.
2020-11-25T12:42:33,776 | WARN | opendaylight-cluster-data-notification-dispatcher-9792 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.
2020-11-25T12:42:33,776 | WARN | opendaylight-cluster-data-notification-dispatcher-9796 | CallhomeStatusReporter | 400 - org.opendaylight.netconf.callhome-provider - 1.4.4 | No corresponding callhome device found - exiting.