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

Re: Second Example in section 7.2 of netconf-proto



Martin Bjorklund wrote:

IMO:

If the agent data model has sub-trees that are
not included in the 'replace' subtrees, then they
are not touched.  Only the agent data model subtrees
explicitly included in the replace-subtrees are touched.

At least that's what I meant when I wrote the original text.

Both of the examples below are correct.

In order to remove optional subtrees in the same edit-config,
appropriately placed operation="delete" attributes are needed.

Andy


"Sharon Chisholm" <schishol@nortel.com> wrote:
Also, another clarifying question. If I have a record with a key and I
send it a replace command, are the non-key fields not included in the
replace snippet deleted or just not modified? I've seen one
implementations that does the latter, and I think based on the following
excerpt it is what is expected, but I wanted to confirm.

"Unlike a <copy-config> operation, which replaces
the entire target configuration, only the configuration
actually present in the config parameter is affected."

<bowler>
<name>Fred</name>
<location>Bedrock</location>
<status>single</status>
</bowler>

+

<bowler operation="replace">
<name>Fred</name>
<status>married</status>
</bowler>

=

<bowler>
<name>Fred</name>
<location>Bedrock</location>
<status>married</status>
</bowler>


Ok, I'll share my interpretation.

I think it should delete the non-present part (provided they are
optional of course).  What you're doing above would be the result of a
"merge" operation.

This also hold if you have more levels in your config:

<bowler>
  <name>Fred</name>
  <status>married</status>
  <cars>
    <car>
      <id>ABC-123</id>
      <make>volvo</make>
    </car>
  </cars>
</bowler>

+

<bowler operation="replace">
  <name>Fred</name>
  <status>married</status>
  <cars>
    <car>
      <id>DEF-456</id>
      <make>saab</make>
    </car>
  </cars>
</bowler>

=

<bowler operation="replace">
  <name>Fred</name>
  <status>married</status>
  <cars>
    <car>
      <id>DEF-456</id>
      <make>saab</make>
    </car>
  </cars>
</bowler>



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




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