Subject: [netmod] smi2yang-04: string vs. binary

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 5 Apr 2011 12:01:41 +0200

* smi2yang-04: string vs. binary

  It would be nice to have a reliable mechanism to determine whether
  an OCTET STRING can be represented as a human readable string or is
  a binary string. The current ID suggests to use the presence of a
  DISPLAY-HINT for this purpose. However, the SMIv2 allows to add a
  DISPLAY-HINT when a MIB module is revised, which can lead to
  different translations of different versions of a MIB module.

** Solution #04-01

   Declare this a non-problem since additions of DISPLAY-HINTs are
   rare.

** Solution #04-02

   Translate strings into unions that allows both a human readable
   string representation and a binary representation. However, this
   requires to have some mechanism in place to decide whether a value
   is a human readable string or a binary string, which means we
   likely have to mess around with values.

** Solution #04-03

   Always translate OCTET STRING types into the YANG binary types. We
   could list some well-known types as exceptions, like DisplayString,
   SnmpAdminString, DateAndTime but such a list will always be
   incomplete and hence some human readable data will be encoded into
   base64.

/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: Martin Bjorklund <[email-masked]>
Date: Sat, 09 Apr 2011 13:15:00 +0200 (CEST)

Hi,

>    Declare this a non-problem since additions of DISPLAY-HINTs are

I prefer this solution.  We should clearly specify what effect this
legal SMIv2 change (and #02) have on YANG revisioning.

>    incomplete and hence some human readable data will be encoded into

/martin