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

Re: edit-config operation



Hi,

First of all, is it ok to discuss this on the list, or should we keep
it off-line?


Vincent Cridlig <vincent.cridlig@loria.fr> wrote:
> I specified in more details our #edit-config-xpath capability: 
> http://libresource.inria.fr/projects/ensuite/capabilities
> We are open to discussions to improve the syntax.

This looks very good!  I think it makes a lot of sense to separate the
node selection expression from the data modification expressions.  It
makes edit-config less ambiguous and easier to understand.

One added-value of this capability is that you can perform an
operation on a set of nodes.  This makes sense if you want to delete
all instances which match a certain pattern, e.g. all <logEntry> with
<date>2006-01-01</date>.  Another example might be if you want to
disable all atm interfaces.  But in order to do this, your "operation"
attribute would have to support "merge" as well, so you could write:

 <config type="xpath" operation="merge" sel="/interfaces/interface[type='atm']">
   <status>disabled</status>
 </config>

But why can't the ordinary operation attribute be used?  Then you
would write 

  <nc:config type="xpath" sel="/interfaces/interface[type='atm']">
    <status nc:operation'="replace">disabled</status>
  </nc:config>

(actually in that example the operation could be omitted since the
default 'merge' would do fine).

or

  <nc:config type="xpath" nc:operation="delete"
             sel="/interfaces/interface[type='atm']">
  </nc:config>


One drawback is probably (as Andy pointed out) that the cost of
allowing arbitrary xpath expressions may be high.



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