Re: [Netconf] Clarification about additional attributes at Messages(RPC) layer

Martin Bjorklund <mbj@tail-f.com> Wed, 31 January 2018 07:56 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 48DFC1314F1 for <netconf@ietfa.amsl.com>; Tue, 30 Jan 2018 23:56:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XIllsYuFxEmI for <netconf@ietfa.amsl.com>; Tue, 30 Jan 2018 23:56:45 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 65E88131644 for <netconf@ietf.org>; Tue, 30 Jan 2018 23:55:58 -0800 (PST)
Received: from localhost (unknown [173.38.220.56]) by mail.tail-f.com (Postfix) with ESMTPSA id 24EA21AE0144; Wed, 31 Jan 2018 08:55:57 +0100 (CET)
Date: Wed, 31 Jan 2018 08:55:56 +0100
Message-Id: <20180131.085556.903506869247717213.mbj@tail-f.com>
To: kwatsen@juniper.net
Cc: mjethanandani@gmail.com, pathori@gmail.com, netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <D2073184-BC0D-4471-BCE0-F6EC532BA3AD@juniper.net>
References: <805AA544-8B1D-4F80-999C-AABB3F5D3253@juniper.net> <DC672864-B29D-4F52-BF89-CCB09539CC30@gmail.com> <D2073184-BC0D-4471-BCE0-F6EC532BA3AD@juniper.net>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/AY04TPvf7zrRb950HvILFIhSyrQ>
Subject: Re: [Netconf] Clarification about additional attributes at Messages(RPC) layer
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Jan 2018 07:56:48 -0000

Kent Watsen <kwatsen@juniper.net> wrote:
> 
> Section 4.2 says that "message-id" is mandatory, and that the server MUST
> return any additional attributes included in the <rpc> element.  But it doesn't
> say anything that limits a server returning even more.
> 
> My assumption is that it is allowed.  Specifically, from an XML document
> encoding perspective, it is always valid to move "xmlns" prefix declarations
> to ancestor elements…

Yes, but not necessarily other attributes, like in this case.

However, the XSD in RFC 6241 has:

     <xs:complexType name="rpcReplyType">
       ...
       <xs:anyAttribute processContents="lax"/>
     </xs:complexType>

which means that in the XML layer, any attribute in any namespace can
be sent.  This does not necessarily mean that the higher layers will
accept such attributes, but I would be very surprised if an
implementation somehow rejected a rpc-reply b/c it didn't understand
all attributes.


/martin



> 
> K.  // contributor
> 
> 
> On 1/30/18, 1:25 PM, "Mahesh Jethanandani" <mjethanandani@gmail.com<mailto:mjethanandani@gmail.com>> wrote:
> 
> [As contributor]
> 
> 
> On Jan 30, 2018, at 6:54 AM, Kent Watsen <kwatsen@juniper.net<mailto:kwatsen@juniper.net>> wrote:
> 
> 
> I believe that this is allowed by [1], but worry about interoperability due to the "config-id" attribute being a proprietary extension.
> 
> [1] https://tools.ietf.org/html/rfc6241#section-4.2<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_rfc6241-23section-2D4.2&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=iT-5cpJaklJMJbEVRv4fgPBCu63AMMak0WbYDDMdYts&s=0FHMPEAKMzcNdQB20gJvvoJinRvDVVr13531hZJHbtY&e=>
> 
> Per that section, what is returned is what was originally in the request. The nc-ext is something that has been added in the response, and was not existing in the request.
> 
> To Shiva’s question, it is not clear how the clients will react to additional data in the <rpc-reply>. Will they just ignore it, or barf at it?
> 
> 
> 
> Kent  // contributor
> 
> 
> Assuming the namespace prefix is there to support
> 
> On 1/29/18, 3:17 PM, "Netconf on behalf of Shiva Kumar Pathori" <netconf-bounces@ietf.org<mailto:netconf-bounces@ietf.org> on behalf of pathori@gmail.com<mailto:pathori@gmail.com>> wrote:
> 
> Hi,
> Can somebody clarify below <rpc-reply> sent by the NETCONF server will break the NETCONF client functionality. Additional attribute information is shown in RED color.
> 
> 
> <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<https://urldefense.proofpoint.com/v2/url?u=http-3A__example.com_schema_1.2_config&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=nAjM7pDWG7HS1viFkN6mWV_1Ii2GVce-FvEqf3h0gfo&s=LQjMxXfz35-ysUajs_4pgqhw9Cmbna4-0672JlBXzNI&e=>">
> 
>              <interface>
> 
>                <name>Ethernet0/0</name>
> 
>                <mtu>1500</mtu>
> 
>              </interface>
> 
>            </top>
> 
>          </config>
> 
>        </edit-config>
> 
>      </rpc>
> 
> 
> <rpc-reply message-id="101"
> 
>           xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
> 
>           xmlns:nc-ext="http://sample.com/netconf/ext<https://urldefense.proofpoint.com/v2/url?u=http-3A__sample.com_netconf_ext&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=nAjM7pDWG7HS1viFkN6mWV_1Ii2GVce-FvEqf3h0gfo&s=H__4DCa9XJZJTIQ_Ewl7nAey_4XKXSKLAh-48KhPxMI&e=>" nc-ext:config-id="1">
> 
>        <ok/>
> 
>      </rpc-reply>
> 
> I have just tried with MG SOFT NETCONF browser and worked fine, I think MG SOFT browser ignored these attributes.
> 
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org<mailto:Netconf@ietf.org>
> https://www.ietf.org/mailman/listinfo/netconf<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netconf&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=iT-5cpJaklJMJbEVRv4fgPBCu63AMMak0WbYDDMdYts&s=rw5qXFv9bAYyUmvp0t9QdGF7ogdxJrQJWUEdpRzAE4A&e=>
> 
> Mahesh Jethanandani
> mjethanandani@gmail.com<mailto:mjethanandani@gmail.com>
> 
>