Re: [netconf] Augmenting rpc-reply
BL <bl@ndt-inc.com> Thu, 10 September 2020 20:02 UTC
Return-Path: <bl@ndt-inc.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 668FF3A00E0
for <netconf@ietfa.amsl.com>; Thu, 10 Sep 2020 13:02:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.947
X-Spam-Level:
X-Spam-Status: No, score=-2.947 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001,
MIME_HTML_ONLY=0.1, NICE_REPLY_A=-0.948, RCVD_IN_MSPIKE_H2=-0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key)
header.d=ndt-inc.com
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 1vlmJbWt5vu3 for <netconf@ietfa.amsl.com>;
Thu, 10 Sep 2020 13:02:41 -0700 (PDT)
Received: from delivery.mailspamprotection.com
(delivery.mailspamprotection.com [146.66.121.163])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 986B13A00E5
for <netconf@ietf.org>; Thu, 10 Sep 2020 13:02:41 -0700 (PDT)
Received: from 108.134.209.35.bc.googleusercontent.com ([35.209.134.108]
helo=usm9.siteground.biz) by se19.mailspamprotection.com with esmtps
(TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92)
(envelope-from <bl@ndt-inc.com>) id 1kGSmD-000EEz-9m
for netconf@ietf.org; Thu, 10 Sep 2020 15:02:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ndt-inc.com
; s=default;
h=Content-Transfer-Encoding:Content-Type:In-Reply-To:
MIME-Version:Date:Message-ID:References:To:Subject:From:Sender:Reply-To:Cc:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=80vJFvbjfGYd4rmFU5zqM/xXwqfJ0zdaDI90FHm6/KY=; b=Dqt3LkTcI8XYKJorJUeqg4gRkj
di9RgttrdhFNaz466tk94KpAdpuA7HjWN49Dsme0hwLpyxZ/+exYUkVoY7L2Jlt3U6IDVrZex/svE
iESYEQpX8pJTplaX/t33kmFYP3IXLLli+6r7Nd6NI5RBwtOpRxhGLG5msP6mg8Pmd1fytCtJAjj3g
73LQ0gx1Dt+bl5NcWULKTchE8eqnSusQOeTHJ+n0EnDE2EWI2CxWiKTQK9hPNQLWFGYne+9J/Esob
eEEGMk7TEjKpVzabm+mV2KWmmJFOXCXnIpuIFdFwF7jEU74mW+VqtQ5XGFazTNjSG6zfBYRf2SmFo
gjs4LPCg==;
Received: from [104.158.52.238] (port=57729 helo=[192.168.0.11])
by usm9.siteground.biz with esmtpsa tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
(Exim 4.90devstart-1178-b07e68e5-XX) (envelope-from <bl@ndt-inc.com>)
id 1kGSmB-0008Vk-SB
for netconf@ietf.org; Thu, 10 Sep 2020 15:02:35 -0500
From: BL <bl@ndt-inc.com>
To: netconf@ietf.org
References: <FC898DB0-8306-4E23-BD34-88657D36C98B@cisco.com>
<20200910.185258.804843941725520730.id@4668.se>
Message-ID: <b0958ac9-b0d9-bbbd-d4a8-a32cfacb66dc@ndt-inc.com>
Date: Thu, 10 Sep 2020 16:02:36 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <20200910.185258.804843941725520730.id@4668.se>
Content-Type: text/html; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Originating-IP: 35.209.134.108
X-SpamExperts-Domain: usm9.siteground.biz
X-SpamExperts-Username: 35.209.134.108
Authentication-Results: mailspamprotection.com;
auth=pass smtp.auth=35.209.134.108@usm9.siteground.biz
X-SpamExperts-Outgoing-Class: ham
X-SpamExperts-Outgoing-Evidence: Combined (0.16)
X-Recommended-Action: accept
X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0Ux9i8jFyHj5FzBttN4d2CmpSDasLI4SayDByyq9LIhVRd0maQyJx+hl
2Hpp+y2XbkTNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDfAKZvAjuJrqAt2e//bIc/80D
SEpCfISRYCKsig5kq2J0sEdyL12LyawlyA4Rpz3fZIOQYaDXB30lsHjt7j8HkIUhra8TUx3meeRt
+wubTTN8IyMUYcjQIyM7A0a7Hw2/0LXYdRxy64PJ5ar6NXZxz1tOlr0+z/ilDEUwvRrWtaIJYSxy
lOCUOhVdCS2dVe3E0p8T4Nd45j4kJRgJ8MJ6+Lbg54OUBZbdh6VWgAnfl8p4DqxxlnCnOQKjhagE
KuLSpFcLxHSMmVCkv47x59CmBIeCSxLZ5vMkhIi5r4+dNkkg921mdjeq9x3a70LThETW8FXNoZZP
bj1AsAZNMWt0tZKDcNF1LrVoVLXP90si9Lylvnhbbs49QZ7Zf6tX0XMpdgXkdE4z4t2s9ub/ESVc
nxUdFqkFA+YKkUlydLh5cSaHt73jJKU44zPi+Pzpc9G5DMXe7HNAN2+ce9dIwwYzhLSJjzN5e8VF
lEjmqR4rzvUXKu1VbgppFJRGoXLED7mHbbgVl4iunqFoEGZzSy+km6VHO6XhXqN3g0DWG4Tioc84
Kpmg5+UpQ2PZprb+nvdWlgS6K9aAlnrXFI3hveFdl2eq/qzceto8CcRq9s+GCaXOeSo+FQAObmD0
VKOYk5mGiU5kvlu4NkDxYW25mjIWhoB/rjBzlgNbb1EnmZQ6W41BnxV7vrqtm+8eTkwXzwr2oKbs
1UemucIXgC/FkHy3pB1FwvATlZ9Ul2WmcMm637alfrrQwspGMmH9O9Ru/ZIqd5XdG63CgJuXpt48
NSiQMYLUAj1reKtuJ/PKbNBhf48EvBRuunLSplrr9QRZqw0PZZMNJ8quWiXUAmdknSuMGQ0xJ0iB
XG5yyzNjv8REXgSClBil8hpVlsvzJoExwMCOfqb5R4VemuUI6bcEARsm0Dr3oUiCwaAHstJEoNvD
O1dLfMJvL9MU4OTcHOkZJFZv3ZSvk4v9HutKS1dcD2JhVi7/+fOTvqVqTiiM4NskccTyD/jwFMJs
L+hBK6STp56WJrV9kzdlDY8OFlMKDf8PPuirgpnjCsDh3bxR+3JNRr8=
X-Report-Abuse-To: spam@quarantine1.mailspamprotection.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/Ybtkax1xa0vYIuXGvXgbpUiCItA>
Subject: Re: [netconf] Augmenting rpc-reply
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG 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: Thu, 10 Sep 2020 20:02:44 -0000
Returning both <ok> and <note> is inconsistent with rfc6241: Appendix B:"Jan Lindblad \(jlindbla\)" <jlindbla=40cisco.com@dmarc.ietf.org> wrote:Dear NETCONF WG, We have been discussing back and forth, and several interpretations of the relevant RFCs (4741/6241 and 6020/7950) have come up. We would very much like to hear the opinions on this list to settle the question. When a client issues an <edit-config>, a server would respond with an <ok> or <rpc-error> like this: <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/> </rpc-reply> or <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc-error> <error-type>rpc</error-type> <error-tag>missing-attribute</error-tag> <error-severity>error</error-severity> <error-info> <bad-attribute>message-id</bad-attribute> <bad-element>rpc</bad-element> </error-info> </rpc-error> </rpc-reply> If the NETCONF server would like to augment additional information into the rpc-reply, is that legal? If so, what would that look like?The answer should be yes, this is legal, and it looks like this: augment /nc:edit-config/nc:output { leaf note { type string; } } And: <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/> <note xmlns="my-namespace">abc...</note> </rpc-reply> However, RFC 7950 says in section 7.14.4: If the RPC operation invocation succeeded and no output parameters are returned, the <rpc-reply> contains a single <ok/> element defined in [RFC6241]. Which seems to say that if a note is returned, you would get: <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <note xmlns="my-namespace">abc...</note> </rpc-reply> This is also consistent with the XSD in RFC 6241. The problem with this though is that clients probably check for the presence of "ok" to verify that an edit-config succeeds, hence I think it should be allowed to reply with both <ok/> and additional elements, as examplified above.
<xs:complexType name="rpcReplyType">
<xs:choice>
<xs:element name="ok"/>
<xs:sequence>
<xs:element ref="rpc-error" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="rpcResponse" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
/Borislav
For the sake of the example, let's say the server would like to add something like this to the operation result: <note xmlns="my-namespace">abc...</note> While this example was for edit-config and a <note> tag, we expect this discussion should be equally applicable to other NETCONF operations with other tags or attributes in both the success (<ok>) and failure (<rpc-error>) cases. Best Regards, /Jan Lindblad/martin _______________________________________________ netconf mailing list netconf@ietf.org https://www.ietf.org/mailman/listinfo/netconf" rel="nofollow">https://www.ietf.org/mailman/listinfo/netconf
- [netconf] Augmenting rpc-reply Jan Lindblad (jlindbla)
- Re: [netconf] Augmenting rpc-reply BL
- Re: [netconf] Augmenting rpc-reply Martin Björklund
- Re: [netconf] Augmenting rpc-reply Kent Watsen
- Re: [netconf] Augmenting rpc-reply Andy Bierman
- Re: [netconf] Augmenting rpc-reply BL
- Re: [netconf] Augmenting rpc-reply Jan Lindblad (jlindbla)
- Re: [netconf] Augmenting rpc-reply Juergen Schoenwaelder
- Re: [netconf] Augmenting rpc-reply Martin Björklund
- Re: [netconf] Augmenting rpc-reply Andy Bierman