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

Rohit R Ranade <rohitrranade@huawei.com> Fri, 15 February 2019 03:27 UTC

Return-Path: <rohitrranade@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8E504130E92 for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 19:27:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.189
X-Spam-Level:
X-Spam-Status: No, score=-4.189 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v4OibOMJcTqV for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 19:27:27 -0800 (PST)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AB4BE130E7D for <netmod@ietf.org>; Thu, 14 Feb 2019 19:27:26 -0800 (PST)
Received: from lhreml709-cah.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 6A91B7D6B28FEA05EA1D for <netmod@ietf.org>; Fri, 15 Feb 2019 03:27:24 +0000 (GMT)
Received: from lhreml708-chm.china.huawei.com (10.201.108.57) by lhreml709-cah.china.huawei.com (10.201.108.32) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 15 Feb 2019 03:27:22 +0000
Received: from lhreml708-chm.china.huawei.com (10.201.108.57) by lhreml708-chm.china.huawei.com (10.201.108.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 15 Feb 2019 03:27:22 +0000
Received: from DGGEML424-HUB.china.huawei.com (10.1.199.41) by lhreml708-chm.china.huawei.com (10.201.108.57) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256) id 15.1.1591.10 via Frontend Transport; Fri, 15 Feb 2019 03:27:21 +0000
Received: from DGGEML510-MBX.china.huawei.com ([169.254.2.6]) by dggeml424-hub.china.huawei.com ([10.1.199.41]) with mapi id 14.03.0415.000; Fri, 15 Feb 2019 11:27:11 +0800
From: Rohit R Ranade <rohitrranade@huawei.com>
To: Robert Wilton <rwilton@cisco.com>, Amar Jadagoud <ammys.vas@gmail.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05
Thread-Index: AQHUxDGG4DkfFamfa0SWfA5SnmCb+KXeocmAgAGQMvA=
Date: Fri, 15 Feb 2019 03:27:10 +0000
Message-ID: <991B70D8B4112A4699D5C00DDBBF878A6BCF8947@dggeml510-mbx.china.huawei.com>
References: <CAKiLt9+K=X2jRWJZo4vT4DC=aNVH0RL6b2ByNwh2Z1JykcWcPw@mail.gmail.com> <d8bc9eae-c947-4f13-b22c-ee2207ec6b99@cisco.com>
In-Reply-To: <d8bc9eae-c947-4f13-b22c-ee2207ec6b99@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.18.150.121]
Content-Type: multipart/alternative; boundary="_000_991B70D8B4112A4699D5C00DDBBF878A6BCF8947dggeml510mbxchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/uVqRYjQxkqtVY6nn8tTMSX7MRjo>
Subject: Re: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Feb 2019 03:27:29 -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:netmod-bounces@ietf.org] On Behalf Of Robert Wilton
Sent: 14 February 2019 16:57
To: Amar Jadagoud <ammys.vas@gmail.com>; netmod@ietf.org
Subject: Re: [netmod] Regarding origin annotation encoding in ietf-netconf-nmda-restconf-05


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.

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



_______________________________________________

netmod mailing list

netmod@ietf.org<mailto:netmod@ietf.org>

https://www.ietf.org/mailman/listinfo/netmod