"Sharon Chisholm" <schishol@nortel.com> wrote:
Also, another clarifying question. If I have a record with a key and I
send it a replace command, are the non-key fields not included in the
replace snippet deleted or just not modified? I've seen one
implementations that does the latter, and I think based on the following
excerpt it is what is expected, but I wanted to confirm.
"Unlike a <copy-config> operation, which replaces
the entire target configuration, only the configuration
actually present in the config parameter is affected."
<bowler>
<name>Fred</name>
<location>Bedrock</location>
<status>single</status>
</bowler>
+
<bowler operation="replace">
<name>Fred</name>
<status>married</status>
</bowler>
=
<bowler>
<name>Fred</name>
<location>Bedrock</location>
<status>married</status>
</bowler>
Ok, I'll share my interpretation.
I think it should delete the non-present part (provided they are
optional of course). What you're doing above would be the result of a
"merge" operation.
This also hold if you have more levels in your config:
<bowler>
<name>Fred</name>
<status>married</status>
<cars>
<car>
<id>ABC-123</id>
<make>volvo</make>
</car>
</cars>
</bowler>
+
<bowler operation="replace">
<name>Fred</name>
<status>married</status>
<cars>
<car>
<id>DEF-456</id>
<make>saab</make>
</car>
</cars>
</bowler>
=
<bowler operation="replace">
<name>Fred</name>
<status>married</status>
<cars>
<car>
<id>DEF-456</id>
<make>saab</make>
</car>
</cars>
</bowler>
/martin
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>