Re: Blog: YANG Really Takes Off in the Industry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
From: "Brian E Carpenter" <brian.e.carpenter@xxxxxxxxx>
To: "Ted Lemon" <Ted.Lemon@xxxxxxxxxxx>
Cc: "t.p." <daedulus@xxxxxxxxxxxxx>; "IETF-Discussion list"
<ietf@xxxxxxxx>
Sent: Tuesday, December 09, 2014 7:39 PM
> On 10/12/2014 03:54, Ted Lemon wrote:
> > On Dec 9, 2014, at 9:31 AM, t.p. <daedulus@xxxxxxxxxxxxx> wrote:
> >> The expression that controls the permissible format of IPv6
addresses in
> >> yang-types is of this ilk.
> >> "       type string {
> >>         pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
> >>               + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
> >>               + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
> >>               + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
> >>               + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
> >>         pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
> >>               + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
> >>               + '(/.+)'; "
> >> which was got wrong several times before it became what it is now
(which
> >> rings alarm bells for me).
> >
> > Wow, so there's no way to do this ABNF-style?
>
> In fairness, it took numerous attempts to get the ABNF for the text
> representation of IPv6 addresses right, with RFC 6874 being the latest
> twist (which, if I am not mistaken, is not covered by the above
> gobbledygook; at least, I don't see anything in there that seems
> equivalent to '"%25" ZoneID', but maybe I missed it).

Brian

The question of zone index did come up and it appears in RFC6991 which
has the

" ipv6-address type represents an IPv6 address in full, mixed,
shortened, and shortened-mixed notation.  The IPv6 address may include a
zone index, separated by a % sign."

as well as

"ipv6-address-no-zone ...
An IPv6 address without a zone index "

but whether we should be using a language to achieve such precise
control in the general case I am less sure of.

Tom Petch
>
>     Brian
>





[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]