Subject: Re: [yang-doctors] [Rtg-dt-yang-arch] Open Config on ietf-routing-types

From: Jeff Tantsura <[email-masked]>
Date: Fri, 03 Mar 2017 13:08:36 -0800

Hi,

Yesterday I have had meeting with OC folks.
The agreement is that there’s going to be a RTGWG presentation in Chicago where an OC representative will describe their experiences with implementations and toolsets,
what is working, what is not so, analysis on what could be done differently, to address the pain points in current implementations.
The focus would be mostly routing area, there would be separate discussion in netmod, more focused on wider issues, decoupling of YANG from Netconf and similar.
Timeframe is not committed yet, might be after Chicago.

Please provide your comments. 

Thanks everyone for your valuable comments and looking forward to working together. 

Have a great weekend,
Jeff

On 2/27/17, 11:24, "Juergen Schoenwaelder" <[email-masked]> wrote:

    On Mon, Feb 27, 2017 at 02:19:53PM -0500, Alia Atlas wrote:
    > 
    > First, I am responding with an AD hat - not as individual
    > contributor.
    > 
    
    Thanks Alia for helping us to get a better understanding of the
    problem space and the solution space. I am looking forward to Jeffs
    and Robs input.
    
    /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: Lou Berger <[email-masked]>
Date: Fri, 3 Mar 2017 16:43:12 -0500

Jeff,

    This will be included in Wednesday's RTGWG meeting?  I'm not sure
why here vs netmod as should be of interest to all in netmod and just
many in rtgwg ;-)  -- but the most important thing is to have the
discussion.

Thanks,
Lou

On 3/3/2017 4:08 PM, Jeff Tantsura wrote:
> _______________________________________________
> Rtg-dt-yang-arch mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/rtg-dt-yang-arch

---

From: Jeff Tantsura <[email-masked]>
Date: Fri, 03 Mar 2017 14:26:45 -0800

Lou,

yes, I’d assume so, subject to overall planning.
yes, the open dialog is the most important part.

Cheers,
Jeff

On 3/3/17, 13:43, "Lou Berger" <[email-masked]> wrote:

    Jeff,

    Thanks,
    Lou

---

From: Benoit Claise <[email-masked]>
Date: Thu, 9 Mar 2017 17:30:48 +0100

Dear all,

[sorry for the delay due to PTO]

It's a fact that there are two sets of YANG modules in the industry 
right now: IETF and openconfig one, with openconfig implementations on 
routers.
It's another fact that the openconfig models import less and less IETF 
models these days.
This is already a problem for an industry that should consolidate its 
set of YANG models, as opposed to spending his time on mapping YANG 
models. That makes me sad, but that's the way it is. So be it.

What would be a bigger problem is a fork of the YANG language, i.e. 
using the "pattern" statement, but with POSIX syntax.
And specifying YANG+1 with POSIX regex implies redefining all the 
existing typedef (such as RFC 6991), and has implications for all 
derived models, including some native models. This is a non starter IMO.

We could pretend that this issue is just a routing issue with a couple 
of routing typedef', but the issue is bigger.

We should avoid this YANG language fork at all costs, so let's go back 
to the root causes (quoting Rob):

    Note, my mail didn't ask for anything to be changed. It just noted that
    there are implementation complexities of having an XSD regexp dialect
    that is not widely supported in non-XML libraries. This is an
    implementation barrier for servers that want to use YANG to model their
    schema.

    ...

    But there are other problems too - what common tooling is available for
    non-developers that are writing models? For example, there are many,
    many different sites that will give you a way to validate that a regexp
    matches some test content that you're interested in (e.g.,
    http://regexr.com/, https://regex101.com/).
    I have found none of these that support XSD regexps. The key point is
    that picking a road less travelled comes with costs around the
    ecosystem.

I prefer to focus on those arguments (if this is just a question of 
preference, there is basically no possible discussion).
So who knows about such libraries and tools?

Martin Bjorklund proposed to put the regexp part of libxml2 to github. 
That would be a step in the right direction.
Speaking to Martin a moment ago, he mentioned a shell script for regex 
validation, which he could also put to github. We would need a GUI 
around this (a-la http://regexr.com/). That sounds like a nice project 
for the hackathon. I'm looking for a taker...

Is this a viable way out of this?
If yes, the unicode issue would not have to be debated.

Regards, Benoit

---

From: Jeff Tantsura <[email-masked]>
Date: Thu, 09 Mar 2017 18:04:01 -0800

Hi,

My proposal is to wait for Rob’s presentation and then work on addressing complete problem space rather than trying to solve separate pieces now.
I’d also look for a sustainable solution.

Thanks!
 
Cheers,
Jeff

On 3/9/17, 15:58, "Juergen Schoenwaelder" <[email-masked]> wrote:

    > So who knows about such libraries and tools?
    
    When I did the common YANG types, I wrote test cases for the patterns
    in Python using libxml as the pattern engine. This is really handy and
    great for testing. The core of it is this:
    
      import libxml2
      pattern = '[a-z]'
      text = 'hiho'
      libxml2.regexpCompile(pattern).regexpExec(text)
    
    Simply write code around this to provide a list of examples you expect
    to pass and a list of examples you expect not to pass and check the
    return code provided by regexpExec(). Back then, I also wrote a very
    tiny C program that links against libxml2 and behaves like grep except
    that it uses libxml2's XSD pattern. I think Martin will post it
    together with his XSD pattern matching code stripped out of libxml2
    (in case libxml2 is considered too heavy).
    
    I also looked into the yanglint / libyang code and they (Radek?)
    internally rewrite the pattern into pcre regular expressions. I can't
    tell whether this is always correct but if it is one could also
    produce an xsd regular expression matcher based on the pcre regular
    expression library.
    
    > Martin Bjorklund proposed to put the regexp part of libxml2 to github. That
    > would be a step in the right direction.
    > validation, which he could also put to github. We would need a GUI around
    > this (a-la http://regexr.com/). That sounds like a nice project for the
    > hackathon. I'm looking for a taker...
    
    For testing of pattern restriction, a few lines of Python code worked
    very well for me. If someone has spare time to write a web frontend
    around the 4 lines of Python, great.
    
    /js

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 10 Mar 2017 00:58:57 +0100

import libxml2
  pattern = '[a-z]'
  text = 'hiho'

/js