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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 25 April 2016 10:33 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 24E4512D508 for <core@ietfa.amsl.com>; Mon, 25 Apr 2016 03:33:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.196
X-Spam-Level:
X-Spam-Status: No, score=-5.196 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.996] 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 FVGIFx-hJDKJ for <core@ietfa.amsl.com>; Mon, 25 Apr 2016 03:33:54 -0700 (PDT)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69DB212D15E for <core@ietf.org>; Mon, 25 Apr 2016 03:33:53 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id 65A88879; Mon, 25 Apr 2016 12:33:52 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id sVDSzKn5BINi; Mon, 25 Apr 2016 12:33:49 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Mon, 25 Apr 2016 12:33:51 +0200 (CEST)
Received: from localhost (demetrius1.jacobs-university.de [212.201.44.46]) by hermes.jacobs-university.de (Postfix) with ESMTP id E16372007B; Mon, 25 Apr 2016 12:33:50 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius1.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id Q1IEya8nZY0R; Mon, 25 Apr 2016 12:33:49 +0200 (CEST)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 842182005E; Mon, 25 Apr 2016 12:33:40 +0200 (CEST)
Received: by elstar.local (Postfix, from userid 501) id E3D863AB4BD7; Mon, 25 Apr 2016 12:33:38 +0200 (CEST)
Date: Mon, 25 Apr 2016 12:33:38 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Hannes Tschofenig <hannes.tschofenig@gmx.net>
Message-ID: <20160425103338.GA17158@elstar.local>
Mail-Followup-To: Hannes Tschofenig <hannes.tschofenig@gmx.net>, Carsten Bormann <cabo@tzi.org>, "core@ietf.org WG" <core@ietf.org>
References: <570A4583.2030100@tzi.org> <5718A09E.7040607@gmx.net> <BLUPR06MB1763F3B6BDE5240402576758FE6E0@BLUPR06MB1763.namprd06.prod.outlook.com> <20160421174806.GA8710@elstar.local> <571D1E63.9090003@tzi.org> <571DEF4A.50506@gmx.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
X-Clacks-Overhead: GNU Terry Pratchett
Content-Transfer-Encoding: 8bit
In-Reply-To: <571DEF4A.50506@gmx.net>
User-Agent: Mutt/1.6.0 (2016-04-01)
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/YD-wssem3OkY0DxbQmtutD7wowU>
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
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
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: Mon, 25 Apr 2016 10:33:57 -0000

Hannes,

whether this YANG fragment makes sense or not I simply do not know
without knowing LWM2M and since there are no open specs there is
little help you can expect. I have no clue about the interaction model
of OMA LWM2M nor do I know what LWM2M_Device is etc.

The claim was made that there is a 'simple' conversion (and I read
that as 'simple algorithm' to do conversion) and all I am asking is
whether someone actually went through the details of this. All I saw
so far are sketches of examples, thats good for a start but still
likely a longer way from a 'simple algorithm' (if that was the
intention).

But we should really be using a different thread - or simply wait
until someone managed to work out the details and got permission from
OMA to write it down without violating their legal constraints they
put on their registration wall.

/js

On Mon, Apr 25, 2016 at 12:19:54PM +0200, Hannes Tschofenig wrote:
> Hi Juergen, Hi Carsten,
> 
> The data modelling language used by OMA LWM2M is an XML schema and the
> OMA only uses it for two purposes:
> 
>  * Adding new objects and resources to the registry allows automatic
> validation (of the XML instance documents against the XML schema).
> 
>  * The XML schema really only models the data and does not attempt to
> describe the interaction.
> 
> There has been no attempt to generate code from the XML instance
> documents (as far as I know).
> 
> I have tried to take a subset of the device object and to describe it in
> Yang. To my knowledge nobody has tried to describe all currently
> registered objects with Yang.
> 
> In any case, here is what I have tried:
> 
> ----
> 
> module LWM2M_Device {
> 	// header information
> 	yang-version "1";
> 	namespace "foobar1";			
> 	prefix "LWM2M_Device";
> 	
> 	// linkage statements
> 	import extensions {
> 		prefix extensions;
> 		ietf-yang-types@2013-07-15.yang;
> 	}
> 	
> 	// meta information
> 	organization "OMA";
> 	contact "foobar2";
> 	description
> 		"This object provides a range of device related information which can
> be queried by the LWM2M Server, and a device reboot and factory reset
> function.";
> 	reference
> "http://technical.openmobilealliance.org/tech/profiles/LWM2M_Device-v1_0.xml";
> 	
> 	// revision history
> 	revision 2016-04-20 {
> 		description "Initial revision.";
> 		reference "";
> 	}
> 	
> 	// module definitions
> 	extensions:LWM2M_Object_ID "3";
> 	
> 	// typedef statements
> 	
> 	// data statements
> 	
> 	leaf Manufacturer {
> 		extensions:LWM2M_Resource_ID "0";
>         type string;
> 		config true;
> 		description "Human readable manufacturer name";
> 	}
> 	
> 	leaf ModelNumber {
> 		extensions:LWM2M_Resource_ID "1";
> 		type String;
> 		config true;
> 		description "A model identifier
>                 (manufacturer specified string).";
> 	}
> 	
> 	leaf SerialNumber {
> 		extensions:LWM2M_Resource_ID "2";
> 		type String;
> 		config true;
> 		description "Serial Number.";
> 	}
> 	
> 	leaf AvailablePowerSources {
> 		extensions:LWM2M_Resource_ID "6";
> 		type int32 {
>                   range "0..7";
>                 };		
> 		config true;
> 		description "
>  0 – DC power
>  1 – Internal Battery
>  2 – External Battery
>  4 – Power over Ethernet
>  5 – USB
>  6 – AC (Mains) power
>  7 – Solar";
> 	}
> 	
> 	leaf BatteryLevel {
> 		extensions:LWM2M_Resource_ID "9";
> 		type int32 {
>             range "0..100";
>         };
> 		units percent;
> 		config false;
> 		description "Contains the current battery level as a percentage (with
> a range from 0 to 100). This value is only valid when the value of
> Available Power Sources Resource is 1.";
> 	}
> 	
> 	leaf MemoryFree {
> 		extensions:LWM2M_Resource_ID "10";
> 		type int32;
> 		units KB;
> 		config false;
> 		description "Estimated current available amount of storage space which
> can store data and software in the LWM2M Device (expressed in kilobytes).";
> 	}
> 	
> 	leaf CurrentTime {
> 		extensions:LWM2M_Resource_ID "13";
> 		type timestamp;
> 		units KB;
> 		config false;
> 		description "Current UNIX time of the LWM2M Client. The LWM2M Client
> should be responsible to increase this time value as every second
> elapses. The LWM2M Server is able to write this Resource to make the
> LWM2M Client synchronized with the LWM2M Server.";
> 	}
> 	
> }
> 
> ----
> 
> The problem I have is to find out whether Yang is able to also describe
> the interaction model of OMA LWM2M. I believe the current understanding
> is that this is not possible without some extensions. Please correct me.
> 
> Ciao
> Hannes
> 
> 
> On 04/24/2016 09:28 PM, Carsten Bormann wrote:
> > Hi Juergen,
> > 
> > trying to read your message -- are you just commenting on the side
> > conversation here or is this also a comment on the adoption call?
> > 
> > Grüße, Carsten
> > 
> > 
> > Juergen Schoenwaelder wrote:
> >> On Thu, Apr 21, 2016 at 05:34:50PM +0000, Michel Veillette wrote:
> >>> First, LWM2M have its own modeling language encoded in xml.
> >>> A file like "OMA-SUP-XML_LWM2M_Security-V1_0-20131210-C" is not fundamentally different than something than can be named security.yang.
> >>> A simple xml transform can probably do the conversion between the two without any lost.
> >>> LWM2M just have a simpler (subset) modeling language.
> >>>
> >>
> >> These are pretty bold statements. Claiming something is simple and
> >> knowing something is simple are sometimes different things. Have you
> >> worked throught the details? Is there a decent public definition of
> >> the 'simpler (subset) modeling language'? And with public I mean
> >> public, not hidden behind all sorts of registration walls.
> >>
> >> /js
> >>
> > 
> > _______________________________________________
> > core mailing list
> > core@ietf.org
> > https://www.ietf.org/mailman/listinfo/core
> > 
> 



-- 
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/>