Netconf mounted data store operations fail when creating list entries using the new API, with the "create missing parent" set to True.
The code attempts to create also the list entry key leaf name, which is used as the IID, but the create parent subroutine does not pass the mandatory data for the list entry. This gets rejected by Confd.
Following example is for the ietf interfaces module, where the type field is mandatory.
Data being put is:
Interface [_description=parent-interface, _key=InterfaceKey [_name=GigabitEthernet0/8/0], _name=GigabitEthernet0/8/0, _type=class org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd, augmentation=[Interface1 [_ipv4=Ipv4 [_enabled=true, _forwarding=true, augmentation=[]], _ipv6=Ipv6 [_enabled=true, _forwarding=true, augmentation=[]]]]]
Log:
2015-10-08 14:33:34,839 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | Finished sending request <rpc message-id="m-5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> </config> </edit-config> </rpc> 2015-10-08 14:33:34,844 | DEBUG | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Message received <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-5"> <ok/> </rpc-reply> 2015-10-08 14:33:34,844 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Matched request: <rpc message-id="m-5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> </config> </edit-config> </rpc> to response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-5"> <ok/> </rpc-reply> 2015-10-08 14:33:34,844 | TRACE | oupCloseable-7-2 | KeepaliveSalFacade | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Resetting netconf keepalive timer 2015-10-08 14:33:34,844 | TRACE | oupCloseable-7-2 | KeepaliveSalFacade | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Scheduling next keepalive in 120 SECONDS 2015-10-08 14:33:34,844 | TRACE | oupCloseable-7-2 | NetconfRpcFutureCallback | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Edit candidate invoked successfully 2015-10-08 14:33:34,853 | TRACE | lt-dispatcher-17 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Sending message <rpc message-id="m-6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> </config> </edit-config> </rpc> 2015-10-08 14:33:34,854 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | Finished sending request <rpc message-id="m-6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> </config> </edit-config> </rpc> 2015-10-08 14:33:34,859 | DEBUG | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Message received <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-6"> <ok/> </rpc-reply> 2015-10-08 14:33:34,859 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Matched request: <rpc message-id="m-6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> </config> </edit-config> </rpc> to response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-6"> <ok/> </rpc-reply> 2015-10-08 14:33:34,860 | TRACE | oupCloseable-7-2 | KeepaliveSalFacade | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Resetting netconf keepalive timer 2015-10-08 14:33:34,860 | TRACE | oupCloseable-7-2 | KeepaliveSalFacade | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Scheduling next keepalive in 120 SECONDS 2015-10-08 14:33:34,860 | TRACE | oupCloseable-7-2 | NetconfRpcFutureCallback | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Edit candidate invoked successfully 2015-10-08 14:33:34,869 | TRACE | lt-dispatcher-17 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Sending message <rpc message-id="m-7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet0/8/0</name> </interface> </interfaces> </config> </edit-config> </rpc> 2015-10-08 14:33:34,871 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | Finished sending request <rpc message-id="m-7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet0/8/0</name> </interface> </interfaces> </config> </edit-config> </rpc> 2015-10-08 14:33:34,876 | DEBUG | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Message received <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-7"> <rpc-error> <error-type>application</error-type> <error-tag>data-missing</error-tag> <error-severity>error</error-severity> <error-path xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> /rpc/edit-config/config/if:interfaces/if:interface[if:name='GigabitEthernet0/8/0']/if:type </error-path> <error-message xml:lang="en">/interfaces/interface[name='GigabitEthernet0/8/0']/type is not configured</error-message> <error-info> <bad-element>type</bad-element> </error-info> </rpc-error> </rpc-reply> 2015-10-08 14:33:34,876 | TRACE | oupCloseable-7-2 | NetconfDeviceCommunicator | 253 - org.opendaylight.controller.sal-netconf-connector - 1.2.0.Lithium-00001-SNAPSHOT | RemoteDevice{vfn1}: Matched request: <rpc message-id="m-7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <candidate/> </target> <error-option>rollback-on-error</error-option> <config> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet0/8/0</name> </interface> </interfaces> </config> </edit-config> </rpc> to response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-7"> <rpc-error> <error-type>application</error-type> <error-tag>data-missing</error-tag> <error-severity>error</error-severity> <error-path xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> /rpc/edit-config/config/if:interfaces/if:interface[if:name='GigabitEthernet0/8/0']/if:type </error-path> <error-message xml:lang="en">/interfaces/interface[name='GigabitEthernet0/8/0']/type is not configured</error-message> <error-info> <bad-element>type</bad-element> </error-info> </rpc-error> </rpc-reply>
- relates to
-
NETCONF-1276 Eliminate ensureParentsByMerge logic for NETCONF devices
- In Progress