Subject: [Netconf] Regarding empty value provided for xml element in edit-config operation

From: ramu n <[email-masked]>
Date: Wed, 16 Feb 2011 02:26:26 +0000

Hi,

In <edit-config> operation, If an empty value is provided for xml element. How the empty values in edit-config should be handled.

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

             </interface>

           </top>

         </config>

       </edit-config>

     </rpc>

In the above edit-config request, <mtu></mtu> has empty value.
If the <mtu> element is string data type, can it be treated as NUL string as value of <mtu> element.
If <mtu> element is not a string data type, How it should be handled.

Thanks & Regards,
Ramu N

---

From: Andy Bierman <[email-masked]>
Date: Tue, 15 Feb 2011 19:27:45 -0800

If leaf mtu is type 'empty' or 'string', then <mtu /> or <mtu></mtu> is valid.
Otherwise it is an invalid-value error.

Andy

From: [email-masked] [mailto:[email-masked]] On Behalf Of ramu n
Sent: Tuesday, February 15, 2011 6:26 PM
To: [email-masked]
Subject: [Netconf] Regarding empty value provided for xml element in edit-config operation

Hi,

Example:

    <rpc message-id="101"

       <edit-config>

         <target>

           <running/>

         </target>

         <config>

             <interface>

               <name>Ethernet0/0</name>

               <mtu></mtu>

             </interface>

           </top>

         </config>

       </edit-config>

     </rpc>

Thanks & Regards,
Ramu N

---

From: Rohit A Pobbathi <[email-masked]>
Date: Wed, 16 Feb 2011 11:14:08 +0530

Dear Andy,

Thanks for input.

Our question in specific is how to handle a SELECTION node (i.e. <mtu /> or
<mtu></mtu>) in a <edit-config> Request ?

The intention of the SELECTION node in <edit-config> request is to set the
particular element to DEFAULT i.e. to CLEAR the value.

Is there any mechanism to set the value of Fields to Default in Edit ?

Thanks & Regards,

Rohit

****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

  _____  

From: [email-masked] [mailto:[email-masked]] On Behalf
Of Andy Bierman
Sent: Wednesday, February 16, 2011 8:58 AM
To: ramu n; [email-masked]
Subject: Re: [Netconf] Regarding empty value provided for xml element
inedit-config operation

If leaf mtu is type 'empty' or 'string', then <mtu /> or <mtu></mtu> is
valid.

 

Andy

From: [email-masked] [mailto:[email-masked]] On Behalf
Of ramu n
Sent: Tuesday, February 15, 2011 6:26 PM
To: [email-masked]
Subject: [Netconf] Regarding empty value provided for xml element in
edit-config operation

Hi, 

In <edit-config> operation, If an empty value is provided for xml element.
How the empty values in edit-config should be handled.

Example:

    <rpc message-id="101"

If the <mtu> element is string data type, can it be treated as NUL string as
value of <mtu> element.

Thanks & Regards,

Ramu N

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Wed, 16 Feb 2011 07:46:56 +0100

> Is there any mechanism to set the value of Fields to Default in Edit ?

You may want to read 

http://tools.ietf.org/html/draft-ietf-netconf-with-defaults-14

to understand the various issues around defaults.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 16 Feb 2011 09:40:31 +0100 (CET)

Hi,

> <mtu></mtu>) in a <edit-config> Request ?

<mtu/> would be a "selection node" if it was part of a subtree filter
in a <get> or <get-config> request.

In an <edit-config>, <mtu/> means that the mtu leaf should be set to
the value "", or created if it was of type 'empty'.

> Is there any mechanism to set the value of Fields to Default in Edit ?

As Juergen wrote, see the with-defaults draft for details.  But the
short answer is that you need to delete the leaf in order to get the
"reset to default" behavior:

  <mtu nc:operation="delete"/>

Note that this operation might fail, depending on how defaults are
handled by the server, and the contents of the datastore (see
with-defaults for details!).  If you have a server that supports
:base:1.1 (as defined in draft-ietf-netconf-4741bis), you can send:

  <mtu nc:operation="remove"/>

This operation doesn't fail if the mtu doesn't exist.

/martin