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

Re: nested operation attribute interoperability



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

merge V-3 x V-4(*) V-3
  replace    E-1(*)   V        x         E-1(*)

  delete     E-1      V-2      E-1(*)    x


Notes:

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 model


Both 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 error






I think your E-1 is wrong.

Do you mean the first one (replace when parent is create)?   The only
reason for allowing this is due to "be liberal in what you accept",
right?  I guess we could also allow delete when parent is create by
the same reasoning.


Also because there is no text whatsoever in the document
that declares an error condition if 'replace' is invoked
against an empty portion of the target config.



Allowing create under a replace might make sense though, if we want to
be liberal.

I'm happy to change this code to make it interopable.


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