netconf-wg / restconf-next

A repository to collection feature requests for RESTCONF
0 stars 0 forks source link

Let list/leaf-list be "data resources" #4

Open kwatsen opened 4 years ago

kwatsen commented 4 years ago

It seems that list and leaf-list should be "data resources", as defined in Section 3.5 of RFC 8040.

1) Eliminate "need" to wrap lists in containers

 For instance, in order to return the entire list without the model having to wrap a `container` around the list, or to use the (somewhat server-side expensive) `fields` query parameter.

2) Provide a target for "collection" operations (e.g., draft-ietf-netconf-restconf-collection)

 That is, operations that act on the list as a whole (described in Issue #1)

From a resource-target perspective, it just means that the URL addresses the list/leaf-list node without specifying a key. For instance, whereas the following URI addresses a list-item:

{+restconf}/data/example-jukebox:jukebox/playlist=Foo-One

This URI could address the list itself:

{+restconf}/data/example-jukebox:jukebox/playlist
mjethanandani commented 11 months ago

Check to see if list pagination draft addresses it. Per Andy, RFC 8040 requires that a key be specified, and thus requires a new RFC.

avtobiff commented 8 months ago

This is addressed in I-D.draft-ietf-netconf-list-pagination-rc Section 2..1. Resource Targets:

This document extends Section 3.5 of [RFC8040] to add "list" and "leaf-list" nodes (not just their entries) as valid data resources for the "GET" and "DELETE" operations.

kwatsen commented 8 months ago

@avtobiff Not entirely. The list-pagination-rc draft used to define a DELETE operator, but the WG felt like it was not on topic, so it was removed. Most of what's needed is in list-pagination-rc, but a DELETE is still missing.