On Thu, Jul 30, 2020 at 02:58:22PM +0200, Benoit Claise wrote:
> On 20/07/2020 11:19, Ladislav Lhotka wrote:
> > Juergen Schoenwaelder <j.schoenwael...@jacobs-university.de> writes:
> > 
> > >    - Percentages are frequently used in YANG models but usages differ a
> > >      lot in precision and range. It is not clear what the proper
> > >      generic definition of a percentage type would be and whether it is
> > >      worth having it.
> > > 
> > >      RFC 7950 example:
> > > 
> > >           typedef percent { type uint8 { range "0 .. 100"; } }
> > > 
> > >      RFC 8294:
> > > 
> > >           typedef percentage { type uint8 { range "0..100"; } }
> > > 
> > >      I-Ds:
> > >           typedef percentage { type decimal64 { fraction-digits 5; } }
> > >           typedef percentile { type decimal64 { fraction-digits 2; } }
> > > 
> > >      The yang catalogue seems to be down. :-(
> > > 
> > >    - Proposal: do not add a percentage type since it is trivial to
> > >      define a context specific percentage type that matches range and
> > >      precision requirements (and there is already a definition in RFC
> > >      8294 for those who need exactly that definition).
> > I agree with this proposal. It is also possible to use
> > 
> >     units percent;
> > 
> > where necessary.
> On the other hand, when I look at the numerous percent/percentage
> occurrences in YANG model, it doesn't hurt to define that typedef.
> 
> https://yangcatalog.org/yang-search/ => search on "node name" and typedef
> only
> We can find 56 entries from IETF, IEEE, BBF, OC, MEF, vendors
> Most of them points to:
> 
>    *typedef*  percent {
>       *type*  uint8 {
>               *range*  "0 .. 100";
> 
>       }
>    }
>

But that one is already defined in RFC 8294 in ietf-routing-types.
Does it make sense to define it again in yang-types?

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to