[netconf] Question on restconf empty list reply

Olof Hagsand <olof@hagsand.se> Sun, 23 February 2020 11:13 UTC

Return-Path: <olof@hagsand.se>
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 120953A0CA8 for <netconf@ietfa.amsl.com>; Sun, 23 Feb 2020 03:13:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.497
X-Spam-Level:
X-Spam-Status: No, score=-0.497 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 UpUGnh5MFdIQ for <netconf@ietfa.amsl.com>; Sun, 23 Feb 2020 03:13:05 -0800 (PST)
Received: from smtp2.outgoing.loopia.se (smtp2.outgoing.loopia.se [93.188.3.37]) (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 17D253A0CA7 for <netconf@ietf.org>; Sun, 23 Feb 2020 03:13:04 -0800 (PST)
Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 57DBF2E76737 for <netconf@ietf.org>; Sun, 23 Feb 2020 12:12:59 +0100 (CET)
Received: from s630.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 39A952E27812 for <netconf@ietf.org>; Sun, 23 Feb 2020 12:12:59 +0100 (CET)
Received: from s472.loopia.se (unknown [172.22.191.6]) by s630.loopia.se (Postfix) with ESMTP id 30B8013ABEB2 for <netconf@ietf.org>; Sun, 23 Feb 2020 12:12:59 +0100 (CET)
X-Virus-Scanned: amavisd-new at amavis.loopia.se
Received: from s645.loopia.se ([172.22.191.6]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id 9qxxHTIPtYg9 for <netconf@ietf.org>; Sun, 23 Feb 2020 12:12:58 +0100 (CET)
X-Loopia-Auth: user
X-Loopia-User: olof@hagsand.se
X-Loopia-Originating-IP: 85.227.89.255
Received: from [10.0.0.14] (ua-85-227-89-255.bbcust.telenor.se [85.227.89.255]) (Authenticated sender: olof@hagsand.se) by s645.loopia.se (Postfix) with ESMTPSA id 7C502156E555 for <netconf@ietf.org>; Sun, 23 Feb 2020 12:12:58 +0100 (CET)
To: netconf@ietf.org
From: Olof Hagsand <olof@hagsand.se>
Message-ID: <4bca4ca8-0d9f-d986-4521-5c808a6e8a4d@hagsand.se>
Date: Sun, 23 Feb 2020 12:12:58 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/x-D4nKRYFEMw5qMt9inVx_00Jeg>
Subject: [netconf] Question on restconf empty list 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: Sun, 23 Feb 2020 11:13:08 -0000

Hello,
In a restconf GET request of an empty YANG list using JSON encoding,
what is the expected reply? I.e. using a yang list "x" in module "m"
(pseudo http):
  GET /restconf/data/m:x
  Accept: application/yang-data+json

Is the reply (1):
  HTTP/1.1 200 OK
  {
    "m:x": []
  }

or should it be (2)
  "404 Not Found" status-line and error-tag value "invalid-value"?

Apologizes that this is a basic question, and I am sure this is resolved
properly, but we have some discussions with users on how to properly
interpret the description of GET in RFC 8040 Section 4.3 and RFC 7951.

Regards,
Olof Hagsand,
Clixon maintainer