01-05-2018 05:23 PM
hello, i have some question to configure CSR 1K with OpenDayLight
my environment :
i have sucessful connect XE with OpenDayLight.
{
"node-id": "CSR1K",
"netconf-node-topology:available-capabilities": {
"available-capability": [
"urn:ietf:params:netconf:capability:xpath:1.0",
"urn:ietf:params:netconf:capability:notification:1.0",
"urn:ietf:params:netconf:capability:validate:1.1",
"(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)ietf-interfaces",
"urn:ietf:params:netconf:capability:rollback-on-error:1.0",
"http://tail-f.com/ns/netconf/extensions",
"urn:ietf:params:netconf:base:1.1",
"urn:ietf:params:netconf:base:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-ip?revision=2014-06-16)ietf-ip",
"urn:ietf:params:netconf:capability:interleave:1.0",
"(http://cisco.com/ns/yang/ned/ios?revision=2016-09-19)ned",
"(http://tail-f.com/yang/common-monitoring?revision=2016-05-04)tailf-cli-extensions",
"(urn:ietf:params:xml:ns:yang:ietf-inet-types?revision=2013-07-15)ietf-inet-types",
"(http://tail-f.com/yang/common-monitoring?revision=2016-05-04)tailf-common",
"urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all-tagged",
"urn:ietf:params:netconf:capability:validate:1.0",
"(urn:ietf:params:xml:ns:yang:ietf-yang-types?revision=2013-07-15)ietf-yang-types",
"(http://tail-f.com/yang/common-monitoring?revision=2013-11-07)tailf-meta-extensions",
"http://tail-f.com/ns/netconf/actions/1.0",
"urn:ietf:params:netconf:capability:writable-running:1.0"
]
},
"netconf-node-topology:host": "10.200.200.17",
"netconf-node-topology:unavailable-capabilities": {},
"netconf-node-topology:connection-status": "connected",
"netconf-node-topology:port": 830
}
but when i try to configure the device via OpenDayLight, its error. i try to use ietf-interfaces to configure ip address
and native.yang to configure bgp, but all error.
this URL i use to config
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "malformed-message",
"error-message": "Error parsing input: Child \"bgp\" was not found in parent schema node \"(http://cisco.com/ns/yang/ned/ios?revision=2016-09-19)router\""
}
]
}
}
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "malformed-message",
"error-message": "Error parsing input: Child \"interfaces\" was not found in parent schema node \"(urn:ietf:params:xml:ns:yang:ietf-interfaces?revision=2014-05-08)interfaces\""
}
]
}
}
thanks before
Solved! Go to Solution.
01-09-2018 03:42 AM
i have fix this issue, yes data that i send to the device is wrong data. i dont know why, maybe different version i use in my CSR1000K and the YDK (i use YDK to generate the data).
this is the data that generate from YDK (different method, this is to configure static route)
<route xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.200.200.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</route
that error!, so i try to get the data format first from RESTCONF.
curl -v -k -u admin:admin -H https://10.200.200.X7/restconf/api/config/native/ip/route?deep
and this is the correct format
<route xmlns="http://cisco.com/ns/yang/ned/ios" xmlns:y="http://tail-f.com/ns/rest" xmlns:ios="http://cisco.com/ns/yang/ned/ios">
<ip-route-interface-forwarding-list>
xxxxxx
</route>
yes, there are some error in the XML namespace. i think this is because i use the latest YDK to configure my CSR.
so i try to change the XML namespace. and send to the opendaylight with this data.
<route xmlns="http://cisco.com/ns/yang/ned/ios">
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.200.200.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</route>
thanks everyone
01-08-2018 10:48 AM
Hi - what data were you trying to POST to those URLs?
01-09-2018 03:42 AM
i have fix this issue, yes data that i send to the device is wrong data. i dont know why, maybe different version i use in my CSR1000K and the YDK (i use YDK to generate the data).
this is the data that generate from YDK (different method, this is to configure static route)
<route xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.200.200.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</route
that error!, so i try to get the data format first from RESTCONF.
curl -v -k -u admin:admin -H https://10.200.200.X7/restconf/api/config/native/ip/route?deep
and this is the correct format
<route xmlns="http://cisco.com/ns/yang/ned/ios" xmlns:y="http://tail-f.com/ns/rest" xmlns:ios="http://cisco.com/ns/yang/ned/ios">
<ip-route-interface-forwarding-list>
xxxxxx
</route>
yes, there are some error in the XML namespace. i think this is because i use the latest YDK to configure my CSR.
so i try to change the XML namespace. and send to the opendaylight with this data.
<route xmlns="http://cisco.com/ns/yang/ned/ios">
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.200.200.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</route>
thanks everyone
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide