Re: [netconf] What is the response structure when querying a specific instance object in a list?

Andy Bierman <andy@yumaworks.com> Wed, 17 April 2024 17:05 UTC

Return-Path: <andy@yumaworks.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 3D66CC14F748 for <netconf@ietfa.amsl.com>; Wed, 17 Apr 2024 10:05:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CwQGw1-XkVFl for <netconf@ietfa.amsl.com>; Wed, 17 Apr 2024 10:05:29 -0700 (PDT)
Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 04BB5C14F70C for <netconf@ietf.org>; Wed, 17 Apr 2024 10:05:28 -0700 (PDT)
Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2ab1ddfded1so6593a91.1 for <netconf@ietf.org>; Wed, 17 Apr 2024 10:05:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1713373528; x=1713978328; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qiV/oc7FVc+l4rM23vr7dJV0rLaQGYDWDg4bcK3JMgA=; b=tQV1us1gaejpzRlyThelCQ9ijOAP7J8zgI2zIVxAOZML03d9YJyUvj681ofc2pW+PD x3qxXkL1d5s4Sv7iIsq2zDptx7lhqVoMpEEymuVXmIdzM/Mej9QEvjelm6BDR3ZxrjMj M3YhGNsHkOXEK8ujeuEgl3/9nl3zwgWfF8ZVkMdLMuhxjpu6Esvk7x6qK6r41XCr81cY 8LreorfbmocRov2bAmHI2tOR/ySXYCETtyCn+7+T4gYakb0n14kHeXGK9Cx0RTzwHoHa ErhRaCDxrKagIL/bOs01fa5ynTHxZOS/3TZSGGz6rLKwkdtAhb5xF5TPWTIc0JumNCDq BacA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713373528; x=1713978328; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qiV/oc7FVc+l4rM23vr7dJV0rLaQGYDWDg4bcK3JMgA=; b=FYNAQL3mRqNXaNhxLKrnKzqvjFfJ0Fx5lklJ0B9LZpzn4AuAl/JiYhhLezoNFPSdVn y+HC6ljLHWhfYaZIOQakN2pH563wBABiHMj7AQA87RB9TTdcBd71D522oUAw331AO8Qx +Z5zFOZTivOl2z18mnDX6EBEBwVBu7t0bZKfSK3dIypTjTY8EPOCyaWwzGhQR34Kg30H uiIIwgmw98QCZ0r5SQ34Mzu28L7VpK4mpfjXm05KTVLBJtthyctnTHbu2/Vp8Zkch/UO wJ6nPgmRIBdRpE8r2iuJ2SjgsTFX6s4Cz74yTx1UX/4wvOy84b4p3PyUrLAhwGHru954 ty0g==
X-Forwarded-Encrypted: i=1; AJvYcCXKJGZUc+Aos3MK8sRTRZimNA2UqI6o+RI394+0DjHnkzBqWldAPfl58xxr/d6Bz8AH4rLczNaAz2fQyv0xac55
X-Gm-Message-State: AOJu0YxcgiRdLEj+MLiHCkved0yCE/SZiwNPP/oNJCMQIKPcX9vEX7Y8 4TG1lo89ld2vLs3KCuHWrdgiuu3f5LdKWSKLxSOtQuN1/YBBsYKxxIrw6Z018ItnfThSdFDaf8I 73QHB+9GFJaeHRI5LcNKJdtr6qG5ZORd7Ut+/vw==
X-Google-Smtp-Source: AGHT+IFwHFFPhIcZIJoPf8vfpfzTnai6sO6+KZuro13INhxKbMHz4EgcVnmHSNqRIvfJLqtHPeCm4RHXPeMjapAifuU=
X-Received: by 2002:a17:90a:ca86:b0:2aa:d115:1cae with SMTP id y6-20020a17090aca8600b002aad1151caemr4658596pjt.7.1713373528225; Wed, 17 Apr 2024 10:05:28 -0700 (PDT)
MIME-Version: 1.0
References: <dec8b1969a8f4511bb99b550407f23d7@huawei.com> <CACvbXWEjB=i6T6JoaCKH3a=eFQ00n2tw2nXfUJkJ_LMgaBQCYg@mail.gmail.com> <0100018eecd3312d-adb42068-b6bf-4608-8797-1e77599b8817-000000@email.amazonses.com>
In-Reply-To: <0100018eecd3312d-adb42068-b6bf-4608-8797-1e77599b8817-000000@email.amazonses.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 17 Apr 2024 10:05:17 -0700
Message-ID: <CABCOCHRdcOTES4EkOvqeYjPGc5FH6J=Bz0nnpabBo5vcRXr=zA@mail.gmail.com>
To: Kent Watsen <kent@watsen.net>
Cc: Per Andersson <per.ietf@ionio.se>, Olof Hagsand <olof@hagsand.se>, yuchaode <yuchaode=40huawei.com@dmarc.ietf.org>, "netconf@ietf.org" <netconf@ietf.org>, "yanglin (N)" <yanglin60@huawei.com>, liuzhoulong <liuzhoulong@huawei.com>, "Wangxi(Cordelia)" <wangxi114@huawei.com>
Content-Type: multipart/alternative; boundary="00000000000084937e06164ddcf5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/EgwteJEfbsr1fnL-l4yo4GipdxY>
Subject: Re: [netconf] What is the response structure when querying a specific instance object in a list?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 17 Apr 2024 17:05:33 -0000

On Wed, Apr 17, 2024 at 9:10 AM Kent Watsen <kent@watsen.net> wrote:

>
> Per is right, it is not well-defined in RFC 8040 and the examples are
> counter-intuitive.
> - Please see https://github.com/netconf-wg/restconf-next/issues/5
>
> Personally, I’d like file an errata to document that the example is
> wrong.  But, first, it would be good to know what leading RESTCONF
> implementations do.
>
> Can we hear back from, e.g., Clixon, Confd, YumaPro devs?
>
>

A list is always encoded as an array, even if one entry is returned.
YumaPro follows RFC 7951:

        A list instance is encoded as a name/array pair, and the array elements
are JSON objects.




> Kent
>
>
>
Andy


> On Apr 16, 2024, at 8:22 AM, Per Andersson <per.ietf@ionio.se> wrote:
>
> Hi!
>
> I tried looking for support on how to return the JSON result
> in RFC 8040 and RFC 7951 but found no text defining it.
>
> However, the examples in Appendix B.3.9 shows that when
> adressing a specific list element, it should be enclosed in
> square brackets.
>
> FWIW this is also how our system behaves.
>
>
> --
> Per
>
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>
>
>