Subject: edit-config operation set

From: Andy Bierman <[email-masked]>
Date: Thu, 15 Jul 2004 09:37:32 -0700

Hi,

I think we have a few more details to resolve wrt/ the
edit-config 'operation' attribute:

- pg 20, para 1, <edit-config> operation parameter

  I think the WG agreed to this list:
    - merge, replace, create, modify, delete
  The modify value is missing.

  After some more thought, I think the operation set in the draft
  is better without the modify operation, because modify is
  ambiguous -- it can mean merge or replace.  Also, we don't
  need modify to prevent inadvertent re-creation of objects.
  We just need to put the operation attribute at the appropriate
  nest level.  This rationale, and perhaps an example (see below)
  should be added to the spec.

  Example: change user barney's account type using the (default) merge
           operation vs. a scoped replace operation.

  Wrong:

    ...
    <edit-config>
       ... other parameters ...
       <config xmlns="example-uri">
          <users>
             <user>
                <name>barney</name>
                <type>superuser</type>
             </user>
          </users>
       </config>
    </edit-config>

   - this operation will attempt to create the 'barney' entry if
     it doesn't already exist.

  Better:

    ...
    <edit-config>
       ... other parameters ...
       <config xmlns="example-uri" xmlns:xc="netconf-uri">
          <users>
             <user>
                <name>barney</name>
                <type xc:operation="replace">superuser</type>
             </user>
          </users>
       </config>
    </edit-config>

   - this operation should not attempt to create the 'barney' entry
     if it doesn't already exist.
     [open issue: does the default operation of 'merge' apply
      and the agent will try to create 'barney'?  If so, should
      we add a parameter to set the default operation?]

Unambiguous default operation behavior:

  - Add new parameter to <edit-config> operation:

         'default-op':  enum

             The edit-config operation that will assumed if the 
             operation attribute is not present for a particular
             data model object.  

             Valid values:
                none, merge, replace

             Default value:
                merge

  - Example: replace by setting default operation to 'none':

   ...
    <edit-config>
       ... other parameters ...
       <default-op>none</default-op>
       <config xmlns="example-uri" xmlns:xc="netconf-uri">
          <users>
             <user>
                <name>barney</name>
                <type xc:operation="replace">superuser</type>
             </user>
          </users>
       </config>
    </edit-config>

Andy

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>