Juergen Schoenwaelder <[email protected]> wrote: > On Thu, Apr 18, 2019 at 03:14:20PM +0200, Per Hedeland wrote: > > > Agreed - except the not entirely minor nit that the thing after the > > "/" is not a prefix but a *prefix-length*. Another way of putting it > > is that the IP address is a property of an interface, while the > > prefix-length or subnet mask is a property of the network that an > > interface is connected to. > > The property relevant for the network is the _prefix_, not the > prefix-length. The prefix-length 12 does not tell the system the > network prefix that is valid on the link, the prefix tells it. In > other words, you have a single value that gives you an address and a > prefix, hence ip-address-and-prefix. The question is whether we name > it according to the pieces that go into the combined value or whether > we name it according to the meaning of the combined value. What goes > in is "address + prefix length" and the meaning is "address + prefix". > > > From a data modelling perspective, having separate leafs for separate > > values should be the natural choice, and I don't think anyone is > > suggesting that the "bundled" type, if added, should be used in e.g. > > RFC 7277. A grouping could be nice, but it is still two separate > > leafs. > > > > This is no solution to Kristian's problem, which as far as I > > understand is about having a YANG model for existing devices that > > already *use* the "bundled" type, i.e. it "needs" to be a single leaf > > in the YANG module. > > > > Whether this need is enough motivation to actually add these types to > > ietf-inet-types I don't really know. There is no real cost in doing it > > per se, but it could have the negative consequence that it is taken as > > an encouragement/"blessing" to use these types when writing new > > modules that *don't* "need" to use them. Bad from a data modelling > > perspectve, and bad for the operational reasons that Martin gave an > > example of while I was writing this. But maybe the 'description' > > statement could warn against this. > > Some bundled types are widely used and practically useful. See the uri > type, which is a big complicated combination of many different pieces.
A uri represents a single entity; a resource. From RFC 3986: A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. > Yes, filtering for a port number in a uri is likely not easy. Right, but the port is just one part of the uri syntax for a resource (for some schemes). The uri type doesn't represent multiple "things" (scheme, host, port, etc). If you use a URI to model a port you have likely a bad model. Whereas for the proposed ip-address-and-prefix, it is clear that you're suppose to use it when you need to model an ip-address and an ip-prefix. /martin > These > are tradeoffs. The notion that "bundles types" are generally bad is I > think not true. I am not saying we should make it an art to create > "bundled types", I am just challenging the idea that they are > generally bad. > > /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 > [email protected] > https://www.ietf.org/mailman/listinfo/netmod > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
