[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question about <edit-config> operation
Li Yan wrote:
Hi,
I think the changed object is ambiguous in <edit-config> operation. For
example:
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<top xmlns="http://example.com/schema/1.2/config">
<interface>
<name>Ethernet0/0</name>
<mtu>1500</mtu>
</interface>
</top>
</config>
</edit-config>
</rpc>
We usually think it set the MTU to 1500 on an interface named
"Ethernet0/0", but why don’t think it set the name to “Ethernet0/0” on
interfaces whose MTU equal to 1500?
Because the schema that defines the structure and semantics of
the data model (not shown here) says the key for instance uniqueness
is the <name> element, not the <mtu> element.
A comment will be added to the prot-13 draft to make this
seemingly obvious detail more clear.
If I want to set the MTU to 1500 on the interfaces whose MTU equal to
1300, How shall I depict the <edit-config> operation using XML?
You can't do this with NETCONF edit-config.
Maybe you can with XSLT, but NE configuration
involves more than manipulating an XML document.
NETCONF does not have a set-wildcard function. You need
to specify each instance you are changing (using
the key defined for that data model), along with
the new <mtu> value -- or define an RPC or data model
that has "change all <mtu> elements from X to Y" semantics.
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/>