Subject: [netmod] NETCONF NMDA <get-data> on conventional datastore

From: Rohit R Ranade <[email-masked]>
Date: Tue, 5 Jun 2018 09:26:53 +0000

Hi All,

RFC 8342 defines the conventional data-store as below

"
     identity conventional {
       base datastore;
       description
         "Abstract base identity for conventional configuration
          datastores.";
     }
"

So when using the data-store-ref with NETCONF <get-data> as below:

<rpc message-id="101"
        xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <get-data
             xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"
             xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
       <datastore>ds:conventional</datastore>
    </get-data>
</rpc>

The libyang parser was successfully able to parse this as a valid data-store-ref. But conceptually this is not a valid data-store as it is an "abstract base identity".
NETCONF Server will have to add code to send error when conventional data-store comes in input.  I would prefer if we can control this using data-model statements then the parser can handle the error. Any thoughts ?

With Regards,
Rohit R Ranade

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 5 Jun 2018 11:39:44 +0200

> NETCONF Server will have to add code to send error when conventional data-store comes in input.  I would prefer if we can control this using data-model statements then the parser can handle the err…

A server will have to respond with an error to requests that reference
something (e.g., a datastore) that does not exist on that particular
server. While 'conventional' likely never exists as a datastore, you
sill have to check for the datastores actually supported by your
implementation so the check for 'conventional' likely falls out for
free anyway.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 05 Jun 2018 11:40:21 +0200 (CEST)

Rohit R Ranade <[email-masked]> wrote:
> The libyang parser was successfully able to parse this as a valid
> data-store-ref. But conceptually this is not a valid data-store as
> it is an "abstract base identity". 
> NETCONF Server will have to add code to send error when conventional
> data-store comes in input.  I would prefer if we can control this
> using data-model statements then the parser can handle the
> error. Any thoughts ?

I agree.  This would be a useful enhancement to YANG.

FWIW, we have implemented such a vendor-specific extension
(tailf:abstract).

It is also listed on the tracker for future ideas:

https://github.com/netmod-wg/yang-next/issues/33

/martin