Re: [netconf] Question about NETCONF errors

Martin Bjorklund <mbj@tail-f.com> Fri, 25 January 2019 12:37 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 B283612F295 for <netconf@ietfa.amsl.com>; Fri, 25 Jan 2019 04:37:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-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 J5rMQxfNfFG2 for <netconf@ietfa.amsl.com>; Fri, 25 Jan 2019 04:37:12 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id AE0EB130DE7 for <netconf@ietf.org>; Fri, 25 Jan 2019 04:37:12 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 4BE8B1AE028C; Fri, 25 Jan 2019 13:37:10 +0100 (CET)
Date: Fri, 25 Jan 2019 13:37:09 +0100
Message-Id: <20190125.133709.877670768614099890.mbj@tail-f.com>
To: william.ivory@intl.att.com
Cc: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <E3378E0605547F4E854DEE0CB1116AB00E775BA2@gbcdcmbx03.intl.att.com>
References: <E3378E0605547F4E854DEE0CB1116AB00E775BA2@gbcdcmbx03.intl.att.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/atISILmyPO6qS2i_jzx17C8B8II>
Subject: Re: [netconf] Question about NETCONF errors
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: Fri, 25 Jan 2019 12:37:15 -0000

"Ivory, William" <william.ivory@intl.att.com> wrote:
> Hi,
> 
> I've got a question about the appropriate error to return (if indeed it
> is an error) in the following case.  If I have a top-level YANG
> container node in my configuration that's non-presence, then there are 2
> possible responses:
> 
> (a) config present, returned, no error
> 
> (b) no config present, no data returned
> 
> Is the latter an error case (eg 'unknown-element') or should that only
> be returned for a node that cannot exist, rather than one that simply
> doesn't exist in the current configuration?

Which rpc operation do you send?  I'm guessing a get or get-config
with a subtree filter that selects the container.  These operations do
not return errors if the data is not present, they simply don't return
the data.


/martin


> 
> I've looked at RFC-6241, but didn't find the error descriptions terribly
> helpful.
> 
> Thanks,
> 
> William
> 
> 
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>