Robert Varga [Tue, 5 Jan 2021 08:44:58 +0000 (09:44 +0100)]
Cleanup liblldp
Remove use of Class.newInstance() in favor of Supplier<Packet>,
which takes reflection out of the picture.
Also cleanup various other warnings, improving efficiency in the
process.
Change-Id: Iaed142fd2ab4ce0fa4a765d8b3f4006fd8076b1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 00:40:14 +0000 (01:40 +0100)]
Cleanup ofp nicira extension
Fix warnings coming from uint type widening and clean up builder
usage.
Also optimize MatchUtil.ipv4ToLong() by using IetfInetUtil, since
which is the most efficient way of during that conversion. This
leads to a cleanup of MatchUtil, which is taught to operate on Uint32
instead.
Change-Id: I6219f47d4dc06b046b1fce5c7acd699edd96d3ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 5 Jan 2021 08:32:28 +0000 (08:32 +0000)]
Merge "Cleanup MeterMessageSerializer"
Robert Varga [Mon, 4 Jan 2021 10:39:59 +0000 (11:39 +0100)]
Fix warnings in test-provider
Fix deprecation warnings by converting to use uint types/BindingMap
and apply @Deprecated as appropriate. There will be more rounds to
deal with the rest of the warnings.
Change-Id: Id144002ad80503fa3eeb3c0fbb73fe5490aea9e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 10:12:15 +0000 (11:12 +0100)]
Cleanup MeterStatsResponseConvertor
Remove use of deprecated methods and cleanup builder use.
Change-Id: Ie9e6d9cadc0728c0d16886debe65be76e123a6d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 10:03:51 +0000 (11:03 +0100)]
Cleanup PacketOutConvertor
Update structure to follow best practices.
Change-Id: I957525431927593532e9b79b2d532135beb5fd4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 10:35:15 +0000 (11:35 +0100)]
Enforce modernizer in openflowjava-extension-nicira
We have just a few violations, fix them and flip enforcement on.
Change-Id: I3ee63fa565b6b5c8bfa0a63d2596947806433d7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 10:25:22 +0000 (11:25 +0100)]
Enforce modernizer in openflowplugin-extension-onf
Fix the two violations we have and switch enforcement on.
Change-Id: I7b81271e6f4486072fa26fd62ad975c98b6e59ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 09:57:21 +0000 (10:57 +0100)]
Enforce modernizer in openflowplugin
Fix the two remaining issue and flip enforcement on.
Change-Id: I0b542fdb08bc61214d72fc5b87da295d1e2f9eb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 02:12:51 +0000 (03:12 +0100)]
Partial cleanup of convertors
Migrate away from unit/lists and refactor the code for clarity and
speed.
Change-Id: I142b49de0908fef3c014a516058e9ffe13c998e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 09:52:30 +0000 (10:52 +0100)]
Do not use sal-common-util
This simple helper has been deprecated, stop using it.
Change-Id: I30a1b2999751fddf12735d673791426a0779d620
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 00:13:10 +0000 (01:13 +0100)]
Finish OFJ nicira migration
Fixup final two places where we go through BigInteger.
Change-Id: I18ea8783071033a7f369e24cb5e2e90601dfc46a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 23:41:28 +0000 (00:41 +0100)]
Clean up OVJ nicira action codecs
Migrate to use unit types and cleanup builder usage.
Change-Id: Iaed5405bad9f287e8822362554e799e54e35fa90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 23:27:47 +0000 (00:27 +0100)]
Clean up OVJ nicira match codecs
Migrate to use unit types and cleanup builder usage.
Change-Id: Id9e8199d7c1fcccfa653bd1ad4c3b740fd9566f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 23:04:54 +0000 (00:04 +0100)]
Cleanup ConntrackCodec
Use fluent builders where possible, making things less verbose.
Change-Id: Iba942161badab8484e5188ed041ca50e78424ca6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 22:56:34 +0000 (23:56 +0100)]
Speed up ConntrackCodec's ipv4 handling
Add readIpv4Address(), which uses IetfInetUtil to efficiently
read an Ipv4Address from a ByteBuf. Also move the write path,
which already uses IetfInetUtil.
Change-Id: Ic5a64f06cf4349bfbb2f6a9347a05a81afb33a10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 22:48:36 +0000 (23:48 +0100)]
Fix ConntrackCodec warnings
Propagate Uint16 as appropriate, so that we do not get deprecation
warnings. Also perform some house cleaning.
Change-Id: I6e9b201a774dcffddd3170fc89a00e7b475b430a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 22:36:23 +0000 (23:36 +0100)]
Cleanup LearnCodec
This is just some minor house keeping.
Change-Id: I35a176b847885cb7f96ea52ef0f06fe9ada48bea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 22:07:50 +0000 (23:07 +0100)]
Do not check src/dst twice
We have two if-else branches which cover two distinct states. Move
the logic into its utility method, which makes sit obvious what is
going on.
Change-Id: I699eeffb637cc78583923d871cc94e55b09bbd35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 22:02:13 +0000 (23:02 +0100)]
Use Uint16 for numBits
Migrate legacy setter use by embracing Uint16 as a validated
holder.
Change-Id: I3de4cf98b223fad732efa676edddea5b4468af06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 21:54:48 +0000 (22:54 +0100)]
Use readUint16(ByteBuf)
We have open-coded ByteBuf.readUnsignedShort(), ditch that in favor
of readUint16().
Change-Id: I0fcaa221c9a84323b39dae0a69cf712b98740c7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 21:32:45 +0000 (22:32 +0100)]
Fix LearnCodecUtil scalability
LearnCodecUtil.buildFlowModSpecs() is statically synchronized to
keep track of overflows. Encapsulate that state in an object,
disarming this particular landmine.
Change-Id: Iae68992ca72e71d2c11e6ef48b88c0227b087ae9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 20:39:56 +0000 (21:39 +0100)]
Cleanup LearnCodecUtil
Perform all-round verbosity cleanup. This makes it clear we have
a before-and-after stage.
Change-Id: I6e92826bf3a48fd66d58d632cdea39012cc0674b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 19:37:10 +0000 (20:37 +0100)]
Refactor MatchExtensionHelper
This is a rather simple utility class. Since we are cleaning up
deprecation warnings, we might as well completely refactor it.
This results in much more expressive code as well as performance
wins, as we propagate invariants as early as possible -- untangling
the Optional.ofNullable().map().orElse(new ...) mess.
Change-Id: Ia92d36626c6c449558a3cd91f4f52b708b0d9645
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 17:41:53 +0000 (18:41 +0100)]
Fix warnings in forwardingrules-sync
Perform a straight migration to BindingMap.orderedBuilder(), fixing
deprecation warnings and fixing some copy&paste sizing issues.
Change-Id: I6b5c7a2d5a5267358b223015f59c12089844db88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 17:26:30 +0000 (18:26 +0100)]
Fix warnings in notification-supplier
There are a few places using deprecated constructs, update them.
Change-Id: Iee4ddb62f37f2d548bb3b2b2b6f2e88e92dd738e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 17:15:21 +0000 (18:15 +0100)]
Cleanup table-miss-enforcer
We have a few warnings here, fix them up.
Change-Id: I71c435925bf1c5419eefc0691691e9bc7f112446
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 17:07:00 +0000 (18:07 +0100)]
Fix warnings in topology-manager
Use BindingMap.ordered() to perform minimal migration of tests,
also fixing obvious warnings reported by Eclipse.
Change-Id: Id8c804d6fa02da269c079993a8f4d9609e350ac3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 17:01:06 +0000 (18:01 +0100)]
Cleanup sample-consumer
We have a few warnings, fix them up by refactoring to current
best practices.
Change-Id: I85acd2d7494b861f7d313af92b896f4d40bbb032
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 16:54:02 +0000 (17:54 +0100)]
Cleanup SampleFlowCapableNodeListener
We have a few deprecation warnings here, refactor to remove them
and follow fluent builder best practices.
Change-Id: I7a2d2a2bcc9246ae90a3499eacaba5a1e36a62d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 15:25:26 +0000 (16:25 +0100)]
Remove unneded check
Sonar is pointing out we are using boolean literals, which is not
needed as the check already is a boolean.
Change-Id: Ieeebe144a91d08dd55a6f7971baa03086e6ce13d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 15:21:25 +0000 (16:21 +0100)]
Fix code smell in HandshakeManagerImpl
Sonar is pointing out thrown Exception which just does not happen,
fix that.
Change-Id: I75c92f9c814d23545b22954f02747b6f211bb01b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 11:40:29 +0000 (12:40 +0100)]
Cleanup MeterMessageSerializer
Get rid of nullable logic, so that we have more direct and clean
logic. Also pre-encode the default flags, so we pick it up for zero
cost.
Change-Id: Ic6d773a9c2b11e0d848087f52279d044908eb247
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 15:13:58 +0000 (16:13 +0100)]
Speed up DeviceGroupRegistry.isGroupPresent()
Sonar is complaining about an explicit 'false' here, fix that warning
by storing the result and having a proper expression. This ends up
being faster, as we perform only a single lookup.
Change-Id: I9c96a3c01be5e01fbb215bc0d86c78f06185fe30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 14:00:25 +0000 (15:00 +0100)]
Remove use of Optional from DeviceInitializationUtil
The use here is completely unneeded -- we can serve the same thing
with checks for null.
Change-Id: Ic5958cd97f91676a2ab6b34c9f049a7f73eaa1d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 13:52:08 +0000 (14:52 +0100)]
Reduce use of Optional in ContextChainHolderImpl
Optional.ofNullable().ifPresent() can easily be replaced with
a null check, making code clearer. We also end up rewrapping
ownership state -- just drop to using nullable, as that makes
the corresponding check easier.
Change-Id: I74efb538cdf3cf66350a8bcb23d0207070864dc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 13:39:57 +0000 (14:39 +0100)]
Cleanup MultipartReplyTranslatorUtil
Rather than using Optional.flatMap(), which seems to be an all-time
favorite switch to using null checks and explicit returns. While we
are here, also make sure we use Builders' fluent capacity.
Change-Id: Ib27cbc4e290620ddb53139349079f0349f84e0ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 10:41:41 +0000 (11:41 +0100)]
Cleanup MatchUtil
Switch MatchUtil.resolveExtensions() to return a map, removing
a source of needless copying.
Change-Id: I3343be5cb848774d7047ad27c2ec96a24e343aa8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 10:16:44 +0000 (11:16 +0100)]
Cleanup AbstractActionInstructionSerializer
Do not use Optional.ofNullable() for null checks, leading to cleaner
and meaner code.
Change-Id: I302bccbadbaeb6633c8f12afdea6ffe3a751826c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 10:36:26 +0000 (11:36 +0100)]
Cleanup ConfigurationServiceFactoryOsgiImpl
Do not use Optional.ofNullable() for null checks and also properly
unget service after use.
Change-Id: I0360904dcec7ee25d6702a943f2d6782540a79c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 10:25:06 +0000 (11:25 +0100)]
Cleanup TableFeaturesMatchFieldDeserializer
Remove overzealous use of optionals to make the logic cleaner
and more performant.
Change-Id: I8305b49877e309971222954f8a0a5e8cce9b8f59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 09:53:58 +0000 (10:53 +0100)]
Cleanup MatchSerializer
Remove use of Optional.ofNullable() as a null guard, improving
overall performance and readability.
Change-Id: I028537276720697b7109c92096719a55df53e6a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 09:58:19 +0000 (10:58 +0100)]
Cleanup ExtensionSessionManagerImpl
Use a properly-constant singleton and remove unused logger.
Change-Id: I0ed7bc521aaa121a13f07ad8f72b37e00d2b522a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 09:49:05 +0000 (10:49 +0100)]
Cleanup MultipartRequestExperimenterSerializer
Split fallback serialization into its own method and remove use
of Optional.ofNullable().ifPresent() in favor of null checks.
Change-Id: Ic4581efbc383de4b2c6028c6be654280fae0605d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 09:51:01 +0000 (09:51 +0000)]
Merge changes Ia53720b0,I9f54d265
* changes:
Cleanup GroupMessageSerializer
Cleanup MultipartRequestTableFeaturesSerializer
Robert Varga [Sun, 3 Jan 2021 08:30:46 +0000 (09:30 +0100)]
Cleanup GroupMessageSerializer
Do not use Optional for logic decisions, making translation clearer
and more performant.
Change-Id: Ia53720b0b18753e77de5f74614bb5a7ea775fd42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 08:19:27 +0000 (09:19 +0100)]
Cleanup MultipartRequestTableFeaturesSerializer
Remove use of Optional for logic decisions. Also do not convert
string to bytes twice.
Change-Id: I9f54d2653fbbb86525c6dfd1cbbaf76d187d573e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Jan 2018 18:28:30 +0000 (19:28 +0100)]
Clean up ListeningExecutorService usage
It turns out we do not really need ListeningExecutorService at all,
but can live with a normal ExecutorService. Furthermore most contexts
where we used ExecutorService can completely get by through a simple
Executor, which makes lifecycle more predictable.
Change-Id: Ic1b2a3d49433557d0c5934445a79e06391d24fe8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 10:49:07 +0000 (11:49 +0100)]
Cleanup FlowMessageSerializer
Further reduce use of Optional.ofNullable().map() crud and also
reduce Guava use as per modernizer warnings.
Change-Id: Ic060c95941b9ac0f1b40b1350dce50c004e0fd0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 00:11:40 +0000 (01:11 +0100)]
Optimize SetAsyncInputMessageFactory
This class is very similar to GetAsyncReplyMessageFactory, apply
same optimizations.
Change-Id: Iaeacd426fb99aaf1ce527d53bcb935aaf0551fcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 23:45:05 +0000 (00:45 +0100)]
Optimize AsyncConfigMessageSerializer
Do not use optionals to dispatch on nullable properties. Also do not
create a Map for bitmap conversion.
Change-Id: I4205d127c2e78e67671d8a599b065f9afe7c6f2a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 16:49:14 +0000 (17:49 +0100)]
Migrate a few convertors
Be a bit smarter about dealing with units, fixing related warnings.
JIRA: OPNFLWPLUG-1099
Change-Id: I9ab33dc6634f37bb38735d948741424c9c2fa07f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 20:04:25 +0000 (21:04 +0100)]
Optimize GetAsyncReplyMessageFactory bitmasks
Do not instantiate a HashMap just to store offsets we have readily
available. Use direct bitmask construction instead, speedings things
up quite a bit.
Since we are doing the same thing for three difference enumerations,
introduce a common methods to do the heavy lifting.
Change-Id: I2999b00df64f596f3d025d9e83c5e3dcca376d90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 12:12:17 +0000 (13:12 +0100)]
Remove a reference to org.mockito.Matchers
These methods are deprecated, migrate to ArgumentMatchers. Also
remove a few unused constants.
Change-Id: Ida46bc436184374a851a5a4eee7ad034e80b02bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 12:29:44 +0000 (13:29 +0100)]
Migrate .setXid() callers
Use ByteBufUtils to readUint32() instead. While we are at it, apply
the same pattern to other methods as well.
JIRA: OPNFLWPLG-1099
Change-Id: Ifcd4beab39ed00e93db3b4b062a56a0d8bad6b35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 12:21:54 +0000 (13:21 +0100)]
Migrate EncodeConstants.OF13_VERSION_ID users
This is a search-and-replace for the correct constant.
JIRA: OPNFLWPLUG-1099
Change-Id: Ia912773d9fb299922fd1a68158e4f275b16682be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 12:19:33 +0000 (13:19 +0100)]
Fix ServiceException
We do not have an UUID here, fix that. Since this has been out there
for some time, start with a generated UUID.
Change-Id: I9322717e5cd1f845275aa56cb756139a7304d3fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 10:25:13 +0000 (11:25 +0100)]
Cleanup FlowMessageSerializer.isSetVlanIdActionCasePresent()
Rather than bouncing through Optional.ofNullable(), use an explicit
null check to significantly simplify this method.
Change-Id: I59237a4ccef3c407c033d3e1588b7958840d9c06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 10:18:00 +0000 (11:18 +0100)]
Cleanup FlowMessageSerializer.isVlanMatchPresent()
Rather than doing silly ofNullable()/flatMap() things, just perform
two non-null checks -- making things much simpler to see.
Change-Id: I7be0f55e58427e29b9310c55989faf126b3bb7cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 10:07:59 +0000 (11:07 +0100)]
Migrate OpenflowPluginBulkTransactionProvider
Use BindingMap to eliminate deprecation warnings and also clean up
builder use.
Change-Id: I3dc94c38c48eaeff9727da5048fe907acf522846
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 1 Jan 2021 21:51:20 +0000 (22:51 +0100)]
Final round of isFoo() migration
Finish up remaining components, so that we do not use isFoo()
anywhere.
Change-Id: I4da07dd94b689176ecc07ffb64ecfc36890e73b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 1 Jan 2021 21:58:00 +0000 (22:58 +0100)]
Optimize LLDPUtil.colonize()
We are performing a regex-based replacement here, pre-compile the
Pattern so we get faster replacements.
Change-Id: Ib1b09e3fbb5975ad18dd6f41e45022661bb1e220
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 1 Jan 2021 13:29:20 +0000 (14:29 +0100)]
Further warning removal
Migrate further call sites of isFoo(), as well as various other
deprecated constructs.
Change-Id: If840e14f523eaafc596ef1a6ccd5354e19cb826f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 1 Jan 2021 14:53:45 +0000 (15:53 +0100)]
Un-deprecate OpenflowVersion
Our API vs. annotations do not agree on deprecation here. Let's
drop the JavaDoc and replace it with a FIXME.
A follow-up patch will address the enum's future and introduce
a proper @Deprecated once we have reigned-in our current warnings.
Change-Id: Iae325d1cf167890f299e0b31faef235b8ee4a3d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Dec 2020 20:11:05 +0000 (21:11 +0100)]
Migrate openflow-protocol-impl isFoo() users
Mass-migrate boolean getter users, which have changed from isFoo()
to getFoo().
Change-Id: I931fb7542a88870d017bb8ad8bc23568e73a9df0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 10 Dec 2020 12:43:03 +0000 (13:43 +0100)]
Bump MRI upstreams
Adopt following versions:
- odlparent-8.0.2
- infrautils-1.9.3
- yangtools-6.0.2
- mdsal-7.0.3
- controller-3.0.3
Change-Id: I5731acb571b168f984e740441914c7867bd9b4ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Gobinath [Tue, 27 Oct 2020 10:25:54 +0000 (15:55 +0530)]
Update active committers info
Change-Id: I5e85ffdf12e629000901fca57eb4a38ca4582f76
Signed-off-by: Gobinath <gobinath@ericsson.com>
Robert Varga [Mon, 19 Oct 2020 23:32:43 +0000 (01:32 +0200)]
Bump infrautils to 1.9.1
Pick up mbean fixes from upstream.
Change-Id: I77f72e799f91e8214506d27ea4e02eb11986fb27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 19 Oct 2020 19:32:35 +0000 (21:32 +0200)]
Bump to mdsal-7.0.1/controller-3.0.1
Pick up mdsal fixes and improvements.
Change-Id: I6a4797e108a63abf08a20cd63a0e56dfdc80380c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Oct 2020 15:39:58 +0000 (17:39 +0200)]
Bump upstreams for Silicon
Adopt the following upstream versions:
- odlparent-8.0.0
- yangtools-6.0.0
- mdsal-7.0.0
- controller-3.0.0
- infrautils-1.9.0
Since we are forced to migrate some of the code, perform related
migrations if they are trivial to do.
Quite a few tests are missing proper keys and properties, hence
these are added in the most obvious manner possible. If there is
a list/map warning in that vicinity, also use BindingMap.of() to get
rid of the warning.
Also a few obvious modernizer warnings are fixed, as it's easier
than add suppressions.
Change-Id: Ic4302fba6916dca8385633f1889e8e619fc281e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 10:27:25 +0000 (12:27 +0200)]
Remove ByteBufUtils.readIpv4Address()
This method is not used anywhere and has a replacement in
readIetfIpv4Address(). Remove it.
Change-Id: Ia18f54b36e4974108cc65bf61207d320b4e7a134
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 10:22:33 +0000 (12:22 +0200)]
Remove ByteBufUtils.readIpv6Address()
This method is not used anywhere, with readIetfIpv6Address() being
its replacement. Remove it along with
EncodeConstants.SIZE_OF_IPV6_ADDRESS_IN_BYTES.
Change-Id: Icc33beb47c4212f3fc187a39fc84cea74931c2dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 10:19:00 +0000 (12:19 +0200)]
Remove ByteBufUtil.macAddressToString()
All users have been migrated, remove this method along with its
test.
Change-Id: Ic8f213320a3df34f2a28c456ac686a4b47e61901
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 10:15:59 +0000 (12:15 +0200)]
Migrate ByteBufUtil.macAddressToString() users
We have users only in tests, perform the straightforward migration.
While we are at it, we also fix expected/actual order in tests, as
well as eliminate call sites which are better served by
Assert.assertArrayEquals().
A few places are asserting the use of upper-case letters, which runs
contrary to what the canonical format is. These are adjusted to use
canonical lower-case.
Change-Id: I4dfc342b005d1cbdec2537eb4cfdac20d6521da2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 08:56:44 +0000 (10:56 +0200)]
Deprecate ByteBufUtil.macAddressToString()
All callers of this method are actually interfacing with
ietf-yang-types' MacAddress. IetfYangUtil provides a better alternative,
as it foregoes String checking performed by MacAddress(String).
Change-Id: Ib54218eb74936bd7c5550322829f5fa809cd3c33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 08:49:49 +0000 (10:49 +0200)]
Remove ByteBufUtils.macAddressToBytes()
With all callers migrated, remove the now-unused method.
Change-Id: I65412717a28c393d3e31d2cda19d8becb3278dd7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 08:46:24 +0000 (10:46 +0200)]
Deprecate ByteBufUtils.macAddressToBytes()
This method operates on any string, whereas all its users are faced
with an ietf-yang-types' MacAddress. IetfYangUtil.macAddressBytes()
provides a superior alternative to this open-coded utility.
Change-Id: Id4f7448a0894a4cec5e76ec801cfde47b03e3be7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 10:30:58 +0000 (12:30 +0200)]
Use Short.BYTES
We have a few places where we a using Short.SIZE / Byte.SIZE. This
is already a constant known as Short.BYTES.
Change-Id: I51bbc7028131948d615ef2f21e9301ba1cff0fc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 08:35:59 +0000 (10:35 +0200)]
Fix switch serial number type
This is a day-0 bug in the definition: X509Certificate's serial
number can be any unbounded number, not just uint64.
Change the definition to be string-based so we do not get errors
if the serial number is negative or quite large.
Change-Id: I41292cc329c4eac81a7c671821e29b6851030056
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 08:23:34 +0000 (10:23 +0200)]
Fix openflow-protocol-impl deprecation warnings
Convert all use of widened types to proper uint types.
JIRA: OPNFLWPLUG-1099
Change-Id: Iabdcf752965851b29be0162c70f463206d07abaa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Sep 2020 07:33:43 +0000 (09:33 +0200)]
Do no subclass HashMap
Eclipse is correctly pointing out we are creating a serializable
subclass without assigning a version to it. Rather than doing that,
use a simple initializer through an intermediate map.
Change-Id: I83d5a05c138bf7ee664612daf81f721fe30435f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:50:37 +0000 (00:50 +0200)]
Migrate test-extension to use uint types
This is a straightforward replacement with Uint64.
JIRA: OPNFLWPLUG-1099
Change-Id: I2cc7607ec96c31566d2fbadb4bbab7cb54ed32e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:48:18 +0000 (00:48 +0200)]
Migrate frm-sync to use uint types
This is a simple matter of encapsulating values, make sure we do
that.
JIRA: OPNFLWPLUG-1099
Change-Id: I12f5c63b9a9935a993b52a7ce90f5ae91a55edc4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:43:15 +0000 (00:43 +0200)]
Make methods static
Eclipse is pointing out a number of methods which can be made static,
fix those warnings.
Change-Id: I4691094f1e5ee098cca5d377a92a3417d667de7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:40:03 +0000 (00:40 +0200)]
Migrate southbound-cli to use uint types
We have some technical debt here, fix it up.
JIRA: OPNFLWPLUG-1099
Change-Id: I7c777dec680234b9c3a9978175e007b2d39c6d59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:33:39 +0000 (00:33 +0200)]
Do not use deprecated Mockito constructs
Mockito has moved some functionality around, adjust to that.
Change-Id: I965d6ba5fd29e95060e9bfd6286fdad40d3a99df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 22:26:38 +0000 (00:26 +0200)]
Finish test code migration to uint
Fix up the few remaining users of widened types, preparing the floor
for migration of production code.
JIRA: OPNFLWPLUG-1099
Change-Id: I6a2ed96d2859244debd63aa41a16db5c8dc7f7f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 17:21:32 +0000 (19:21 +0200)]
Migrate openflowplugim-impl tests to uint types
This migrates the entire openflowplugin-impl test suite to use
Uint types.
We borrow EncodeConstants to get at Uint8-specified
protocol numbers, which is probably not what we want, but then
there seems to be variance of opinion whether to use that or
OFConstants. This is fine for this migration, we will address
the OFConstants/EncodeConstants duplicity when we migrate
production code.
JIRA: OPNFLWPLUG-1099
Change-Id: I088597573037b8a662840aff62b0593a058a10b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 11:40:19 +0000 (13:40 +0200)]
Migrate openflow-protocol-impl tests to Uint types
There are plenty of warnings in the test suite, address all of them
without touching production code.
JIRA: OPNFLWPLUG-1099
Change-Id: I8ec19c008ef51dfdabeded610bef4bda4e11d8f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 11:22:55 +0000 (13:22 +0200)]
Remove ByteBufUtils.padBuffer()
This method has been deprecated for at least three years and is not
used anywhere, remove it.
Change-Id: Ied94f803d3a2025542a07ef1e6e9320fd9a7af4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 11:21:30 +0000 (13:21 +0200)]
Fix migration warnings in openflowjava-util
We have some use of legacy widened types, fix them up.
JIRA: OPNFLWPLUG-1099
Change-Id: I1266a79d5957f4ae1009258593447f0cadfff40c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 11:18:34 +0000 (13:18 +0200)]
Remove deprecated ActionSerializerKey constructor
Legacy widened-type constructor is not used anywhere, remove it.
Change-Id: Ib1b4225657c5bba3455e2b7edbf53a659b02ce40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 24 Sep 2020 11:15:02 +0000 (13:15 +0200)]
Remove deprecated ExperimenterActionSerializerKey constructor
This constructor is using widened Long argument and is not used
anywhere, remove it.
Change-Id: I41ef92b1957657c50d1bb5be7a0ca985851b5bf0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Arunprakash D [Thu, 24 Sep 2020 06:42:05 +0000 (06:42 +0000)]
Merge "Refactor AbstractOxmMatchEntryDeserializer"
Arunprakash D [Thu, 24 Sep 2020 06:41:03 +0000 (06:41 +0000)]
Merge "AbstractOxmMatchEntryDeserializer should be an OFDeserializer"
Robert Varga [Tue, 22 Sep 2020 15:46:58 +0000 (17:46 +0200)]
Bump MRI projects
This patch adopts:
- odlparent-7.0.6
- infrautils-1.8.1
- yangtools-5.0.6
- mdsal-6.0.5
- controller-2.0.4
Change-Id: I56ec950e030e1cb67bb697df85703c8d76dfa95a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 2 Sep 2020 20:02:28 +0000 (22:02 +0200)]
Refactor AbstractOxmMatchEntryDeserializer
All subclassses of AbstractOxmMatchEntryDeserializer follow the same
deserializer pattern. Make sure we eliminate useless getters and
streamline the implementation accordingly.
JIRA: OPNFLWPLUG-1102
Change-Id: I2417ce9f58f7f97acfab91a93d4c346ece3b1208
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 2 Sep 2020 17:55:07 +0000 (19:55 +0200)]
AbstractOxmMatchEntryDeserializer should be an OFDeserializer
All subclasses already also implement OFDeserializer, centralize
that connection.
JIRA: OPNFLWPLUG-1102
Change-Id: I4105e6b71937f43bd649c26aaf4d2cb7f476590e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 2 Sep 2020 17:40:10 +0000 (19:40 +0200)]
Make VersionAssignableFactory implement OFDeserializer
All subclasses are implementing OFSerializer, hence it makes sense
to encode this in the base class. This ends up sharing the offset
of the implementation.
JIRA: OPNFLWPLUG-1102
Change-Id: I53342f0f0ec5ffe37440ee29f6e06c20be5add5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 2 Sep 2020 17:08:44 +0000 (19:08 +0200)]
Fix warnings around SimpleRpcListener
SimpleRpcListener has generic arguments, fix warnings pointing out
unparameterized use.
Change-Id: Ia0a4bd398eddb81bfac1e6459249be685e95d931
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>