When I commit an snat mapping table entry:
<nat-config xmlns="urn:ietf:params:xml:ns:yang:ietf-nat">
<nat-instances>
<nat-instance xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
<id>0</id>
<mapping-table>
<mapping-entry>
<index>0</index>
<internal-src-address>10.100.0.9</internal-src-address>
<type>static</type>
<external-src-address>10.195.115.107</external-src-address>
</mapping-entry>
</mapping-table>
</nat-instance>
</nat-instances>
</nat-config>
and then try to commit another pair instead of it:
<nat-config xmlns="urn:ietf:params:xml:ns:yang:ietf-nat">
<nat-instances>
<nat-instance xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
<id>0</id>
<mapping-table>
<mapping-entry>
<index>0</index>
<internal-src-address>10.100.0.10</internal-src-address>
<type>static</type>
<external-src-address>10.195.115.106</external-src-address>
</mapping-entry>
</mapping-table>
</nat-instance>
</nat-instances>
</nat-config>
I get an error:
<rpc-reply message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>Transaction commit failed on Failed to validate DataTreeModification 4 Cause: Failed to update data from: MappingEntry{getExternalSrcAddress=Ipv4Address [_value=10.195.115.107], getIndex=0, getInternalSrcAddress=IpAddress [_ipv4Address=Ipv4Address [_value=10.100.0.9]], getType=Static, augmentations={}} to: MappingEntry{getExternalSrcAddress=Ipv4Address [_value=10.195.115.106], getIndex=0, getInternalSrcAddress=IpAddress [_ipv4Address=Ipv4Address [_value=10.100.0.10]], getType=Static, augmentations={}}, at: KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.nat.instance.mapping.table.MappingEntry, path=[org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.NatConfig, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.NatInstances, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.NatInstance[key=NatInstanceKey [_id=0]], org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.nat.instance.MappingTable, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev150908.nat.config.nat.instances.nat.instance.mapping.table.MappingEntry[key=MappingEntryKey [_index=0]]]}</error-message>
</rpc-error>
</rpc-reply>