Subject: [lp-wan] I-D Action: draft-ietf-lpwan-schc-yang-data-model-01.txt

From: [email-masked]
Date: Thu, 23 Jan 2020 02:47:59 -0800

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the IPv6 over Low Power Wide-Area Networks WG of the IETF.

        Title           : Data Model for Static Context Header Compression (SCHC)
        Authors         : Ana Minaburo
                          Laurent Toutain
	Filename        : draft-ietf-lpwan-schc-yang-data-model-01.txt
	Pages           : 18
	Date            : 2020-01-23

Abstract:
   This document describes a YANG data model for the SCHC (Static
   Context Header Compression) compression and fragmentation rules.

The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-lpwan-schc-yang-data-model/

There are also htmlized versions available at:
https://tools.ietf.org/html/draft-ietf-lpwan-schc-yang-data-model-01
https://datatracker.ietf.org/doc/html/draft-ietf-lpwan-schc-yang-data-model-01

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-lpwan-schc-yang-data-model-01

Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

---

From: Laurent Toutain <[email-masked]>
Date: Thu, 23 Jan 2020 11:57:43 +0100

Hi,

We just submitted a new version of the YANG data model. It includes the TV
definition as we discussed yesterday in the interim meeting.
It uses union to allow a binary and string type for the value.

grouping target-values-struct {
leaf value {
type union {
type binary;
type string;
}
}
leaf position {
type uint16;
}
}

The leaf value is not mandatory for instance it can be used to represent a
non-existing value in the CoAP draft. For instance, if we
want to compress the second element of a URI path /foo1/bar1 /foo2/bar2
/foo3

we can have a rule such as

URI-path ["bar1", "bar2", None] match-mapping mapping-sent

we will have in the YANG data
position 1 with string bar1
position 2 with string bar2
position 2 with no value.

Is it possible to do such things in YANG ?

Laurent

On Thu, Jan 23, 2020 at 11:49 AM <[email-masked]> wrote:

> _______________________________________________
> lp-wan mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/lp-wan
>

---

From: Ivaylo Petrov <[email-masked]>
Date: Thu, 23 Jan 2020 13:54:45 +0100

Hello, Laurent,

If I understand your question correctly, you ask if it is possible for a
leaf not to have a value. It is very possible, it simply should not be
marked as required. Note that there might be a difference between field
that has no value and a field that has zero value (null, 0, empty string,
etc - depending on the field type). That difference might concern you or
not.

I hope that helps!

Cheers,
Ivaylo

CONFIDENTIALITY NOTICE: This email may contain confidential and privileged
material for the sole use of the intended recipient(s).

It is strictly forbidden to share any part of this message with any third
party, without the written consent of the sender.

If you have received this message by mistake, please notify the sender
immediately by email and delete the message and any file attached to it.
Thank you!