Re: [core] ? WG adoption of draft-veillette-core-yang-cbor-mapping-00

Somaraju Abhinav <abhinav.somaraju@tridonic.com> Fri, 22 April 2016 10:25 UTC

Return-Path: <abhinav.somaraju@tridonic.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A379C12D9E2 for <core@ietfa.amsl.com>; Fri, 22 Apr 2016 03:25:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=zgrp.onmicrosoft.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 6ljfeOgf-R8d for <core@ietfa.amsl.com>; Fri, 22 Apr 2016 03:25:39 -0700 (PDT)
Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0780.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe00::780]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C669712D8C6 for <core@ietf.org>; Fri, 22 Apr 2016 03:25:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zgrp.onmicrosoft.com; s=selector1-tridonic-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7N86N4327ZRYPJnh/3HYOrctWp9boVN2EbvyqdKQf3U=; b=IsU5eCN0E2epEuQ2s5FUWW3kMhgNy6h1IolkwjUyiaWxx7SAaEbxTdsO8s3ZKJfjcTbjicWhDyf4tsM/KHUHn1B2jQ6ZwQJ7M0oy7cU2r+hMIC3eKB6aDDeQ3Ck//nyQxq0dItejXIuuci5qFk+VWLY4sDlQWT7vDq4xkMN0rSQ=
Received: from VI1PR06MB1839.eurprd06.prod.outlook.com (10.165.237.157) by VI1PR06MB1840.eurprd06.prod.outlook.com (10.165.237.158) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 10:25:17 +0000
Received: from VI1PR06MB1839.eurprd06.prod.outlook.com ([10.165.237.157]) by VI1PR06MB1839.eurprd06.prod.outlook.com ([10.165.237.157]) with mapi id 15.01.0466.023; Fri, 22 Apr 2016 10:25:17 +0000
From: Somaraju Abhinav <abhinav.somaraju@tridonic.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Thread-Topic: [core] ? WG adoption of draft-veillette-core-yang-cbor-mapping-00
Thread-Index: AQHRm/X+5ubwG7D3zkGKYQfJYUlSTp+U1XaAgAAQYQCAAAPogIAACmYAgAADbQCAALSEcIAACEQAgAASJFA=
Date: Fri, 22 Apr 2016 10:25:16 +0000
Message-ID: <VI1PR06MB18396292DB47427BE381711BFC6F0@VI1PR06MB1839.eurprd06.prod.outlook.com>
References: <570A4583.2030100@tzi.org> <5718A09E.7040607@gmx.net> <BLUPR06MB1763F3B6BDE5240402576758FE6E0@BLUPR06MB1763.namprd06.prod.outlook.com> <20160421174806.GA8710@elstar.local> <BLUPR06MB1763C3A1543AAB909C95D20EFE6E0@BLUPR06MB1763.namprd06.prod.outlook.com> <20160421204630.GA8993@elstar.local> <BLUPR06MB17635E7755D44E34BB1FACA5FE6E0@BLUPR06MB1763.namprd06.prod.outlook.com> <20160421213738.GD8993@elstar.local> <CABCOCHTzsRiom8aMNu1YSmg_dk=mf3-5Y7SbO4OOCUZKVufgSQ@mail.gmail.com> <VI1PR06MB1839CAEC8A9D774D92F3EDB6FC6F0@VI1PR06MB1839.eurprd06.prod.outlook.com> <20160422090538.GA10739@elstar.local>
In-Reply-To: <20160422090538.GA10739@elstar.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: jacobs-university.de; dkim=none (message not signed) header.d=none;jacobs-university.de; dmarc=none action=none header.from=tridonic.com;
x-originating-ip: [146.108.200.10]
x-ms-office365-filtering-correlation-id: ac4eae3b-53c7-4bb2-ef95-08d36a98661b
x-microsoft-exchange-diagnostics: 1; VI1PR06MB1840; 5:3pw9Bl2O5XIHuCLOycHdKk2sDu73zNzd5mVS86hcwk7BraH/iwoIpQvfo0nyGh81mQ98QW+N0ZA73oKmpopORdCJ4M5U8gWyywVet2eOrHhglt0gkvLX32ZceWjUplutWvPi15QCSnI+GmFEiJWv+dO+v4v7wOaQeSBZC22R9Lam3acGSCBBoCS2+Yk4kO0f; 24:HrCucksR9GBwdxZW35BOrYTrRjeMgT3JHiQwA5ql/lHTMDRv/iu5cTSYs8EOugCXTcaMjSbxTiRK/fPIlNh4XJYGIbPbpoOlqhwFvkYK9cs=; 7:MzBk8y71+pMcQ2jlKcroEIeW96CCuSSUv+ABduFfFvKM0+oSRo/72eAUtLQu5LUIVwY5ozTW0A0EBJcUTYpa1ik3kjS5QI0jdrcIbZdRPWpGu2/fgy+0v4n5sWGejNkUB8eJ762QoiPNIExLrqohKxoZ/M9MIFwRLWZQDIeKv/YbjQmwESnPqDesNr2r2mvEasahbxfZvPKh8rJYJZ5sHWn6HmHxeZDJNvYh1xQnYIY=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR06MB1840;
x-microsoft-antispam-prvs: <VI1PR06MB184025990E24D1B73FE88A34FC6F0@VI1PR06MB1840.eurprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:VI1PR06MB1840; BCL:0; PCL:0; RULEID:; SRVR:VI1PR06MB1840;
x-forefront-prvs: 0920602B08
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(377454003)(24454002)(19580395003)(2950100001)(5890100001)(77096005)(15975445007)(87936001)(76576001)(19580405001)(50986999)(5004730100002)(76176999)(54356999)(230783001)(2900100001)(586003)(122556002)(106116001)(5003600100002)(86362001)(11100500001)(93886004)(5002640100001)(74316001)(1220700001)(3660700001)(9686002)(4326007)(10400500002)(189998001)(2906002)(3280700002)(1096002)(66066001)(33656002)(5008740100001)(92566002)(3846002)(81166005)(102836003)(6116002)(110136002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR06MB1840; H:VI1PR06MB1839.eurprd06.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: tridonic.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2016 10:25:16.8333 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8b206608-a593-4ace-a4b6-ef1fc83c9169
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR06MB1840
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/iR9EzikMj7a68kEjY0MLOKNFUKA>
Cc: "core@ietf.org WG" <core@ietf.org>
Subject: Re: [core] ? WG adoption of draft-veillette-core-yang-cbor-mapping-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Apr 2016 10:25:41 -0000

We have modeled something in YANG is not the same as there is a _simple_ translation (or I wrongly assumed 'automated translation'
while the intention was 'human translation'?).
[AS] Agree. This was just supposed to be an example. We have not worked on a translation tool/rules from YANG to LWM2M. However, we do use automated tools to go from YANG modules to LWM2M compliant client code-skeletons written in c/c++ (via an intermediate and unnecessary step of producing XSD files).

Concerning operations: In YANG 1.1, you can associate an operation with a YANG container or a YANG list element (it is called an action in YANG 1.1).
[AS] Yes, we looked at using containers+actions to model read/write/execute resources. I think there are a few ways to do this - e.g. using Yang extensions. I have personally not had to use it though because I prefer the YANG solution of keeping data and operations separate.

But since you map so called 'objects' to modules, it probably does not matter (and I am not sure mapping 'objects' to modules is what I would do but then I just do not the LWM2M details).
[AS] I played around with three options initially - using YANG submodules as LWM2M objects, using YANG containers as objects and using YANG modules as objects. For our purpose all three options worked okay. I don't have a preference one way or another.


On Fri, Apr 22, 2016 at 08:46:50AM +0000, Somaraju Abhinav wrote:
> Hi,
> We have been using YANG to model objects that we use with LWM2M for about 6 months now. As far as I can tell, there is only one part of the LWM2M resource model that cannot be modelled using YANG: LWM2M has resources on which you can read, write and execute (operations). YANG distinguishes between resources that are operations vs data and therefore cannot be used to model resources in LWM2M that support the three types of operations. There are of course ways around this issue.
>
> As an example, please find attached an IPSO object available for download at http://www.ipso-alliance.org/so-starter-pack/ which my colleague has modelled in YANG. Please note that the YANG model is just an example and is not approved/endorsed by IPSO or LWM2M.
>
> Regards,
> Abhinav
>
> From: core [mailto:core-bounces@ietf.org] On Behalf Of Andy Bierman
> Sent: Donnerstag, 21. April 2016 23:50
> To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>;
> Michel Veillette <Michel.Veillette@trilliantinc.com>; Hannes
> Tschofenig <hannes.tschofenig@gmx.net>; core@ietf.org WG
> <core@ietf.org>
> Subject: Re: [core] ? WG adoption of
> draft-veillette-core-yang-cbor-mapping-00
>
>
>
> On Thu, Apr 21, 2016 at 2:37 PM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote:
> On Thu, Apr 21, 2016 at 09:00:29PM +0000, Michel Veillette wrote:
> > Hi Juergen
> >
> > The extract I have provided is from a publically available document, see:
> > https://www.iab.org/wp-content/IAB-uploads/2016/03/ipso-paper.pdf
> >
> > My remark about the LWM2M modeling language was just to highlight that such language don't necessary imply code generation.
> >
>
> YANG does not imply code generation either. A YANG module defines a
> contract, and in the light of a protocol a programmatic interface.
> There is nothing in YANG that requires code generation.
>
> It just happens that people often tend to automate things if they find
> themself repeatedly writing similar code. It is at the end a question
> of how much data a device exposes and what kind of developers you are
> dealing with and whether you have a product that is expected to evolve
> over years or something designed to be sold and thrown away
> afterwards. ;-)
>
> /js
>
> PS: I have just implemented a YANG data model 'manually' because I had
>     reasons to not depend on tool chains (the target environment are
>     OpenWrt type of devices). But still I took advantage of having
>     YANG tools available to validate test cases so that I can be
>     reasonably sure my manually written code is a good match of the
>     contract.
>
>
> There are commercial and open-source toolchains that handle the
> NETCONF/YANG interaction model and most of the data model details in
> the protocol stack, instead of pushing that work out to the model
> instrumentation.  This can save a lot of code and makes sure the client or server has consistent behavior.
>
> But you are making an important point.
> The expected use CoMI/CoOL co-authors have discussed is client
> firmware written to work with specific YANG modules/revisions.  The
> client needs to retrieve enough server state to know if the server
> supports the same module revisions, and then just assumes the API contract will be followed.  It does not need any YANG parser or code automation.
>
>
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>
>
> Andy
>
> _______________________________________________
> core mailing list
> core@ietf.org<mailto:core@ietf.org>
> https://www.ietf.org/mailman/listinfo/core
>
> ________________________________________________________ The contents of this e-mail and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this e-mail is received in error, please immediately notify the sender and delete the e-mail and attached documents. Please note that neither the sender nor the sender's company accept any responsibility for viruses and it is your responsibility to scan or otherwise check this e-mail and any attachments.



--
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
________________________________________________________ The contents of this e-mail and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this e-mail is received in error, please immediately notify the sender and delete the e-mail and attached documents. Please note that neither the sender nor the sender's company accept any responsibility for viruses and it is your responsibility to scan or otherwise check this e-mail and any attachments.