Martin Bjorklund wrote:
Andy Bierman <ietf@andybierman.com> wrote:Martin Bjorklund wrote:Andy Bierman <ietf@andybierman.com> wrote:child -> create merge replace delete parent |none V V V V create x V-1 E-1(*) E-1merge V-3 x V-4(*) V-3replace E-1(*) V x E-1(*) delete E-1 V-2 E-1(*) xNotes: V: valid, no errors or warnings V-1: valid, but create has precedence. Only merge-with-nothing or replace-nothing scenarios are valid. V-2: valid, but has no effect because delete has precedence V-3: valid, but create or delete rules now in affect for next child E-1: 'bad-attribute' or 'operation-failed' error (not sure which) Requirements for create and delete cannot both be met in the same subtree, regardless of the data modelBoth these error codes are wrong for my E-1. This is clearly a 'data-exists' error. There is no way you could get to <b> in the example below unless <a> existed, which violates the 'create' rules. edit-config <config> contents ------------------------------ <a operation="create"> <b operation="replace"/> </a> Current Config Result ------------------------------ empty ok <a/> data-exists error <a><b/></a> data-exists errorAh... got it. We would actually also generate a data-exist error in this case (if <a> doesn't exist). Suppose <a/> exists. Then comes: <a operation="delete"> <b operation="merge"/> </a> What would the result be?
Hmmm... I think I see your point. If I apply the delete test to <b> before fully processing <b>, then I will generate a data-missing error (if <b> does not yet exist). But if I process the nodes fully, bottom up, then <b> always exists when the delete-test is performed and there is no error. But this is much harder then processing nodes top-down. This is also pointless since <a operation="delete"/> will provide the same functionality. The result should be no error and <a> is deleted, but I could also see how a data-missing error could be generated instead.
/martin
Andy -- 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/>