[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: edit-config operation
Vincent Cridlig wrote:
Hi,
edit-config is not clear to me, in particular the merge operation:
"merge: The configuration data identified by the element
containing this attribute is merged with the configuration
at the corresponding level in the configuration datastore
identified by the target parameter. This is the default
behavior."
The draft says that the element must be merged in the config but it
does not explain how. Is there a clear definition of merge for XML
elements ?
merge is data-model specific.
Also the given examples silently assume that the "name" element is a
selection key. It should be explicit in the draft.
There is absolutely no data model naming scheme defined in netconf.
I think these examples state that they are selecting by element called
'name'.
For example, let's imagine a data model where:
- the root element is "foo"
- foo must have a "name" child
- foo may have zero to two "bar" elements
- "bar" is a simpleType element
Initial config:
<foo>
<name>bla</name>
<bar>bar1</bar>
</foo>
Request:
<foo xc:operation='merge'>
<name>bla</name>
<bar>bar2</bar>
</foo>
Possible outputs:
<foo>
<name>bla</name>
<bar>bar2</bar>
</foo>
<foo>
<name>bla</name>
<bar>bar1</bar>
<bar>bar2</bar>
</foo>
Under merge meaning is implicitely a combination of replace or create
operation ?
There is no clear separation between the selecting nodes and nodes
that must be updated.
Even with replace operation we have the problem since we don't know
which bar must be replaced.
Anybody implementing has the same problems ?
It is data model specific.
Do you have suggestions for changing it?
Another thing: we are planning to implement a new edit-config with
xpath, as a new capability. It will look like that:
<edit-config>
<target>
<running/>
</target>
<config type="xpath" operation="replace"
sel="/netconf/security/rbac/users/user[name='Alice']">
<user>
<name>Alice</name>
<login>alicefoo</login>
<building>a2</building>
<room>100</room>
</user>
</config>
</edit-config>
If the wg is interested to merge it to the standard xpath capability,
just request more details.
We believe that edit-config should be extended with XPath in a similar
way than get-config.
You are using a nice clean XPath expression.
Unfortunately, this is a small subset of the entire language.
I think there are huge problems with setting or locking data items
based on arbitrary Xpath expressions.
Sorry for the long mail.
Thanks for your help.
Vincent
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/>