[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

merge/replace selection criteria



I believe the current criteria for selecting the target element for a merge or replace operation is ambiguous and therefore flawed. The problem is a bit difficult to describe so I'll start with an example. Suppose the current running configuration for a user list, expressed in XML, contains two users, John and Bill:

<config>
<users>
<user>
<name>John Smith</name>
<address>123 A Street</address>
</user>
<user>
<name>Bill Baker</name>
<address>456 B Street</address>
</user>
</users>
</config>

Now suppose John rents out his spare room to Bill, so we need to update Bill's address. We could replace Bill's user entry using the 'replace' operator:

<rpc message-id="12345" xmlns="http://ietf.org/xmlconf/1.0/base";>
<edit-config>
<target>
<running/>
</target>
<config xmlns="http://example.com/schema/userconf"; xmlns:xc="http://ietf.org/xmlconf/1.0/base";>
<users>
<user xc:operation="replace">
<name>Bill Baker</name>
<address>123 A Street</address>
</user>
</users>
</config>
</edit-config>

However, how does the target system know whether we are trying to change Bill's address to "123 A Street" or change John's name to "Bill Baker"? Both interpretations are valid but only one yields the desired result.

The problem is that the current netconf syntax does not provide a way to explicitly specify which sub-elements are selection keys and which are just replacement data. The same problem holds true for merge operations as well (just substitute "merge" for "replace" in the above example). Note that there is no ambiguity in 'delete' operations, since no replacement data is included in the command.


Paul Sangree
Software Developer
Cisco Systems





--
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/>