BUG-3051 IpAdderess != IpPrefix 04/20704/4
authorAnton Ivanov <aivanov@brocade.com>
Tue, 19 May 2015 08:43:37 +0000 (08:43 +0000)
committerAnil Vishnoi <vishnoianil@gmail.com>
Fri, 22 May 2015 20:52:09 +0000 (20:52 +0000)
commitded34ba9d344434c3f01de76b64723284e212d43
tree98d29d24bc54092b3ac03592c43212bc8670dfc6
parent0a8ff1abfd66739bc3c8ad3322cf5466eff40627
BUG-3051 IpAdderess != IpPrefix

1. Unify some (not all) utility classes. There were up to 3 classes serving the same function in different
plugin parts
2. Provide utility classes for prefix creation in a single place (if yangtools grow up to provide binary/accel
interfaces this will allow to leverage them quickly).
3. Fix testcases

TODO:

1. Additional test coverage. Most v6 testcases were broken across the board. This does a "quick fix" on them, additional
test coverage is neded
2. Further cleanup and unification. There are still utility classes lurking around which do dupplicate functions as well
as inline
3. Cleanup and improve interfaces

NOT ADDRESSED:

1. This does not address the can of worms created by trying to use buggy and incorrect representations (because of 2825)
in the new Lithium Hashing code. It only provides some of the means to make it work correctly
2. In the absense of 2825 and with a buggy and broken (relative to the RFC it should comply to model/core) the plugin
should have a "ignore/warn/refuse" toggle northbound with regards to non-canonical IpAddresses and Prefixes passed by
other applications. Once again - this should be taken care of the controller core, but as that is not taking care of it
the plugin will have to - otherwise there will be hash mismatches and mismatches in opstate/confstate.

Signed-off-by: Anton Ivanov <aivanov@brocade.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/IpConversionUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/FlowRemovedTranslator.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV10Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertorV13Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/IpConversionUtilTest.java [new file with mode: 0644]
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorImpl2Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorImplV13Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorUtilTest.java