Subject: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05

From: Amar Jadagoud <[email-masked]>
Date: Thu, 14 Feb 2019 12:19:22 +0530

Hi All,

I have a question regarding encoding of origin annotation along with other
annotation (with-defaults) in JSON metadata encoding format.

Suppose if below is the GET method :

GET
/restconf/ds/ietf-datastores:operational/ietf-interface:interfaces/interface=eth1?with-defaults=report-all-tagged&with-origin
HTTP/1.1

How both origin and with-defaults annotations should be encoded in the JSON
metadata encoding format?

Currently in restconf RFC 8040, in section 5.3.2, example with only one
annotation is provided.

 Refering to this example, whether multiple annotation representation
should be like below?

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {
                  "ietf-netconf-with-defaults:default" : true
              },
              {
                    "ietf-origin:origin" : intended
              },
              "status" : "up"
      }
  ]
}

Thanks,
Amar

---

From: Robert Wilton <[email-masked]>
Date: Thu, 14 Feb 2019 11:26:35 +0000

Hi Amar,

Based on RFC 7952 section 5.2.1, I think that it would look like this:

{
     "example:interface" : [
        {
            "name" : "eth1",
            "mtu" : 1500,
            "@mtu" : {
                   "ietf-netconf-with-defaults:default" : true,
   "ietf-origin:origin" : intended
               },
            "status" : "up"
       }
   ]
}

Thanks,
Rob

On 14/02/2019 06:49, Amar Jadagoud wrote:
> Hi All,
>
> I have a question regarding encoding of origin annotation along with 
> other annotation (with-defaults) in JSON metadata encoding format.
>
> How both origin and with-defaults annotations should be encoded in the 
> JSON metadata encoding format?
>
> Currently in restconf RFC 8040, in section 5.3.2, example with only 
> one annotation is provided.
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 14 Feb 2019 12:40:42 +0100

>                   "ietf-origin:origin" : intended

It depends. The version above is correct but both annotations are attached to
the "mtu" leaf. If the idea was to attach the origin annotation to the interface
entry, then it should be encoded like this:

{
    "example:interface" : [
       {
	   "name" : "eth1",
	   "mtu" : 1500,
	   "@mtu" : {
	    "@" : {

Lada

> > GET /restconf/ds/ietf-datastores:operational/ietf-
> > interface:interfaces/interface=eth1?with-defaults=report-all-tagged&with-
> > origin HTTP/1.1
> > 
> >  Refering to this example, whether multiple annotation representation should
> > be like below? 
> > 
> > {
> >     "example:interface" : [
> >        {
> >            "name" : "eth1", 
> >            "mtu" : 1500,
> >            "@mtu" : {
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

---

From: Amar Jadagoud <[email-masked]>
Date: Thu, 14 Feb 2019 17:44:26 +0530

Hi Robert, Ladislav,

Thanks for the clarification. I think it would be helpful if an example of
encoding multiple annotations in JSON metadata encoding is mentioned in any
of the related drafts.

Thanks,
Amar

On Thu 14 Feb, 2019, 5:10 PM Ladislav Lhotka <[email-masked] wrote:

> other
> should

---

From: Alex Campbell <[email-masked]>
Date: Thu, 14 Feb 2019 21:17:56 +0000

Hi,

By my understanding both annotations should be included in one JSON object, like this.

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {
                  "ietf-netconf-with-defaults:default" : true,
                  "ietf-origin:origin" : "intended"
            },
            "status" : "up"
      }
  ]
}

________________________________
From: netmod <[email-masked]> on behalf of Amar Jadagoud <[email-masked]>
Sent: Thursday, 14 February 2019 7:49 p.m.
To: [email-masked]
Subject: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05

Hi All,

I have a question regarding encoding of origin annotation along with other annotation (with-defaults) in JSON metadata encoding format.

GET /restconf/ds/ietf-datastores:operational/ietf-interface:interfaces/interface=eth1?with-defaults=report-all-tagged&with-origin HTTP/1.1

How both origin and with-defaults annotations should be encoded in the JSON metadata encoding format?

Currently in restconf RFC 8040, in section 5.3.2, example with only one annotation is provided.

 Refering to this example, whether multiple annotation representation should be like below?

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {

Thanks,
Amar

---

From: Rohit R Ranade <[email-masked]>
Date: Fri, 15 Feb 2019 03:27:10 +0000

I think the value ‘intended’ should be namespace qualified to ensure uniqueness.

Section 5.2.1 in RFC 7952:
“The value of a metadata annotation SHALL be encoded in exactly the
   same way as the value of a YANG leaf node having the same type as the
   annotation”

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {
                  "ietf-netconf-with-defaults:default" : true,
                  "ietf-origin:origin" : “ietf-origin:intended”
              },
           "status" : "up"
      }
  ]
}

With Regards,
Rohit R

From: netmod [mailto:[email-masked]] On Behalf Of Robert Wilton
Sent: 14 February 2019 16:57
To: Amar Jadagoud <[email-masked]>; [email-masked]
Subject: Re: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05

Hi Amar,

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {

Thanks,
Rob

{
    "example:interface" : [
       {
           "name" : "eth1",
           "mtu" : 1500,
           "@mtu" : {

Thanks,
Amar

netmod mailing list

[email-masked]<mailto:[email-masked]>