Subject: [netconf] Trouble with RFC 8040 (Restconf) fields Query Parameter

From: Henning Rogge <[email-masked]>
Date: Thu, 2 Apr 2020 14:18:33 +0200

Hi,

I am trying to implement a Restconf (RFC8040) compliant server in
Python and having trouble interpreting the definition of the "fields"
query parameter (Section 4.8.3).

Does the "fields-expr" ABNF allow multiple nested bracket parts?
e.g.:

fields-expr = path ( path ; ( path ; path; ( path ; path ) ) )

My guess is it allows to nest the "sub-selector" operator, but only
the rightmost of a series of multiple selected nodes ( split by ";" )
can be another sub-selector.

Is this interpretation correct? What is the supposed semantic for this
kind of query parameter?

Henning Rogge

---

From: Henning Rogge <[email-masked]>
Date: Sat, 11 Apr 2020 23:02:30 +0200

Anyone (Maybe the timing of the question just before the IETF was not
that good ^^) ?

Henning Rogge?

---

From: Kent Watsen <[email-masked]>
Date: Tue, 14 Apr 2020 14:28:52 +0000

It seems like it would.  Have you tried an ABNF validator?

Kent // contributor

> On Apr 11, 2020, at 5:02 PM, Henning Rogge <[email-masked]> wrote:
> 
> _______________________________________________
> netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

---

From: Henning Rogge <[email-masked]>
Date: Tue, 14 Apr 2020 18:02:32 +0200

Hi,

my problem is how these "multi-parenthesis" expressions are meant to
be processed. Single parenthesis is easy to understand.

Does anyone has at least one example of such a (valid?) fields
expression and what it should do?

Henning Rogge

---

From: Martin Björklund <[email-masked]>
Date: Tue, 14 Apr 2020 22:22:36 +0200 (CEST)

Hi,

Sorry for missing this.

> > Is this interpretation correct? What is the supposed semantic for this

For example:

   "fields=album(genre;(admin/label;admin/catalogue-number))"

would select:

   album/genre
   album/admin/label
   album/admin/catalogue-number
   
as would:

   "fields=album(genre;(admin(label;catalogue-number)))"

/martin

---

From: Henning Rogge <[email-masked]>
Date: Mon, 20 Apr 2020 12:44:55 +0200

>    "fields=album(genre;(admin(label;catalogue-number)))"

Thank you, that helped to generate a few more complicated test cases...

are there any set of test-cases the IETF used for interoperability tests?

Henning Rogge

---

From: Martin Björklund <[email-masked]>
Date: Mon, 20 Apr 2020 20:02:55 +0200 (CEST)

> are there any set of test-cases the IETF used for interoperability tests?

No, not that I am aware of.

/martin