Re: [netconf] restconf collections
Andy Bierman <andy@yumaworks.com> Thu, 29 October 2020 19:00 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 30C173A0A60 for <netconf@ietfa.amsl.com>; Thu, 29 Oct 2020 12:00:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 1hD_xvLursLS for <netconf@ietfa.amsl.com>; Thu, 29 Oct 2020 12:00:14 -0700 (PDT)
Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4902C3A0A82 for <netconf@ietf.org>; Thu, 29 Oct 2020 12:00:13 -0700 (PDT)
Received: by mail-lf1-x135.google.com with SMTP id 141so4679692lfn.5 for <netconf@ietf.org>; Thu, 29 Oct 2020 12:00:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iRkKTS3Zh/XQJA3toybPnH0eq0Ifpc4c25hibhaCLpk=; b=UTNJB9HZX7UHDr0L8R/p+PnVyxKEkNDm7h5bB81PmqSTbri780aeKUN39cNyLzc66+ cMtgD3CAIk5Nw1PjXzA8vVmgW+vxDPvY92gOxvZlLOcGgRTGiEjtCZCNWBHoOqYuY4JH ApCyG5hBM9TqJrc1guSmqq6MHTTVvbIkmVwiu94U6fVEKwJQNgQZb98E3bsJhrqnpSUJ u35Rtl7WsAyrNLr8v9DTWUTSwDTO/qRutg01M5OzYSw8klBxsbHQwx6yjghQkrQMZcMU fiGIr1ZHIllQw3TADh50gyzrSLC5GZl15cWGEFRrWcUtAtQ+eWVO1B8RZWXAzQH2EROf 7BVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iRkKTS3Zh/XQJA3toybPnH0eq0Ifpc4c25hibhaCLpk=; b=KKlj2lby6BVuz8cC+M6MNUtdNo08v0NUJypcAEX2h/HQw2g9uzt2kNfWGNh59YZNdB j/TbHBEee+aPYWL7Ehh6lL5rk75o8mM4Laio0NyW+7vF492rqTpqUjBdukeJ5U/iX6n1 Rw5WrrIkWbpJuz+Jt8zQIysWd6MBy/i2M0cAKPddcLeLvnvmQOBv3M0LmJM5MvCnw0T5 oFgqEx3QbTVL9uGf9OhI/PzfIn2SpRMqDkrtch7NWN1Mr3JM9kpqeI/tV4aK+KWihbQf 9u/QXPV9bIc7AP/e7JqSHnotGqJfUSGR9K5tGAln9jgrJRtFzxIPtLzmCAm2FmrANp7Y QBbQ==
X-Gm-Message-State: AOAM532xp1M7qBFPgDq3bnGKb9Sbf6t3y3QO+FJsmPAdzYKToj3DD326 0LNNLP2CtnB3tut/2fTrTRwCPKRhXAqpIM340vu3qw==
X-Google-Smtp-Source: ABdhPJxn6bJqWLBaN6hvYfiYLb3Zg+lGh6wkTC7RthoSpNTtzmA3RrBH4eFm9OXzp3NnEumJ6TIlFkDnoEZX7R6RJ5c=
X-Received: by 2002:ac2:5618:: with SMTP id v24mr2041653lfd.138.1603998011223; Thu, 29 Oct 2020 12:00:11 -0700 (PDT)
MIME-Version: 1.0
References: <20201029.085108.142889809049265936.id@4668.se> <01000175751b1e3f-d4a84796-9f90-49eb-bbea-d3be5966f233-000000@email.amazonses.com> <20201029.172220.1401832604665061345.id@4668.se>
In-Reply-To: <20201029.172220.1401832604665061345.id@4668.se>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 29 Oct 2020 11:59:59 -0700
Message-ID: <CABCOCHQ9B4c9AZFVT44OeENUt94_ssu9No_Bqe+VYjfpFUg0uQ@mail.gmail.com>
To: Martin Björklund <mbj+ietf@4668.se>
Cc: Kent Watsen <kent+ietf@watsen.net>, Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ae096405b2d3e3cb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/7U3vNXGhzb6X1MP2XTsHjVtQD1g>
Subject: Re: [netconf] restconf collections
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, 29 Oct 2020 19:00:22 -0000
On Thu, Oct 29, 2020 at 9:22 AM Martin Björklund <mbj+ietf@4668.se> wrote: > Kent Watsen <kent+ietf@watsen.net> wrote: > > Hi Martin, > > > > > This is not a good proposal, since the result is not a valid XML > > > document. > > > > How is this important? > > I will be difficult to parse, since you can't just parse it with a > standard XML parser. > > +1 It is perplexing why interoperability with standard XML tools would be forfeited just to save the encoding length of 1 container (about 30 bytes) Andy > > It’s not an HTTP-constraint, right? > > No. > > > and I > > don’t think it is needed for message-framing either. > > > > I guess, as you mention below, the media-type is inappropriate (though > > 11.3.1 isn’t as clear as one might hope), so maybe the response is > > okay if only changing the media type? > > Sure, from a pure media type pow; but I still think it would be a > mistake to send a concatenation of valid XML documents w/o any > separators (and adding custom separators may work, but note how the > original NETCONF XML encoding tried to do that, but failed...). > > > > An XML document has exactly one root element. > > > > > > Also, the media types used in the examples are misleading. The > > > example reply doesn't match the media type > > > "application/yang-data+json" (same for xml). > > > > How isn’t the media-type okay for JSON, for the response in the > > previous message? It seems valid to me... > > You're right, it is valid. My bad. I forgot how clever the JSON > encoding of a single list entry was ;-) > > > No dispute regarding the XML media-type. > > > > > > > I suggest you define new media types and a "collection" root > > > element; or keep the media types and define "collection" in a YANG > > > module as: > > > > > > anydata collection; > > > > Noted, but first would like to understand why simply changing the > > media-type alone (while keeping the responses in the previous message) > > isn’t sufficient, for both xml and json. > > > > Each media-type can define its own format so, e.g., > > “application/yang-data+xml-list" could be used to define a list of XML > > documents, right? > > > > That said, I acknowledge that having a root-element may aid > > xml-parsers, and thus perhaps worthwhile for that reason...just want > > to ensure we understand the motivations accurately. > > Yes this is my concern. > > > /martin > _______________________________________________ > netconf mailing list > netconf@ietf.org > https://www.ietf.org/mailman/listinfo/netconf >
- Re: [netconf] restconf collections Kent Watsen
- [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Per Andersson (perander)
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Andy Bierman
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Andy Bierman
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Andy Bierman
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Andy Bierman
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Robert Varga
- Re: [netconf] restconf collections Robert Varga
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Robert Varga
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Olof Hagsand
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Robert Varga
- Re: [netconf] restconf collections Hongwei Li
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Andy Bierman
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Qin Wu
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Hongwei Li
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Hongwei Li
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Kent Watsen
- Re: [netconf] restconf collections Martin Björklund
- Re: [netconf] restconf collections Andy Bierman