Subject: [Netconf] ietf-restconf-server: how to configure/express what encodings a server supports

From: Kent Watsen <[email-masked]>
Date: Thu, 28 Jun 2018 19:16:27 +0000

Questions:

  Should ietf-restconf-server be extended to enable an administrator to 
  configure which of possible encodings to support?

  Should ietf-restconf-server be extended to have features like "encode-xml"
  and "encode-json", to express which encodings it supports that way (i.e.,
  in yang-library)?

Background:

In draft-ietf-netconf-restconf-client-server, there is currently:

- no ability to configure the server for which encodings it should support.
  E.g., for the case where the implementation supports more than one, but
  the operator only wants to a subset to be supported.  [is this a valid?]

- no ability for the server to express what encodings it supports (json, 
  xml, etc.).  This one is a catch-22, since the client has to send a 
  request to the server to get yang-library, where it could learn about
  features, but that request already has to be sent in an encoding.
  RFC 8040 Section 5.2 says:

    Content is encoded in either JSON or XML format.  A server MUST
    support one of either XML or JSON encoding.  A server MAY support
    both XML and JSON encoding.  A client will need to support both XML
    and JSON to interoperate with all RESTCONF servers.

    A client can determine if the RESTCONF server supports an encoding
    format by sending a request using a specific format in the
    "Content-Type" and/or "Accept" header field.  If the server does not
    support the requested input encoding for a request, then it MUST
    return an error response with a "415 Unsupported Media Type"
    status-line.  If the server does not support any of the requested
    output encodings for a request, then it MUST return an error response
    with a "406 Not Acceptable" status-line.

Kent // contributor

---

From: Kent Watsen <[email-masked]>
Date: Thu, 28 Jun 2018 22:07:08 +0000

Update: there is an almost parallel question regarding what HTTP transports
the server supports.  RFC 8040 says:

   RESTCONF does not require a specific version of HTTP.  However, it is
   RECOMMENDED that at least HTTP/1.1 [RFC7230] be supported by all
   implementations.

Kent // contributor

===== original message =====

Questions:

Background:

Kent // contributor

_______________________________________________
Netconf mailing list
[email-masked]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netconf&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=t2etVmuuKei1dy-lar2Fx2ITSTnYHX-oR3Or8aQbcuM&s=te_SwYuXn385qUEqictsdsN_KS-ncEVlHomzYbW4tg4&e=