On Thu, Apr 19, 2018 at 9:54 AM, Robert Varga <[email protected]> wrote: > On 19/04/18 17:58, Anil Vishnoi wrote: > > > > ... it is matter of what is the correct model. Given that OpenFlow > has > > no notion of a zone, I believe ipv4-address-no-zone is the correct > type > > representing OFPXMT_OFB_IPV4_*. > > > > Please do not see it from specific project perspective, neither a code > > generator should care what is really used and what is not. They go by > > what is defined in yang model and generate clean interfaces. > > Yes and I am talking very specifically about how OFP models (which *are* > openflow-centric) are using ipv4-address, where I believe they should > use ipv4-address-no-zone. > Yes agree, but technically existing use of ipv4-address is also not wrong. So if that's the case, it should not fail.
> > > To illustrate, can you explain what > > happens when a user specifies two matches, which differ only in zone, > > for example "1.2.3.4%a" and "1.2.3.4%b"? > > > > OpenFlow plugin should fail, if it's not supporting zone, but user > > can always write an application who uses zone. I think it's none of > > mdsal concern on how consumer is using these data type, neither mdsal > > should be influence by the context of consumption model when it comes to > > implementing defined data types. > > Except OFP does not fail, it strips the zone and proceeds merrily, for > example here: > https://github.com/opendaylight/openflowplugin/blob/a862a004 > 11d1eadd7db500711723f9bc273580db/openflowplugin/src/main/ > java/org/opendaylight/openflowplugin/openflow/md/core/sal/ > convertor/common/IpConversionUtil.java#L253 > . Wouldn't it be better to explicitly express the fact that OpenFlow > protocol simply has no notion of a zone? > Yes it would be better, and this is not my question here. For example assume openflow support zone and they want to use ipv4-address derive type (which they are using) so ideally it should not fail just because mdsal now support no-zone? That's most probably because the way MDSAL generating code (probably rightly! as per it's current design). > > And no, MD-SAL is not taking sides, I am not sure where you inferred > that from. > That's because you are talking more about openflow should use no-zone, because that's the right way to do for openflow, which i agree with. But my question here is about the derive types, if ipv4-address-no-zone and ipv4-address are two derive types and user are free to use any of these derive type. Currently openflowplugin is using ipv4-address, so why they have to change their yang model to use no-zone. https://git.opendaylight.org/gerrit/#/c/71083/3/extension/ openflowjava-extension-nicira/src/main/yang/nicira-action.yang [#]https://git.opendaylight.org/gerrit/#/c/71083/ > > Regards, > Robert > > -- Thanks Anil
_______________________________________________ openflowplugin-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev
