Subject: [core] COMI: Basic Operations

From: Hannes Tschofenig <[email-masked]>
Date: Tue, 21 Jun 2016 10:05:15 +0200

Hi COMI friends,

since you have for sure progressed your work quite a bit since we last
meet in BA I am wondering whether you have a few simple message exchange
examples using COMI for me.

For example, think about a typical IoT device lifecycle where the device
starts and registers its resources with a server in the cloud, it then
periodically sends sensor readings (to that server), and gets requests
from a server as well.

How would this look like in COMI?

Ciao
Hannes

---

From: Carsten Bormann <[email-masked]>
Date: Tue, 21 Jun 2016 12:37:31 +0200

(Translation: What Hannes calls a "server" is a "server" in LWM2M
terminology, which is the common term for a pizza box in a rack turning
a kilowatt into heat expelled with loud fans.  In LWM2M, small devices
are called "clients", even if they are servers in terms of their
communication behavior.)

Indeed, having some examples showing the overall picture of how COMI
might be used would be very useful.  (The example you are giving here is
somewhat focused on device discovery and registration, something that is
a bit secondary to COMI so far.)

On the other side, I also would be interested in someone taking the
(some?) LWM2M specs and translating them into YANG -- is the result
something that we actually might be able to use?  (There are some
obvious difficulties, as LWM2M is closer to REST and, for example, makes
use of media types, but who says YANG can't grow to the occasion?)

Grüße, Carsten

Hannes Tschofenig wrote:
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

---

From: Jaime Jiménez <[email-masked]>
Date: Tue, 21 Jun 2016 13:32:05 +0000

Hi,

it is true that LWM2M switches the term of client and server. They probably should just call it “endpoint" and “manager" or something like that to avoid confusion. And then explain that and endpoint is a CoAP Client and Server, etc…  

What I find interesting here is that both LWM2M and COMI *are* basically CoAP. 

LWM2M simply defines a set of common interactions between an endpoint and its manager. All of those interactions7interfaces are just CoAP messages with a specific resource Object Model. In fact many of those operations are plain CoAP, for example Registration is basically using RD and the “/lwm2m” path, Information Reporting is basically CoAP Observe, Resource Operations are just CoAP REST methods with a CRUD format on top, GET becomes Retrieve, POST becomes Create, etc.

On the Object Model side, what I think would be relatively simple is to translate some of the LWM2M Objects (in XML) to YANG format (as Carsten suggested), I could do that if I get some help from someone with YANG expertise. Similarly, what COMI could/should had is good definitions on how to do the aforementioned management operations. 

Ciao!
- - Jaime Jimenez

> On 21 Jun 2016, at 13:37, Carsten Bormann <[email-masked]> wrote:
>

---

From: Michel Veillette <[email-masked]>
Date: Tue, 21 Jun 2016 17:13:17 +0000

Hi Hannes

Good timing.

On the agenda of our weekly call tomorrow, we have an item to review the proposed function set.

I have included in attachment the invite for this meeting in case you want to participate.

Following is a list of the CoAP methods, associated use cases, message content summary and examples.

For the up to date version of the drafts, see http://core-wg.github.io/yang-cbor/

·         The GET method

o   Use to retrieve the content of a datastore

o   Can be used to implement a backup/restore use case

o   The request contains the URI of the targeted datastore (/c/r = running configuration, /c = current data & running configuration)

o   The response contains an array of pairs of (delta SID, associated values)

o   Example: http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.5.1

·         The PUT method

o   Use to load content of a datastore

o   Can be used to implement the provisioning, commissioning and restore use cases

o   The request contains the URI of the targeted datastore (/c/r = running configuration) and an array of pairs of (delta SID, associated value)

o   Example: http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.5.3

·         The FETCH method

o   Use to retrieve a subset of a datastore

o   Can be used to implement ad-hoc queries, recurrent data retrieval (e.g state and statistics)

o   The request contains the URI of the targeted datastore (/c/r = running configuration) and a list of instance-identifier

o   The response contains an array of associated values (value, CBOR undefined or CBOR default)

o   Examples: http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.5.2

·         The iPATCH method

o   Use to update a subset of a datastore

o   Can be used to update the configuration of a device using a atomic transaction

o   The request contains the URI of the targeted datastore (/c/r = running configuration) and an array of pairs of (instance-identifier, associated value)

o   Example: http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.5.4

o   A candidate datasotre (/c/c) and the "commit" RPC can be used to implement a schedules and/or confirmed update on one or multiple devices.
http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.appendix.A

·         The POST method

o   Use to execute a RPC or an Action

o   The request contains the URI of the targeted datastore (/c/r = running configuration) and an array with up to two entry, the RPC identification (SID) follow by the optional input

o   The request contains contain the optional output

o   Example: http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.5.5

Regards,

Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Hannes Tschofenig
Sent: Tuesday, June 21, 2016 4:05 AM
To: [email-masked] WG <[email-masked]>
Subject: [core] COMI: Basic Operations

Hi COMI friends,

since you have for sure progressed your work quite a bit since we last meet in BA I am wondering whether you have a few simple message exchange examples using COMI for me.

For example, think about a typical IoT device lifecycle where the device starts and registers its resources with a server in the cloud, it then periodically sends sensor readings (to that server), and gets requests from a server as well.

Ciao

Hannes

Subject: Invitation: CoMI with CoOL - mer. 22 juin 2016 17:00 - 18:00 ([email-masked])
From: Alexander Pelov <[email-masked]>
To: Alexander Pelov <[email-masked]>, "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>, "Andy Bierman" <[email-masked]>, "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>, "[email-masked]" <[email-masked]>, "Michel Veillette" <[email-masked]>, "[email-masked]" <[email-masked]>
Date: Wed, 25 May 2016 16:37:47 +0000

plus d'infos »<https://www.google.com/calendar/event?action=VIEW&eid=XzZvczMwaDFpOGgwazhiOWw2b3A0NGI5azZsMTQ4YjlwNmNwMzBiYTI2ZDJrOGUxaTY1MzM4Y3BuODggbWljaGVsLnZlaWxsZXR0ZUB0cmlsbGlhbnRpbmMuY29t&tok=MTYjYXBlbG92QGdtYWlsLmNvbWM4ZTFlNmEzNzU3NDdkOTQxNGM5OTY5YzdiNzMyNzExMmYwM2QxMDU&ctz=Europe/Paris&hl=fr>

CoMI with CoOL
TBD
Date    mer. 22 juin 2016 17:00 – 18:00 Paris
Appel vidéo     Participer à un appel vidéo<https://plus.google.com/hangouts/_/calendar/YXBlbG92QGdtYWlsLmNvbQ._6os30h1i8h0k8b9l6op44b9k6l148b9p6cp30ba26d2k8e1i65338cpn88>
Agenda  [email-masked]
Participants    •       Alexander Pelov- organisateur
•       [email-masked]
•       [email-masked]
•       [email-masked]
•       Andy Bierman
•       [email-masked]
•       [email-masked]
•       [email-masked]
•       [email-masked]
•       [email-masked]
•       [email-masked]

Allez-vous participer ?   Oui<https://www.google.com/calendar/event?action=RESPOND&eid=XzZvczMwaDFpOGgwazhiOWw2b3A0NGI5azZsMTQ4YjlwNmNwMzBiYTI2ZDJrOGUxaTY1MzM4Y3BuODggbWljaGVsLnZlaWxsZXR0ZUB0cmlsbGlhbnRpbmMuY29t&rst=1&tok=MTYjYXBlbG92QGdtYWlsLmNvbWM4ZTFlNmEzNzU3NDdkOTQxNGM5OTY5YzdiNzMyNzExMmYwM2QxMDU&ctz=Europe/Paris&hl=fr> - Peut-être<https://www.google.com/calendar/event?action=RESPOND&eid=XzZvczMwaDFpOGgwazhiOWw2b3A0NGI5azZsMTQ4YjlwNmNwMzBiYTI2ZDJrOGUxaTY1MzM4Y3BuODggbWljaGVsLnZlaWxsZXR0ZUB0cmlsbGlhbnRpbmMuY29t&rst=3&tok=MTYjYXBlbG92QGdtYWlsLmNvbWM4ZTFlNmEzNzU3NDdkOTQxNGM5OTY5YzdiNzMyNzExMmYwM2QxMDU&ctz=Europe/Paris&hl=fr> - Non<https://www.google.com/calendar/event?action=RESPOND&eid=XzZvczMwaDFpOGgwazhiOWw2b3A0NGI5azZsMTQ4YjlwNmNwMzBiYTI2ZDJrOGUxaTY1MzM4Y3BuODggbWljaGVsLnZlaWxsZXR0ZUB0cmlsbGlhbnRpbmMuY29t&rst=2&tok=MTYjYXBlbG92QGdtYWlsLmNvbWM4ZTFlNmEzNzU3NDdkOTQxNGM5OTY5YzdiNzMyNzExMmYwM2QxMDU&ctz=Europe/Paris&hl=fr>    plus d'options »<https://www.google.com/calendar/event?action=VIEW&eid=XzZvczMwaDFpOGgwazhiOWw2b3A0NGI5azZsMTQ4YjlwNmNwMzBiYTI2ZDJrOGUxaTY1MzM4Y3BuODggbWljaGVsLnZlaWxsZXR0ZUB0cmlsbGlhbnRpbmMuY29t&tok=MTYjYXBlbG92QGdtYWlsLmNvbWM4ZTFlNmEzNzU3NDdkOTQxNGM5OTY5YzdiNzMyNzExMmYwM2QxMDU&ctz=Europe/Paris&hl=fr>
Invitation de Google Agenda<https://www.google.com/calendar/>

Vous recevez ce message à l'adresse [email-masked], car vous participez à cet événement.

Refusez cet événement pour ne plus recevoir de notifications le concernant. Vous avez également la possibilité de créer un compte Google à l'adresse https://www.google.com/calendar/ et de définir vous-même les paramètres de notification pour l'intégralité de votre agenda.

En transférant cette invitation, vous risquez d'autoriser tous les destinataires à modifier votre réponse à l'invitation. En savoir plus<https://support.google.com/calendar/answer/37135#forwarding>.

---

From: Michel Veillette <[email-masked]>
Date: Tue, 21 Jun 2016 17:21:04 +0000

Hi Jaime

I can certainly help you with this process of translating some of the LWM2M Objects (in XML) to YANG.
At least reviewing the end result.

Regards,

 Michel Veillette
System Architecture Director
Trilliant Inc.
Tel: 450-531-3109

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Jaime Jiménez
Sent: Tuesday, June 21, 2016 9:32 AM
To: Carsten Bormann <[email-masked]>
Cc: [email-masked] WG <[email-masked]>
Subject: Re: [core] COMI: Basic Operations

Hi,

Ciao!
- - Jaime Jimenez

> terminology, which is the common term for a pizza box in a rack 
> turning a kilowatt into heat expelled with loud fans.  In LWM2M, small 
> devices are called "clients", even if they are servers in terms of 
> their communication behavior.)
> 
> might be used would be very useful.  (The example you are giving here 
> is somewhat focused on device discovery and registration, something 
> that is a bit secondary to COMI so far.)
> 
> obvious difficulties, as LWM2M is closer to REST and, for example, 
> makes use of media types, but who says YANG can't grow to the 
> occasion?)
> 
> Grüße, Carsten
> 
> 
> Hannes Tschofenig wrote:
>> Hi COMI friends,
>> 
>> since you have for sure progressed your work quite a bit since we 
>> last meet in BA I am wondering whether you have a few simple message 
>> exchange examples using COMI for me.
>> 
>> For example, think about a typical IoT device lifecycle where the 
>> device starts and registers its resources with a server in the cloud, 
>> it then periodically sends sensor readings (to that server), and gets 
>> requests from a server as well.
>>

