Re: [Netconf] Opinion poll on RESTCONF encoding

Mahesh Jethanandani <mjethanandani@gmail.com> Fri, 28 August 2015 00:43 UTC

Return-Path: <mjethanandani@gmail.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E82C91B2A88 for <netconf@ietfa.amsl.com>; Thu, 27 Aug 2015 17:43:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
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 KWI1RFgD9tDP for <netconf@ietfa.amsl.com>; Thu, 27 Aug 2015 17:43:58 -0700 (PDT)
Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (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 21FCC1ACE0B for <netconf@ietf.org>; Thu, 27 Aug 2015 17:43:58 -0700 (PDT)
Received: by pacgr6 with SMTP id gr6so5854576pac.3 for <netconf@ietf.org>; Thu, 27 Aug 2015 17:43:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=U46WSXTuSONxClQ3qg7OFSooxrfBwdHd9QhIk3HhZb0=; b=GqW8lF6qKlBvNkZCmxhJmB/LPEJ2Aetigq8NPNv5dxYubxM1oCAIyuoQPHIYNVGY3b js/tBsVEd639K1zIqcz3oBD5k6WVdbr2uj2pzWsJRMn1ujcudI3p530N+w+R78UJJzop 9p84VDkUmSZVXQNSGSA4zHH1KECih9pmLklHg14ticALx/eR72+pf85OJldTFGvJNG2e 4ivSB7ENsuFp2ai0AbhomSg51dYTV7yqNyI6lVvq5aDmXbNBtGFcLI/8NvB6BTkSW40W 2iNGbLHefD1YG9JG8tI+xq59PS0xH/pangLpFvxwCYTX8Kc71QJKUZnG01/HAriwr3vf P0Hg==
X-Received: by 10.66.149.102 with SMTP id tz6mr10548961pab.125.1440722637653; Thu, 27 Aug 2015 17:43:57 -0700 (PDT)
Received: from dmp-sjc23-3.cisco.com (dmp-sjc23-3.cisco.com. [128.107.157.235]) by smtp.gmail.com with ESMTPSA id fa1sm3692748pbb.35.2015.08.27.17.43.56 (version=TLS1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Aug 2015 17:43:56 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_F4A13C8A-42A1-4D17-A765-881294391DB7"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
From: Mahesh Jethanandani <mjethanandani@gmail.com>
In-Reply-To: <D204B66C.D3BD6%kwatsen@juniper.net>
Date: Thu, 27 Aug 2015 17:45:17 -0700
Message-Id: <641268B1-E221-46E7-8D61-4FAEF027FBA4@gmail.com>
References: <1232641A-BE91-4AAD-962D-779E4D85403A@gmail.com> <CABCOCHRkmHw0oy8-AYyin+YaE8-2aS5fjwAmggx_FUOzd1rg5A@mail.gmail.com> <D203D804.D372C%kwatsen@juniper.net> <20150827052649.GA87193@elstar.local> <D204A742.D3B4B%kwatsen@juniper.net> <20150827161221.GA88495@elstar.local> <D204B66C.D3BD6%kwatsen@juniper.net>
To: Kent Watsen <kwatsen@juniper.net>
X-Mailer: Apple Mail (2.2098)
Archived-At: <http://mailarchive.ietf.org/arch/msg/netconf/FDGCRAUYiGlyXHUjijRKeKUnIAM>
Cc: Netconf <netconf@ietf.org>
Subject: Re: [Netconf] Opinion poll on RESTCONF encoding
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Network Configuration WG mailing 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, 28 Aug 2015 00:44:00 -0000

What I am reading from the discussion till now is:

Accept request-header needs to be supported and that it is not an option.
The client can choose not to send the header, in which case the server can pick an encoding of its choice and respond with it.
The client can send what it does support, in which case the server either accepts the encoding it supports or returns a 406. The 406 (Not Acceptable) status codes include information about the available representations.
The client can send “*/*". Same behavior as not getting a Accept header.
Server MAY support advertising of encodings using the ./well-known/host-meta file and XRD.

If this a fair summary, we can update the RESTCONF draft with these details.

> On Aug 27, 2015, at 10:31 AM, Kent Watsen <kwatsen@juniper.net> wrote:
> 
> 
> 
> 
>> It does not matter, we should not change HTTP.
> 
> But we're not, HTTP has a bunch of "SHOULD"s that can and should be
> restricted as it makes sense for REST APIs.   Please feel free to search
> REST API best practices on this.
> 
> 
> 
>> This is what RRC 7231 has to say:
>> 
>>  A request without any Accept header field implies that the user agent
>>  will accept any media type in response.
> 
> Lada brought this up too.   Yes, this could be interpreted as "assume */*
> was passed" or, per section 3.4.2:
> 
>   A server might choose not to send an initial representation, other
>   than the list of alternatives, and thereby indicate that reactive
>   negotiation by the user agent is preferred.  For example, the
>   alternatives listed in responses with the 300 (Multiple Choices) and
>   406 (Not Acceptable) status codes include information about the
>   available representations so that the user or user agent can react by
>   making a selection.
> 
> 
> 
> BTW, I tested `wget` and `curl` also, they both pass "*/*" like the
> mainline browsers...
> 
> Kent
> 
> 
> 
> 
> 
> 

Mahesh Jethanandani
mjethanandani@gmail.com