Re: [netmod] I-D Action: draft-chopps-netmod-geo-location-00.txt

Martin Bjorklund <mbj@tail-f.com> Mon, 04 March 2019 22:23 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C0F6C13108B for <netmod@ietfa.amsl.com>; Mon, 4 Mar 2019 14:23:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BNiZgi7H8l4W for <netmod@ietfa.amsl.com>; Mon, 4 Mar 2019 14:23:46 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id DF67213108C for <netmod@ietf.org>; Mon, 4 Mar 2019 14:23:45 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id C631C1AE0443; Mon, 4 Mar 2019 23:23:42 +0100 (CET)
Date: Mon, 04 Mar 2019 23:23:42 +0100 (CET)
Message-Id: <20190304.232342.453679466518724925.mbj@tail-f.com>
To: chopps@chopps.org
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <sa67ede1jef.fsf@chopps.org>
References: <51C97F98-F877-49D4-9250-5213A31B442D@chopps.org> <20190304.105940.312797647046250578.mbj@tail-f.com> <sa67ede1jef.fsf@chopps.org>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JBYAOUs-0xmyIVWq3U0exQeVp8o>
Subject: Re: [netmod] I-D Action: draft-chopps-netmod-geo-location-00.txt
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Mar 2019 22:23:48 -0000

Christian Hopps <chopps@chopps.org> wrote:
> 
> Martin Bjorklund <mbj@tail-f.com> writes:
> 
> > Hi,
> >
> > Just some quick comments on the YANG:
> >
> > However, it seems libxml2's regexp engine requires both "[" and "^" to
> > be escaped:
> >
> >         '[-0-9a-z "#\[\]' +
> >         '!$%&()*+,./:;<=>?@\\\^_`{|}~]+';
> >
> > This expression isn't wrong, but it seems to me that these characters
> > should not have to be escaped.
> >
> > The pattern allows double quote (") but not single quote (').  Is
> > that intentional?
> 
> The intent was "ascii-printable". Would be nice if there was an easier
> way to specify this. :)

Hmm, one pattern includes space (but not tab etc), and another doesn't
include space.  Was that intentional?

You may be able to use Unicode properties and write something like:

      pattern '[\p{IsBasicLatin}-[\p{Lu}\p{Cc}\p{Z}]]+';

  Lu = uppercase letter
  Cc = ascii control
  Z  = whitespace

> > [a simple way to test the patterns is to have a "default" statement
> > and a YANG complier that verifies defaults]
> 
> Does pyang do this?

Yes.



/martin