---

From: "Turner, Randy" <[email-masked]>
Date: Tue, 21 Jun 2016 17:50:48 +0000

Are we allowed to ‘DELETE’ object instances ?

What about OBSERVE semantics ?

R.

From: core [mailto:[email-masked]] On Behalf Of Michel Veillette
Sent: Tuesday, June 21, 2016 1:13 PM
To: Hannes Tschofenig; [email-masked] WG
Subject: Re: [core] COMI: Basic Operations

Hi Hannes

Good timing.

•         The GET method

•         The PUT method

•         The FETCH method

•         The iPATCH method

•         The POST method

Regards,

Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Hannes Tschofenig
Sent: Tuesday, June 21, 2016 4:05 AM
To: [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: [core] COMI: Basic Operations

Hi COMI friends,

Ciao

Hannes

---

From: Michel Veillette <[email-masked]>
Date: Tue, 21 Jun 2016 18:16:26 +0000

Hi Andy

About your first question, data node instances can be deleted using the iPATCH.
Alternatively, the entire datastore can be replaced using the PUT method.

About "What about OBSERVE semantics"
As mentioned at http://core-wg.github.io/yang-cbor/draft-veillette-core-cool-latest.html#rfc.section.6.8, the "observe" CoAP option is supported to observe data node instance.

Regards,
Michel

From: Turner, Randy [mailto:[email-masked]]
Sent: Tuesday, June 21, 2016 1:51 PM
To: Michel Veillette <[email-masked]>; [email-masked] WG <[email-masked]>
Subject: RE: [core] COMI: Basic Operations

R.

From: core [mailto:[email-masked]] On Behalf Of Michel Veillette
Sent: Tuesday, June 21, 2016 1:13 PM
To: Hannes Tschofenig; [email-masked]<mailto:[email-masked]> WG
Subject: Re: [core] COMI: Basic Operations

Hi Hannes

Good timing.

•         The GET method

•         The PUT method

•         The FETCH method

•         The iPATCH method

•         The POST method

Regards,

Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Hannes Tschofenig
Sent: Tuesday, June 21, 2016 4:05 AM
To: [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: [core] COMI: Basic Operations

Hi COMI friends,

Ciao

Hannes

---

From: "Turner, Randy" <[email-masked]>
Date: Tue, 21 Jun 2016 18:18:00 +0000

Would it be better to not overload other methods when “DELETE” would be more explicit regarding what you’re trying to do ?

R.

From: Michel Veillette [mailto:[email-masked]]
Sent: Tuesday, June 21, 2016 2:16 PM
To: Turner, Randy; [email-masked] WG
Subject: RE: [core] COMI: Basic Operations

Hi Andy

Regards,
Michel

From: Turner, Randy [mailto:[email-masked]]
Sent: Tuesday, June 21, 2016 1:51 PM
To: Michel Veillette <[email-masked]<mailto:[email-masked]>>; [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: RE: [core] COMI: Basic Operations

R.

Hi Hannes

Good timing.

•         The GET method

•         The PUT method

•         The FETCH method

•         The iPATCH method

•         The POST method

Regards,

Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Hannes Tschofenig
Sent: Tuesday, June 21, 2016 4:05 AM
To: [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: [core] COMI: Basic Operations

Hi COMI friends,

Ciao

Hannes

---

From: Michel Veillette <[email-masked]>
Date: Tue, 21 Jun 2016 18:30:45 +0000

Hi Randy

DELETE perform an operation on a resources (URI).
The only resources defined in CoOL is datastores and event streams.
A DELETE on these resources will mean the deletion of an entire datastore or event stream, not a single data node.

It is possible to define resources for each data nodes, this is the approach proposed by CoMI.
However, for data nodes within a list, this approach means that we have define a binary to text conversion of the keys which can be of any YANG datatype.
See http://core-wg.github.io/yang-cbor/draft-ietf-core-yang-cbor-latest.html#rfc.section.5.13 for specific resource examples such as:
"/ietf-system:system/authentication/user[name='bob']/authorized-key[name='admin']/key-data"

It is also important to note that adding this binary to text conversion requirement significantly increase the complexity of the protocol.

Regards,
Michel

From: Turner, Randy [mailto:[email-masked]]
Sent: Tuesday, June 21, 2016 2:18 PM
To: Michel Veillette <[email-masked]>; [email-masked] WG <[email-masked]>
Subject: RE: [core] COMI: Basic Operations

R.

From: Michel Veillette [mailto:[email-masked]]
Sent: Tuesday, June 21, 2016 2:16 PM
To: Turner, Randy; [email-masked]<mailto:[email-masked]> WG
Subject: RE: [core] COMI: Basic Operations

Hi Andy

Regards,
Michel

R.

Hi Hannes

Good timing.

•         The GET method

•         The PUT method

•         The FETCH method

•         The iPATCH method

•         The POST method

Regards,

Michel

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Hannes Tschofenig
Sent: Tuesday, June 21, 2016 4:05 AM
To: [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: [core] COMI: Basic Operations

Hi COMI friends,

Ciao

Hannes

---

From: peter van der Stok <[email-masked]>
Date: Wed, 22 Jun 2016 12:07:40 +0200

Hi Hannes,

thanks for your interest.
Timothy Carey has re-written a much clearer appendix B that compares 
CoMI and LWM2M; attached here.
I hope you find that clarifying.

For the few examples I tried for myself, the YANG language seems to 
cover the the LWM2M model needs.
But, of course, my knowledge of LWM2M objects is very limited.

Peter

Jaime Jiménez schreef op 2016-06-21 15:32:
> Hi,
> 
> it is true that LWM2M switches the term of client and server. They
> probably should just call it “endpoint" and “manager" or something
> like that to avoid confusion. And then explain that and endpoint is a
> CoAP Client and Server, etc…
> 
> LWM2M simply defines a set of common interactions between an endpoint
> and its manager. All of those interactions7interfaces are just CoAP
> messages with a specific resource Object Model. In fact many of those
> operations are plain CoAP, for example Registration is basically using
> RD and the “/lwm2m” path, Information Reporting is basically CoAP
> Observe, Resource Operations are just CoAP REST methods with a CRUD
> format on top, GET becomes Retrieve, POST becomes Create, etc.
> 
> On the Object Model side, what I think would be relatively simple is
> to translate some of the LWM2M Objects (in XML) to YANG format (as
> Carsten suggested), I could do that if I get some help from someone
> with YANG expertise. Similarly, what COMI could/should had is good
> definitions on how to do the aforementioned management operations.
> 
> Ciao!
> - - Jaime Jimenez
> 
>> turning
>> is
>> makes
>>> last
>>> device

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 22 Jun 2016 12:50:10 +0200

I think that the question how COMI and LWM2M could converge in the long
run is very much a research question.  But I would encourage people to
think about possible ways of getting there, because eventually we will
have situations in which a combination of both YANG models and the
media-type based specifications from LWM2M will be useful.

Grüße, Carsten

---

From: Jaime Jiménez <[email-masked]>
Date: Wed, 22 Jun 2016 13:37:00 +0000

Hi Michel,

Great, I am a bit busy now but I can start looking at this a bit already.

We could, for example, take the first -very verbose- LWM2M Object:
http://technical.openmobilealliance.org/tech/profiles/LWM2M_Security-v1_0.xml

That object looks like this:
http://jaimejim.github.io/temp/lwm2m0.html

We could try to see how the YANG model would look like, how would Objects and Resources would map to YANG.

Ciao!
- - Jaime Jimenez

On 21 Jun 2016, at 20:21, Michel Veillette <[email-masked]<mailto:[email-masked]>> wrote:

Hi Jaime

Regards,

Michel Veillette

-----Original Message-----
From: core [mailto:[email-masked]] On Behalf Of Jaime Jiménez
Sent: Tuesday, June 21, 2016 9:32 AM
To: Carsten Bormann <[email-masked]<mailto:[email-masked]>>
Cc: [email-masked]<mailto:[email-masked]> WG <[email-masked]<mailto:[email-masked]>>
Subject: Re: [core] COMI: Basic Operations

Hi,

Ciao!
- - Jaime Jimenez

On 21 Jun 2016, at 13:37, Carsten Bormann <[email-masked]<mailto:[email-masked]>> wrote:

Grüße, Carsten

Hannes Tschofenig wrote:
Hi COMI friends,

Ciao
Hannes

_______________________________________________
core mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/core

_______________________________________________
core mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/core

_______________________________________________
core mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/core

---

From: Christian Groves <[email-masked]>
Date: Fri, 24 Jun 2016 11:41:13 +1000

Hello Jaime,

If the object is going to be used as an example there's an error for ID 
9.  The name "LWM2M Server SMS Number" has been split between the "Name" 
and "instances" column causing the other cells to shift right.

Regards, Christian

On 22/06/2016 11:37 PM, Jaime Jiménez wrote:
>> On 21 Jun 2016, at 20:21, Michel Veillette 
>> <[email-masked] 
>> <mailto:[email-masked]>> wrote:
>>
>> Hi Jaime
>>
>> To: Carsten Bormann <[email-masked] <mailto:[email-masked]>>
>> Cc: [email-masked] <mailto:[email-masked]> WG <[email-masked] 
>> <mailto:[email-masked]>>
>> and its manager. All of those interactions7interfaces are just 
>> CoAP messages with a specific resource Object Model. In fact many of 
>> those operations are plain CoAP, for example Registration is 
>> basically using RD and the “/lwm2m” path, Information Reporting is 
>> basically CoAP Observe, Resource Operations are just CoAP REST 
>> methods with a CRUD format on top, GET becomes Retrieve, POST becomes 
>> Create, etc.
>>
>> to translate some of the LWM2M Objects (in XML) to YANG format 
>> (as Carsten suggested), I could do that if I get some help from 
>> someone with YANG expertise. Similarly, what COMI could/should had is 
>> good definitions on how to do the aforementioned management operations.
>>
>> Ciao!
>> - - Jaime Jimenez
>>
>>>> [email-masked] <mailto:[email-masked]>
>>> [email-masked] <mailto:[email-masked]>
>> [email-masked] <mailto:[email-masked]>

---

From: Jaime Jiménez <[email-masked]>
Date: Fri, 24 Jun 2016 16:12:56 +0000

Oh, good catch! I just edited it. 

- - Jaime Jimenez

> On 24 Jun 2016, at 04:41, Christian Groves <[email-masked]> wrote:
> 
> Hello Jaime,
> 
> If the object is going to be used as an example there's an error for ID 9.  The name "LWM2M Server SMS Number" has been split between the "Name" and "instances" column causing the other cells to shift right.
> 
> Regards, Christian
> 
> 
>>> On 21 Jun 2016, at 20:21, Michel Veillette <[email-masked] <mailto:[email-masked]>> wrote:
>>> 
>>> Hi Jaime
>>> 
>>> Cc: [email-masked] <mailto:[email-masked]> WG <[email-masked] <mailto:[email-masked]>>
>>>> On 21 Jun 2016, at 13:37, Carsten Bormann <[email-masked] <mailto:[email-masked]>> wrote:
>>>>