Re: [netmod] Question on RESTCONF / Yang list creation without key value
Ramon Casellas <ramon.casellas@cttc.es> Thu, 20 June 2019 04:01 UTC
Return-Path: <ramon.casellas@cttc.es>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 45FE712019C for <netmod@ietfa.amsl.com>; Wed, 19 Jun 2019 21:01:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.1
X-Spam-Level: *
X-Spam-Status: No, score=1.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTML_MIME_NO_HTML_TAG=0.377, MIME_HTML_ONLY=0.723, MISSING_MIMEOLE=1.899, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no 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 fTAG85OLrFDq for <netmod@ietfa.amsl.com>; Wed, 19 Jun 2019 21:01:46 -0700 (PDT)
Received: from mx02.puc.rediris.es (outbound4sev.lav.puc.rediris.es [130.206.19.178]) (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 52F4512016B for <netmod@ietf.org>; Wed, 19 Jun 2019 21:01:46 -0700 (PDT)
Received: from leo.cttc.es (leo.cttc.es [84.88.62.208]) by mx02.puc.rediris.es with ESMTP id x5K41RGQ009595-x5K41RGS009595 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=CAFAIL); Thu, 20 Jun 2019 06:01:28 +0200
Received: from [10.30.30.199] (unknown [31.4.184.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by leo.cttc.es (Postfix) with ESMTPSA id 762601FF81; Thu, 20 Jun 2019 06:01:27 +0200 (CEST)
Date: Thu, 20 Jun 2019 06:01:17 +0200
Message-ID: <6ff27ff2-4eb4-42ff-99bb-822de1965ef6@email.android.com>
X-Android-Message-ID: <6ff27ff2-4eb4-42ff-99bb-822de1965ef6@email.android.com>
In-Reply-To: <0100016b72f8144d-4db21faf-b6bc-4519-b63e-bb5a2d139ae4-000000@email.amazonses.com>
From: Ramon Casellas <ramon.casellas@cttc.es>
To: Kent Watsen <kent@watsen.net>
Cc: netmod@ietf.org, ARTURO MAYORAL LOPEZ DE LERMA <arturo.mayoral.ext@telefonica.com>, Italo Busi <Italo.Busi@huawei.com>, "Sethuraman, Karthik" <karthik.sethuraman@necam.com>
Importance: Normal
X-Priority: 3
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pg_4J5R5V9MDNKFuv0zWM5FZOVE>
Subject: Re: [netmod] Question on RESTCONF / Yang list creation without key value
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Jun 2019 04:01:48 -0000
On Jun 19, 2019, at 2:37 AM, Ramon Casellas <ramon.casellas@cttc.es> wrote:
TL&DR: is it possible to create a list entry without specifying its key, assuming that the server can allocate such key while processing the request ?The expected answer is "no", because, as RFC 7950 Section 7.8.2 says: '''the "key" statement ... MUST be present if the list represents configuration''', and hence most tooling will expect the keys to be present in POST operations.
However, RFC 8040 Section 4.4.1 says "the message-body MUST contain exactly one instance of the expected data resource.
- [netmod] Question on RESTCONF / Yang list creatio… Ramon Casellas
- Re: [netmod] Question on RESTCONF / Yang list cre… Kent Watsen
- Re: [netmod] Question on RESTCONF / Yang list cre… Ramon Casellas