Subject: [netmod] Issue in draft-ietf-netmod-smi-yang-05

From: Martin Bjorklund <[email-masked]>
Date: Mon, 14 May 2012 12:10:18 +0200 (CEST)

Hi,

I just realized that the draft is a bit a unclear on one issue.
It says:

   If an OCTET STRING type has an
   associated DISPLAY-HINT, then the corresponding YANG base type is the
   string type.

So e.g. 

  DateAndTime ::= TEXTUAL-CONVENTION
      DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
      ...
      SYNTAX       OCTET STRING (SIZE (8 | 11))

becomes:

  typedef DateAndTime {
    ...
    type string;
  }

(to make my point I didn't include the smiv2:display-hint stmt above).

The draft doesn't say what the YANG-formatted value will be.  Is an
implementation allowed to format this date+time any way it wants
(e.g. as a yang:date-and-time), or MUST it use the display hint?

The intention is that it MUST use the display-hint.

If possible (the document is in the RFC Ed. queue), I suggest we make
this clarification:

OLD:

   The mapping of the
   OCTET STRING depends on the context.  If an OCTET STRING type has an
   associated DISPLAY-HINT, then the corresponding YANG base type is the
   string type.  Otherwise, the binary type is used. 

NEW:

   The mapping of the
   OCTET STRING depends on the context.  If an OCTET STRING type has an
   associated DISPLAY-HINT, then the corresponding YANG base type is the
   string type.  An implementation MUST format an OCTET STRING value
   according to the DISPLAY-HINT, as described in RFC 2579.  If an
   OCTECT STRING type does not have an associated DISPLAY-HINT, the
   binary type is used.

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 14 May 2012 12:31:34 +0200

>    OCTECT STRING type does not have an associated DISPLAY-HINT, the

The proposed change captures the intention that indeed is not well
spelled out. Hence, from a technical point of view, I support this
clarification. If the document shepherd (David Kessens) and the AD
support doing this change during AUTH48, I am happy to implement this.
I guess they like to see broad support, especially from the
implementors. So please speak up.

/js

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

---

From: "Bert Wijnen (IETF)" <[email-masked]>
Date: Mon, 14 May 2012 13:05:55 +0200

The clarification makes sense to me.

Bert

---

From: David Reid <[email-masked]>
Date: Mon, 14 May 2012 09:25:58 -0400

I agree with the proposed clarification.

-David Reid

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