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

Amar Jadagoud <ammys.vas@gmail.com> Thu, 14 February 2019 12:14 UTC

Return-Path: <ammys.vas@gmail.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 E99EF13106D for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 04:14:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 FeJKuZ85TSdu for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 04:14:39 -0800 (PST)
Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A664F130EB3 for <netmod@ietf.org>; Thu, 14 Feb 2019 04:14:39 -0800 (PST)
Received: by mail-qt1-x82d.google.com with SMTP id p48so6555025qtk.2 for <netmod@ietf.org>; Thu, 14 Feb 2019 04:14:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=krZmIKJcwKcvnY/QqfLLtvFVWmlMxTQ+PgJSRL6NOnk=; b=UAiE+ThLTUOrN/bNmaeoXrYXlmPpIFqFlXFI+iyegZhk5f/udtb+5kExvIA/7i9B1i phSFcvglj7Gc7Id/Hh5KvY9JGtghKmKG+HFXJRkDw6sJ2eXayKoDVCgPhE/sR1ozM0IL HHYoRCcPZcEFFP2vPC+QqlRZUhrecbPDgfYPS5ZX0TfvXZrUp+xrY3Hp7tGO4G6MQyOH yf9tPgMure47fIH0/JQbACvCaVDFHPG54jT6as6rHiWg4cnmevPQmjURl99c2BMEmjA4 xMpQBLhnxfhowvyTPk3FiL3p3axCd25uDeuBND11UbfydFYo/Av0pa0RGDNPT6489rah H1sA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=krZmIKJcwKcvnY/QqfLLtvFVWmlMxTQ+PgJSRL6NOnk=; b=O0ODYAAWDiXPiCszvNjQxnMNzUH5M/yKAXsh0/hDiE8K/H9BGy8LR55Opwc1hZ1pWP 8mHdoPHSR0vK4/dKidMct4UKlWX6LfUIVmzrTjHo1GbrbXXd1ztbjQ9J2CyJTD5H8B1C s366IvqUqdaY2RFBJgTxlmn08cNgXK6BTf6oc4VeMXt6LrBo1kUoP7CpHLfj622cU0wc pPuYxGvNQ02aS95WePPqsNZ61aMrRQGdQqYQHKBkXuLF4vPO1QNP8urEsYESK9CxY5/H EYsVL32sQssRxzmeVt6D9/vqdvFs3Bb/7DdR9q6O8s6UjZG5HFRTVfLubK0T3Er0xMV6 68vg==
X-Gm-Message-State: AHQUAuabNmPFhueoGZloR0i7+pogJEXE9+/Hi3Y9npdYwsPlfEEp7IPH eD0urFBio55oe9rqE6XB/xx0LCKhBJJSzXYPGvuuBQ==
X-Google-Smtp-Source: AHgI3IbKOed9ahIiATLjPgU5R73JatWBV01p58oQCN/BYn/mdw5tqJbFdjH/iQ7KhecXPu2+49kwE9CwPVM1C2w8sVs=
X-Received: by 2002:a0c:9a4c:: with SMTP id q12mr2630086qvd.58.1550146478640; Thu, 14 Feb 2019 04:14:38 -0800 (PST)
MIME-Version: 1.0
References: <CAKiLt9+K=X2jRWJZo4vT4DC=aNVH0RL6b2ByNwh2Z1JykcWcPw@mail.gmail.com> <d8bc9eae-c947-4f13-b22c-ee2207ec6b99@cisco.com> <d16d52297f7440dc91ef556e95d13da0d0148159.camel@nic.cz>
In-Reply-To: <d16d52297f7440dc91ef556e95d13da0d0148159.camel@nic.cz>
From: Amar Jadagoud <ammys.vas@gmail.com>
Date: Thu, 14 Feb 2019 17:44:26 +0530
Message-ID: <CAKiLt9KXZf--P9YO1q4aKabEX_K+R-Ad=PxVHRgDJHkomh4cEA@mail.gmail.com>
To: netmod@ietf.org
Content-Type: multipart/alternative; boundary="00000000000035917b0581d99aa4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Uc1Uebi6oWwdU-YTYoGaB37FGqs>
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: Thu, 14 Feb 2019 12:14:42 -0000

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 <lhotka@nic.cz wrote:

> On Thu, 2019-02-14 at 11:26 +0000, Robert Wilton wrote:
> > 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
>
> 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" : {
>                   "ietf-netconf-with-defaults:default" : true
>               },
>             "@" : {
>                     "ietf-origin:origin" : intended
>                   },
>               "status" : "up"
>       }
>   ]
> }
>
> Lada
>
> >
> > 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
> > > https://www.ietf.org/mailman/listinfo/netmod
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
>