SUMMARY
Incorrect device configuration when using OpenConfig OSPF payload for NETCONF
Demonstration : https://youtu.be/7npu5QNF5No
ISSUE TYPE
IOS-XE VERSION
Cisco IOS XE Software, Version 16.09.03
Cisco IOS Software [Fuji], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.9.3, RELEASE SOFTWARE (fc2)
STEPS TO REPRODUCE
from ncclient import manager
import xmltodict
import xml.dom.minidom
xml_string = '''
<config>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:OSPF</identifier>
<name>1</name>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:OSPF</identifier>
<name>1</name>
</config>
</protocol>
</protocols>
</network-instance>
</network-instances>
</config>
'''
m = manager.connect(
host='ios-xe-mgmt.cisco.com',
port=10000,
username='developer',
password='C1sco12345',
hostkey_verify=False
)
netconf_reply = m.edit_config(xml_string, target = 'running')
EXPECTED RESULTS
OSPF process 1 configured.
ACTUAL RESULTS
BGP for ASN 1 configured.