sfc.git
7 years agoSpec for the new RSP statistics feature 13/66213/7
ebrjohn [Mon, 4 Dec 2017 22:37:31 +0000 (16:37 -0600)]
Spec for the new RSP statistics feature

Change-Id: I88299b00386b8805f9ca69f3023b373661483338
Signed-off-by: Brady Johnson <[email protected]>
7 years agoSpec for directional data plane locators 56/66356/5
Jaime Caamaño Ruiz [Mon, 11 Dec 2017 19:32:01 +0000 (20:32 +0100)]
Spec for directional data plane locators

Change-Id: Ie7cfa1ddea8a4c3be318abb57489000a8770ec74
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoRefactor sfc-scf-vpp module 91/65691/2
David Suarez [Sat, 18 Nov 2017 12:18:49 +0000 (13:18 +0100)]
Refactor sfc-scf-vpp module

- Proper use of Blueprint to wire all the components: convert some
  classes into @Singleton, remove the SfcScfVppRenderer, use annotations
  instead of XML, remove some useless parameters.
- Clean up
- Migrate SfcScfVppDataListener to use Genius listeners.

Change-Id: Ie7c608fd76b3cef44989d2b0c6c926f2d47c6f25
Signed-off-by: David Suarez <[email protected]>
7 years agoSFC-205: Fix wrong table when removing scf flows 56/65356/3
Jaime Caamaño Ruiz [Thu, 9 Nov 2017 09:46:10 +0000 (10:46 +0100)]
SFC-205: Fix wrong table when removing scf flows

Fixes SFC SCF classifier removing flows from incorrect table. Refactored
ClassifierInterface to provide the correct table numbers and for
MacChainingClassifier to also implement it.

Change-Id: I4383209ce24d0d3dce14f8f498c91abaf36b6c09
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoSFC-206: Fix no sfc-scf-openflow listeners @runtime 48/65748/1
Jaime Caamaño Ruiz [Mon, 20 Nov 2017 17:38:49 +0000 (18:38 +0100)]
SFC-206: Fix no sfc-scf-openflow listeners @runtime

sfc-scf-openflow listeners were not being instantiated by blueprint
because their constructor parameters were not singletons that could be
injected. Introduced in b5fabe5.

Fixed by creating the listeners manually.

Bug: https://jira.opendaylight.org/browse/SFC-206
Change-Id: If3a01d691cbce8478537fd50cdead461d6740e9c
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoMigrate sfc-ovs listeners to Genius' Listeners framework 40/65640/2
David Suarez [Thu, 16 Nov 2017 20:23:53 +0000 (21:23 +0100)]
Migrate sfc-ovs listeners to Genius' Listeners framework

Change-Id: I02019c49787c45cd45d3d27d089e5bc0a140416d
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate sfc-pot-netconf-renderer to use Genius' Listeners framework 65/65665/2
David Suarez [Fri, 17 Nov 2017 13:06:24 +0000 (14:06 +0100)]
Migrate sfc-pot-netconf-renderer to use Genius' Listeners framework

- Migrate the listeners to use the new framework available in Genius
- Replace Blueprint XML entries by the corresponding annotations
- Make some utilities and helpers proper singletons instantiated via BP
- Other minor changes and clean up

I'll rise a follow up patch to improve the design.

Change-Id: Ia343627fdb9cc4c93384a2499623faf040857316
Signed-off-by: David Suarez <[email protected]>
7 years agoAnnotate some parameters as @Nonnull 69/65669/3
David Suarez [Fri, 17 Nov 2017 13:50:23 +0000 (14:50 +0100)]
Annotate some parameters as @Nonnull

This allows to remove some checks.

Change-Id: I37125b35da5d37f9556d05223ad0cfe83070e0a1
Signed-off-by: David Suarez <[email protected]>
7 years agoAnnotate some parameters as @Nonnull 73/65673/1
David Suarez [Fri, 17 Nov 2017 14:42:04 +0000 (15:42 +0100)]
Annotate some parameters as @Nonnull

Change-Id: I1615fd920527f675243fe433289b7e66947eb8a8
Signed-off-by: David Suarez <[email protected]>
7 years agoFix broken formatting in rsp-config-datastore docs 58/65558/1
Ryan Goulding [Wed, 15 Nov 2017 17:06:10 +0000 (12:06 -0500)]
Fix broken formatting in rsp-config-datastore docs

"code-block" takes exactly one argument, the name of the language
contained by the code-block.  This fixes the formatting issue.

Change-Id: Ib7f4fc6727bd2fb4378c5c87eb46e4fda6f4015d
Signed-off-by: Ryan Goulding <[email protected]>
7 years agoUpdates to create RSPs via config data store 06/65006/4
ebrjohn [Wed, 1 Nov 2017 18:21:06 +0000 (13:21 -0500)]
Updates to create RSPs via config data store

- deprecate RSP creation via RPC
- Update RSP data model changing "config false" fields.

Change-Id: Ifbc2e81b0fb56325f8a8c0e874d126e161a45ecb
Signed-off-by: Brady Johnson <[email protected]>
7 years agoRemove trailing spaces and tabs in resource files 19/63419/10
David Suarez [Fri, 10 Nov 2017 15:07:18 +0000 (16:07 +0100)]
Remove trailing spaces and tabs in resource files

Remove trailing spaces to pass the checkstyle rules included in [1].

[1] https://git.opendaylight.org/gerrit/#/c/48710/

Change-Id: I5b67bc919be751bfab04f74b43ffdba88fdde010
Signed-off-by: David Suarez <[email protected]>
7 years agoSpec for RSP creation in config data store 98/64998/4
ebrjohn [Wed, 1 Nov 2017 16:53:03 +0000 (11:53 -0500)]
Spec for RSP creation in config data store

Change-Id: Ib6e25bd9424ae65a8a1b8bbc102978138d2f3c63
Signed-off-by: Brady Johnson <[email protected]>
7 years agoFix some checkstyle issues for the upcoming odlparent 3.0 43/65343/2
David Suarez [Thu, 9 Nov 2017 00:45:09 +0000 (01:45 +0100)]
Fix some checkstyle issues for the upcoming odlparent 3.0

Change-Id: If2e6542e28f50d1c80bc696250cd62f28c3f79f9
Signed-off-by: David Suarez <[email protected]>
7 years agoRemove deploy-site.xml 05/64905/2
Thanh Ha [Mon, 30 Oct 2017 21:16:59 +0000 (17:16 -0400)]
Remove deploy-site.xml

With the javadoc jobs now available to generate javadoc it is time to
remove the maven-sites and related files.

Change-Id: Icc219da3bc0a3ac639692d041f651f85a086e5f5
Signed-off-by: Thanh Ha <[email protected]>
7 years agoRefactor listeners in sfc-sb-rest module to remove off-loading twice 03/65003/6
David Suarez [Wed, 1 Nov 2017 21:55:29 +0000 (22:55 +0100)]
Refactor listeners in sfc-sb-rest module to remove off-loading twice

Change-Id: Ibf10e63fbed0366981dfd2f9c01d46f1f8626674
Signed-off-by: David Suarez <[email protected]>
7 years agoRefactor listeners in sfc-ios-xe-renderer module 90/65090/2
David Suarez [Fri, 3 Nov 2017 12:09:30 +0000 (13:09 +0100)]
Refactor listeners in sfc-ios-xe-renderer module

All listeners in this module have been migrated to use the new listener
framework from Genius. Taking advantage of this migration process they
now use BP annotations to be wired. Renderers have been migrated to use
BP as well, so the SfcIosXeRenderer component (in charge of wiring) is
not needed anymore.

Change-Id: Ib3f059900e9018d1fe91a2e447c78e20d6503970
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate sfc-genius listeners 93/64393/4
Jaime Caamaño Ruiz [Fri, 13 Oct 2017 11:49:18 +0000 (13:49 +0200)]
Migrate sfc-genius listeners

Change-Id: I2b29f8e0925be3235f746a879e8e587dbaae7a39
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoFix the broken build 41/65041/1
David Suarez [Thu, 2 Nov 2017 11:11:17 +0000 (12:11 +0100)]
Fix the broken build

Change-Id: I81461de5e14b17f0c29d0762d62159e667a48b04
Signed-off-by: David Suarez <[email protected]>
7 years agoRefactor listeners in sfc-sb-rest module 16/64916/1
David Suarez [Mon, 30 Oct 2017 23:59:44 +0000 (00:59 +0100)]
Refactor listeners in sfc-sb-rest module

- Use Genius Listeners Framework
- Use blueprint annotations so they can be directly handled by BP
- Some minor fixes
- Checkstyle

Change-Id: I3608e5c74a1b5a9af3d9e707d93c30b2bc4bd61b
Signed-off-by: David Suarez <[email protected]>
7 years agoRefactor listeners in sfc-scf-openflow module 77/64777/2
David Suarez [Thu, 26 Oct 2017 22:19:53 +0000 (00:19 +0200)]
Refactor listeners in sfc-scf-openflow module

- Use Genius Listeners Framework
- Use blueprint annotations so they can be directly handled by BP
  instead of the SfcScfProcessor singleton class
- Some minor fixes
- Checkstyle

Change-Id: I0c8029e4c8db2f65c76006e838108deb57d33141
Signed-off-by: David Suarez <[email protected]>
7 years agoDeprecate the abstract listeners included in sfc-provider 54/64754/2
David Suarez [Thu, 26 Oct 2017 06:07:25 +0000 (08:07 +0200)]
Deprecate the abstract listeners included in sfc-provider

The AbstractClusteredDataTreeChangeListener and
AbstractDataTreeChangeListener are replaced by the classes present in
Genius' package org.opendaylight.genius.datastoreutils.listeners.

Change-Id: I2fcb0187e2b3f43b7ea9d872c50de1543e89f384
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate the rest of the sfc-provider's listeners 41/64741/2
David Suarez [Wed, 25 Oct 2017 20:15:00 +0000 (22:15 +0200)]
Migrate the rest of the sfc-provider's listeners

Migrate the rest of the sfc-provider listener to use Genius' listeners

Change-Id: Idafd8020f1f7620ae22e7d894ac0c0a38e7285fb
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate ServiceFunctionChainListener to Genius' Listeners 30/64730/3
David Suarez [Wed, 25 Oct 2017 18:36:40 +0000 (20:36 +0200)]
Migrate ServiceFunctionChainListener to Genius' Listeners

Change-Id: I26eaa162202c497fd286d1c028216c519997e69b
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate ServiceFunctionForwarderListener to Genius' Listeners 28/64728/1
David Suarez [Wed, 25 Oct 2017 17:36:25 +0000 (19:36 +0200)]
Migrate ServiceFunctionForwarderListener to Genius' Listeners

Change-Id: Ie09ee0efe4fde576b366a95a85ff41cd55f87488
Signed-off-by: David Suarez <[email protected]>
7 years agoMigrate ServiceFunctionListener listener to use the new Listeners FW 29/64629/4
David Suarez [Mon, 23 Oct 2017 23:33:02 +0000 (01:33 +0200)]
Migrate ServiceFunctionListener listener to use the new Listeners FW

Migrate the ServiceFunctionListener listener to use the new Listeners
framework available since [1].

[1] https://git.opendaylight.org/gerrit/#/c/59177/

Change-Id: Ie7306de4cf4af48d88a645dd872a3143337be5c7
Signed-off-by: David Suarez <[email protected]>
7 years agoMinor cleanup 28/64628/2
David Suarez [Mon, 23 Oct 2017 23:09:30 +0000 (01:09 +0200)]
Minor cleanup

More changes will follow.

Change-Id: Ib4a0a2adb59ea206fc7d27cf68201732653db508
Signed-off-by: David Suarez <[email protected]>
7 years agoMinor cleanup 08/64608/2
David Suarez [Mon, 23 Oct 2017 13:51:02 +0000 (15:51 +0200)]
Minor cleanup

Change-Id: I5023ca7b29220611c4b5545ce800ea958cee111f
Signed-off-by: David Suarez <[email protected]>
7 years agoRefactor sfc-pot to non-static 90/64590/3
David Suarez [Sun, 22 Oct 2017 19:01:05 +0000 (21:01 +0200)]
Refactor sfc-pot to non-static

The pom.xml files both in sfc-pot and sfc-provider need to be changed
so they generate autowire.xml files properly.

Change-Id: I4363ebecaab832844561d74689719deeb31c1e60
Signed-off-by: David Suarez <[email protected]>
7 years agoMove this service to use blueprint annotations 89/64589/2
David Suarez [Sun, 22 Oct 2017 08:29:45 +0000 (10:29 +0200)]
Move this service to use blueprint annotations

Move this service to use blueprint annotations instead of xml file.
Some simplifications.

Change-Id: Ic6937e5dab03c26097a4b6c3d1967187b64dc7b4
Signed-off-by: David Suarez <[email protected]>
7 years agoUnbind SFC service when removing SFs 92/64392/2
Jaime Caamaño Ruiz [Fri, 13 Oct 2017 11:49:18 +0000 (13:49 +0200)]
Unbind SFC service when removing SFs

This prevents leftover SFC bindings when the SFs are removed quickly
after the RSPs.

Change-Id: Idf81d862111b054ecd4681de295973f2b01c2e9e
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoFix some NPEs related to logical SFF 63/64163/5
Jaime Caamaño Ruiz [Wed, 11 Oct 2017 13:41:09 +0000 (15:41 +0200)]
Fix some NPEs related to logical SFF

Change-Id: I3d92cf53c61e86a693a0d68f08e9c23f05499186
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
7 years agoFix checkstyle issues 56/64256/5
David Suarez [Fri, 13 Oct 2017 17:37:17 +0000 (19:37 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: Iedacd1ecfcecf0a42a7d4d21879cf7ae98609dbd
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 60/64260/2
David Suarez [Fri, 13 Oct 2017 17:52:42 +0000 (19:52 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I6bcaeb367e0408289e5fca4e0640779fea4a0b98
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 62/64262/2
David Suarez [Fri, 13 Oct 2017 18:02:25 +0000 (20:02 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I06b193536f6eccadebb819c67916b6f489933cfc
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 54/64254/3
David Suarez [Fri, 13 Oct 2017 17:21:11 +0000 (19:21 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I7f94c771c0d9c5be05a0a8ccf13d1b8d4924cdfd
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 59/64259/3
David Suarez [Fri, 13 Oct 2017 17:49:49 +0000 (19:49 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I9f391df1c5582da2b0c554c2b395e3c22d41140a
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 61/64261/2
David Suarez [Fri, 13 Oct 2017 17:54:42 +0000 (19:54 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I321e5471146418858a291618d00cc15e914da139
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 58/64258/2
David Suarez [Fri, 13 Oct 2017 17:39:05 +0000 (19:39 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: Ie907b638ef74eafc09fa75caf8020969a48285e9
Signed-off-by: David Suarez <[email protected]>
7 years agoFix checkstyle issues 55/64255/2
David Suarez [Fri, 13 Oct 2017 17:23:34 +0000 (19:23 +0200)]
Fix checkstyle issues

These utility classes should be declared as final.

Change-Id: I1f69d03bfe5cb63c543ff33650975c7d25b7e385
Signed-off-by: David Suarez <[email protected]>
7 years agoClean up sfc-karaf module 45/64245/2
Ryan Goulding [Fri, 13 Oct 2017 13:14:59 +0000 (09:14 -0400)]
Clean up sfc-karaf module

Just remove unused properties section, commented out version, and
fix some typos.

Change-Id: I5cacd5f95f0b7328b79f59cc78f621a41946dbb9
Signed-off-by: Ryan Goulding <[email protected]>
7 years agoMove findbugs plugin to parent pom 53/64253/1
David Suarez [Fri, 13 Oct 2017 17:15:41 +0000 (19:15 +0200)]
Move findbugs plugin to parent pom

- Fix the issues in the sfc-test-consumer module
- Add an empty class to the sfc-ui-module module to prevent the
  findbugs plugin from failing when there is no code inside a module.

Change-Id: Ic7c4bc9e4667f5780743aa2dd8334925fb6fe07c
Signed-off-by: David Suarez <[email protected]>
7 years agoMove checkstyle enforcement to parent pom 46/64246/2
David Suarez [Fri, 13 Oct 2017 13:25:19 +0000 (15:25 +0200)]
Move checkstyle enforcement to parent pom

Now that all the SFC modules are checkstyle compliant we can move the
enforcement to parent pom.

Change-Id: I69ee963390eff9793458974bbcea0cb37f5c5a7c
Signed-off-by: David Suarez <[email protected]>
7 years agoMake some improvements 39/64039/4
David Suarez [Sat, 7 Oct 2017 17:47:37 +0000 (19:47 +0200)]
Make some improvements

- Proper declaration of constants
- Make private some variables and methods
- Remove redundant initializations
- Size()!=0 replaced by isEmpty()
- Simplification of stream filter

Change-Id: I5198f75352828c222c1f79ea99ad691adbee4b3d
Signed-off-by: David Suarez <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfclisp 61/63861/5
Tom Pantelis [Sat, 30 Sep 2017 20:29:33 +0000 (16:29 -0400)]
Fix findbugs/checkstyle/sonar violations in sfclisp

- Method parameters, caught exceptions and foreach variables should not be reassigned
- Field isn't final but should be
- Write to static field from instance method
- Possible null pointer dereference on branch that might be infeasible
- Field not initialized in constructor but dereferenced without null check
- Boxed value is unboxed and then immediately reboxed

Change-Id: I6ea1dbcd4fb87c96a712cf5579f7b774993eb7e2
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoBUG-9218: Fix odl-sfc-shell dependencies 08/64108/2
Robert Varga [Mon, 9 Oct 2017 14:43:56 +0000 (16:43 +0200)]
BUG-9218: Fix odl-sfc-shell dependencies

This was found by analyzing features present in Nitrogen release,
odl-sfc-shell should depend on odl-sfc-provider rather than
packaging duplicates.

Change-Id: Ib057a546e8502b2ca23d61230f20b5caff88c812
Signed-off-by: Robert Varga <[email protected]>
(cherry picked from commit f13c04a917f5c447de94c18d11dd053f85e299e3)

7 years agovxlan_tool was checking only two bytes of the mac 16/64116/3
Manuel Buil [Tue, 10 Oct 2017 13:58:31 +0000 (15:58 +0200)]
vxlan_tool was checking only two bytes of the mac

When opening a raw sockets, the forwarded packets are also consumed. Therefore
we need a way to drop the generated packets so that they are not processed
again. The way to do this was by compating the interface's mac address and the
destination mac address of the packet, however, the comparison only checked
two bytes and thus there were situations in which the tool misbehaved. This
patch compares all the bytes of the mac

Change-Id: I151b7cc5d379e38f86d6583c6aad41ebe2e62011
Signed-off-by: Manuel Buil <[email protected]>
7 years agoMake some improvements 27/64027/3
David Suarez [Fri, 6 Oct 2017 18:06:37 +0000 (20:06 +0200)]
Make some improvements

- Simplify if-else statement
- Replace StringBuffer with String
- Remove unboxing
- Inline some variables

Change-Id: I71363c5a565d74e6d4577344acb7491eb18bea7c
Signed-off-by: David Suarez <[email protected]>
7 years agoFix issues for future checkstyle enforcement 02/64002/1
David Suarez [Thu, 5 Oct 2017 19:38:52 +0000 (21:38 +0200)]
Fix issues for future checkstyle enforcement

- These issues will be detected by the new checkstyle rules.

Change-Id: Ib8259951806999012e7ee400d8a646dc631d5a7f
Signed-off-by: David Suarez <[email protected]>
7 years agoCleanup vpp-renderer 88/63988/2
David Suarez [Thu, 5 Oct 2017 13:38:51 +0000 (15:38 +0200)]
Cleanup vpp-renderer

- Remove redundancies
- Replace two loops
- Remove unused parameters
- Remove redundant checks

Change-Id: I5b9b6a9ca5be187674604d9c87acc935e25b10c1
Signed-off-by: David Suarez <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfc-vnfm-tacker 62/63862/4
Tom Pantelis [Sat, 30 Sep 2017 21:58:14 +0000 (17:58 -0400)]
Fix findbugs/checkstyle/sonar violations in sfc-vnfm-tacker

- Local variables should not shadow class fields
- May expose internal representation by returning reference to mutable object
- May expose internal representation by incorporating reference to mutable object
- Utility classes should not have public constructors

Change-Id: I2af6bc7576cd1f5c9bb3e09689c5a692f9241342
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfc-pot 15/63915/2
Tom Pantelis [Tue, 3 Oct 2017 18:11:42 +0000 (14:11 -0400)]
Fix findbugs/checkstyle/sonar violations in sfc-pot

- Load of known null value
- Unused private fields should be removed

Change-Id: I4b3716c1ba470d5384d0281ef46a9fcff433476c
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoUse shared executor for listeners 39/63439/4
Tom Pantelis [Fri, 22 Sep 2017 02:58:04 +0000 (22:58 -0400)]
Use shared executor for listeners

Each DataTreeChangeListener creates its own fixed thread pool
with 5-10 threads. A fixed thread pool prefers creating threads
over queueing and reusing an idle thread so each listener pool
will eventually create all its thread which will not be reclaimed
until the pool is shutdown. This can lead to a lot of idle
threads during normal periods of inactivity across all the
listeners.

It would be nore efficient to share a thread pool across all
the listeners since data change notifications should be relatively
infrequent. Also I think a cached thread pool which automatically
reclaims idle threads after a period of inactivity would be more
conducive than a fixed thread pool. Also using a bounded queue
would protect against potential memory exhaustion should there be
a heavy burst and/or possible long-lived tasks.

Change-Id: Id3da34cba7f7d98c599a09e8a82a3e36091796a4
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfc-netconf 22/63722/2
Tom Pantelis [Thu, 28 Sep 2017 00:14:43 +0000 (20:14 -0400)]
Fix findbugs/checkstyle/sonar violations in sfc-netconf

- Unused private fields should be removed
- Incorrect lazy initialization and update of static field
- Write to static field from instance method
- Useless object created

In order to fix some of these issues I refactored the code a bit to
remove statics - comments in-line.

Change-Id: I4382aebdb4aab1a701bc68adbe9957021bb46d0e
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoEnable findbugs enforcement in sfc-vnfm-spi 15/63715/2
Tom Pantelis [Wed, 27 Sep 2017 18:09:19 +0000 (14:09 -0400)]
Enable findbugs enforcement in sfc-vnfm-spi

No current violations to fix.

Change-Id: Ib93d6cccee85b9f3c129019bcc01ddaf0a7a6410
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoEnable findbugs enforcement in sfc-shell 14/63714/2
Tom Pantelis [Wed, 27 Sep 2017 18:04:27 +0000 (14:04 -0400)]
Enable findbugs enforcement in sfc-shell

No current violations to fix.

Change-Id: I86c98baaadcecf18578bc4a739292bcfe2e1d92b
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-openflow-utils 86/63586/2
Tom Pantelis [Tue, 26 Sep 2017 22:15:32 +0000 (18:15 -0400)]
Fix findbugs/sonar violations in sfc-openflow-utils

- Utility classes should not have public constructors
- Collapsible "if" statements should be merged
- Possible bad parsing of shift operation
- Unused private fields should be removed
- String.valueOf() should not be appended to a String

Change-Id: I28736bdd901bab31ac98c2b8643bddea32c3aa19
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoBump sfc to use yangtools 1.2.0 18/63818/3
Anil Belur [Fri, 29 Sep 2017 02:12:47 +0000 (12:12 +1000)]
Bump sfc to use yangtools 1.2.0

Jira: releng-485

Change-Id: I08a6e4f7cde4cfa0ec1f984d8110b0d23df97703
Signed-off-by: Anil Belur <[email protected]>
7 years agoBump odlparent 2.0.4 to 2.0.5 48/63648/2
Stephen Kitt [Wed, 27 Sep 2017 13:35:53 +0000 (15:35 +0200)]
Bump odlparent 2.0.4 to 2.0.5

Change-Id: I744350ce3067e475ef95eb96b0f40abb9419cf38
Signed-off-by: Stephen Kitt <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-vpp-utils 69/63669/4
Tom Pantelis [Wed, 27 Sep 2017 14:11:04 +0000 (10:11 -0400)]
Fix findbugs/sonar violations in sfc-vpp-utils

- Utility classes should not have public constructors
- Method invokes inefficient new String(String) constructor
- Private method is never called
- Method invokes inefficient Number constructor; use static valueOf instead

Change-Id: I5316b01a63490b44d4bcb6f0fe9a1a5d7b609560
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoAdd SFC shell's command to show Service Nodes 06/63606/2
David Suarez [Wed, 27 Sep 2017 10:36:35 +0000 (12:36 +0200)]
Add SFC shell's command to show Service Nodes

Add SFC shell's command to show Service Nodes, as described in
[1].

Some minor changes in other files to finish the implementation of all
the commands described on the spec.

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: I614324f8d4f7e4e8406e4ae9702ab3cb46d17178
Signed-off-by: David Suarez <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfc-ovs 02/63502/2
Tom Pantelis [Mon, 25 Sep 2017 17:40:52 +0000 (13:40 -0400)]
Fix findbugs/checkstyle/sonar violations in sfc-ovs

- Field isn't final but should be
- Method invokes inefficient new String(String) constructor
- Load of known null value
- Parameter must be non-null but is marked as nullable
- Exception handlers should preserve the original exception
- Utility classes should not have public constructors
- String literals should not be duplicated
- String.valueOf() should not be appended to a String
- Local variable and method parameter names should comply with a naming convention
- Collapsible "if" statements should be merged
- Method parameters, caught exceptions and foreach variables should not be reassigned

Change-Id: Id37c56efb43f609de6883059c063cc3f2b7b438f
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoRefactor SbRestAbstractDataListener 25/63425/4
Tom Pantelis [Thu, 21 Sep 2017 22:22:26 +0000 (18:22 -0400)]
Refactor SbRestAbstractDataListener

Refactored SbRestAbstractDataListener and derived classes to pass
parameters into the ctor instead of via setters. This makes it cleaner
so class fields can be final and avoids null checks elsewhere.

Change-Id: I86cde8471ddb3e3b193520191cef72e02a20056d
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoAdd an API to handle ServiceNode entities 24/63524/2
David Suarez [Tue, 26 Sep 2017 14:05:41 +0000 (16:05 +0200)]
Add an API to handle ServiceNode entities

Add an API to handle ServiceNode entities. This will be firstly used by
the SFC CLI.

Change-Id: Ia55985133b01a398e53e6dae19eb618ee4cf2c80
Signed-off-by: David Suarez <[email protected]>
7 years agoRefactor SbRestAbstractTask 61/63461/2
Tom Pantelis [Fri, 22 Sep 2017 16:36:54 +0000 (12:36 -0400)]
Refactor SbRestAbstractTask

- Change fields to private
- Remove setters and pass params to ctor so field can be final and
  avoid null checks elsewhere
- Expose a method to add to the restUriList

Change-Id: I3d48dd3f2ff04c6e9d52218855de40eee0760659
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-sb-rest 23/63423/2
Tom Pantelis [Thu, 21 Sep 2017 21:41:52 +0000 (17:41 -0400)]
Fix findbugs/sonar violations in sfc-sb-rest

- Method ignores exceptional return value
- Consider using Locale parameterized version of invoked method
- Field isn't final but should be (malicious code vulnerability)
- Method uses the same code for two switch clauses
- Redundant nullcheck of value known to be non-null
- Unread public/protected field  (SbRestAbstractTask)
- Field not initialized in constructor but dereferenced without null check

Change-Id: I4f0425b876e6f014d85add0221005cf84d1ddac3
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoBUG9093 Also attempt to use plain Vxlan tunnel 89/63489/1
Jaime Caamaño Ruiz [Fri, 1 Sep 2017 14:33:59 +0000 (16:33 +0200)]
BUG9093 Also attempt to use plain Vxlan tunnel

Give preference to VxlanGpe tunnel type in logical SFF but use standard
Vxlan tunnel if not present. This is because GPE extension might be
globally enabled as a Genius ITM configuration option so that specific
VxlanGpe tunnel types are not used.

Change-Id: I2540ada637b67276977601a6b2dfa418defe872a
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
(cherry picked from commit c4907b6221e1c3919129eb72d920d85f0d2567e1)

7 years agoFix findbugs/sonar violations in sfc-provider 10/63410/2
Tom Pantelis [Thu, 21 Sep 2017 15:00:03 +0000 (11:00 -0400)]
Fix findbugs/sonar violations in sfc-provider

- Exception handlers should preserve the original exception
- Null value is guaranteed to be dereferenced
- Possible null pointer dereference
- Method parameters should not be reassigned
- Collapsible "if" statements should be merged
- Method ignores exceptional return value
- Comparison of String objects using == or !=
- Consider using Locale parameterized version of invoked method
- Field should be package protected (malicious code vulnerability)
- Write to static field from instance method
- Inefficient use of keySet iterator instead of entrySet iterator
- Load of known null value
- Redundant nullcheck of value known to be non-null
- Useless object created
- Unused local variables should be removed
- Comments should not be located at the end of lines of code

Also enabled findbugs enforcement.

Change-Id: I26fb31995af9349cd5287c77c835342da2c90a84
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-genius 88/63388/1
Tom Pantelis [Thu, 21 Sep 2017 02:04:03 +0000 (22:04 -0400)]
Fix findbugs/sonar violations in sfc-genius

Enabled findbugs enforcement. Several violations are
invalid so I had to supress them.

Change-Id: I990b371454b4ed1929e56600c81590e45a6322f0
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/checkstyle/sonar violations in sfc-scf-vpp 10/63310/2
Tom Pantelis [Tue, 19 Sep 2017 22:24:24 +0000 (18:24 -0400)]
Fix findbugs/checkstyle/sonar violations in sfc-scf-vpp

- Method invokes inefficient new String(String) constructor
- Inefficient use of keySet iterator instead of entrySet iterator
- Should be a static inner class
- Method concatenates strings using + in a loop
- Dead store to local variable

Also enabled findbugs and checkstyle enforcement.

Change-Id: Ie72ec552e6185fa0320fb221d41a95561d228217
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-scf-openflow 05/63305/3
Tom Pantelis [Tue, 19 Sep 2017 02:51:27 +0000 (22:51 -0400)]
Fix findbugs/sonar violations in sfc-scf-openflow

- Utility classes should not have public constructors
- Remove unnecessary throws declaration in close()
- Boxing/unboxing to parse a primitive
- Dead store to local variable

Also enabled findbugs enforcement.

Change-Id: I49b6f5de493a5625c02b322d7341ec2ae3688d73
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc_vpp_renderer 04/63304/2
Tom Pantelis [Tue, 19 Sep 2017 02:27:34 +0000 (22:27 -0400)]
Fix findbugs/sonar violations in sfc_vpp_renderer

- Generic exceptions should never be thrown
- Dead store to local variable

Also enabled findbugs enforcement.

Change-Id: I58465abd21f7a130ddb7a4ff4f09fd65b78af306
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix sonar violations in sfc-pot-netconf-renderer 03/63303/2
Tom Pantelis [Tue, 19 Sep 2017 02:09:23 +0000 (22:09 -0400)]
Fix sonar violations in  sfc-pot-netconf-renderer

- Method parameters should not be reassigned
- Unused private fields should be removed

Also enabled findbugs enforcement.

Change-Id: I41a9dec0c59a5a5a6e0653c9788a21dcd61e955a
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-openflow-renderer 53/63253/2
Tom Pantelis [Mon, 18 Sep 2017 23:08:33 +0000 (19:08 -0400)]
Fix findbugs/sonar violations in sfc-openflow-renderer

- Method call passes null for non-null parameter
- Method ignores exceptional return value
- Consider using Locale parameterized version of invoked method
- Field isn't final but should be
- Method invokes toString() method on a String
- Inefficient use of keySet iterator instead of entrySet iterator
- Should be a static inner class
- Private method is never called
- Method invokes inefficient Number constructor; use static valueOf instead
- Dead store to local variable
- Write to static field from instance method
- Unread public/protected field
- Field not initialized in constructor but dereferenced without null check
- Useless object created
- Collapsible "if" statements should be merged

Also enabled findbugs enforcement.

Change-Id: If2f867adce5b7a65984c889c0dbb099b7af7ae53
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoFix findbugs/sonar violations in sfc-ios-xe-renderer 52/63252/2
Tom Pantelis [Mon, 18 Sep 2017 21:30:43 +0000 (17:30 -0400)]
Fix findbugs/sonar violations in sfc-ios-xe-renderer

- Suspicious reference comparison of Boolean values
- Dead store to local variable
- Either log or rethrow this exception

Also enabled findbugs enforcement.

Change-Id: Ic497c86357c85deec6ed7279516c36301d8728ab
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoRemove deprecated CheckedFuture 53/62653/4
David Suarez [Mon, 4 Sep 2017 21:05:59 +0000 (23:05 +0200)]
Remove deprecated CheckedFuture

Remove deprecated CheckedFuture.

Change-Id: Ic2eaafd941dcda5511f2586e4e1f4c14d24eaa8e
Signed-off-by: David Suarez <[email protected]>
7 years agoRemove deprecated CheckedFuture 51/62651/3
David Suarez [Mon, 4 Sep 2017 19:32:07 +0000 (21:32 +0200)]
Remove deprecated CheckedFuture

Remove deprecated CheckedFuture.

Change-Id: I32af83be89ccde82e2a510b22ebcd5dc61dd8ffc
Signed-off-by: David Suarez <[email protected]>
7 years agoFix invalid yang revisions 51/63251/1
Tom Pantelis [Mon, 18 Sep 2017 20:48:43 +0000 (16:48 -0400)]
Fix invalid yang revisions

yangtools is no longer being lenient with invalid revisions.

Change-Id: I75fb04a90b15ec0678aa9b749e880a70b2830a99
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoAdjust for mdsal-binding-dom-codec movement 18/62618/3
Robert Varga [Mon, 4 Sep 2017 11:59:18 +0000 (13:59 +0200)]
Adjust for mdsal-binding-dom-codec movement

The component is moving its package name, adjust for that.

Change-Id: I48fc821360b59e36768fae6a8139497e10e3623e
Signed-off-by: Robert Varga <[email protected]>
7 years agoAdd SFC shell's command to show Service Function Types 48/62948/1
David Suarez [Mon, 11 Sep 2017 06:16:20 +0000 (08:16 +0200)]
Add SFC shell's command to show Service Function Types

Add SFC shell's command to show Service Function Types, as described in
[1],

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: I5503dc14e4a80c420fe803977fd39fcff6ec4c63
Signed-off-by: David Suarez <[email protected]>
7 years agoMake utility classes final and other minor changes 96/61896/7
David Suarez [Wed, 16 Aug 2017 21:35:20 +0000 (23:35 +0200)]
Make utility classes final and other minor changes

Declare utility classes as "final" to avoid subclassing.

Add qualifiers for constructors.

Change-Id: Ie228927a5f676758b4e1c9386829d8dae9c4aa14
Signed-off-by: David Suarez <[email protected]>
7 years agoRemove deprecated CheckedFuture 50/62650/2
David Suarez [Mon, 4 Sep 2017 19:20:22 +0000 (21:20 +0200)]
Remove deprecated CheckedFuture

Remove deprecated CheckedFuture.

Change-Id: If0a2d3ea887172b74ab41984797511d098c7b9d5
Signed-off-by: David Suarez <[email protected]>
7 years agoRemove unused executor 59/62559/1
David Suarez [Fri, 1 Sep 2017 16:31:19 +0000 (18:31 +0200)]
Remove unused executor

Remove unused executor.

Change-Id: If7ed8908d87e9717fbdc231a0bfb66466cb7d9c9
Signed-off-by: David Suarez <[email protected]>
7 years agoUpdate odlparent to 2.0.4 65/61865/3
Thanh Ha [Wed, 16 Aug 2017 15:19:28 +0000 (11:19 -0400)]
Update odlparent to 2.0.4

Change-Id: I5a5c82c894e3498ccda590e12061b484b2449231
Signed-off-by: Thanh Ha <[email protected]>
7 years agoRemove Executors not used 93/62493/2
David Suarez [Thu, 31 Aug 2017 13:17:05 +0000 (15:17 +0200)]
Remove Executors not used

Remove Executors not used.
Remove some dead code.

Change-Id: Ided648c741c503e3352abb82c68ad7919b1d17e1
Signed-off-by: David Suarez <[email protected]>
7 years agoConvert DataChangeListeners to DataTreeChangeListeners 38/62338/3
Tom Pantelis [Sat, 26 Aug 2017 06:22:49 +0000 (02:22 -0400)]
Convert DataChangeListeners to DataTreeChangeListeners

The DataChangeListener API has been deprecated for a couple releases
with possible removal in Oxygen.

Change-Id: Ic497e09047a41b2e8e5f1b6818fba8298f817589
Signed-off-by: Tom Pantelis <[email protected]>
7 years agoAdd SFC shell's command to show Service Function Paths 84/61584/3
David Suarez [Mon, 14 Aug 2017 07:54:33 +0000 (09:54 +0200)]
Add SFC shell's command to show Service Function Paths

Add SFC shell's command to show Service Function Paths, as described in
[1].

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: If11acd10e0ec38de14fee038958ac4a68015db96
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd SFC shell's command to show Service Function Chains 79/61579/5
David Suarez [Mon, 14 Aug 2017 06:53:17 +0000 (08:53 +0200)]
Add SFC shell's command to show Service Function Chains

Add SFC shell's command to show Service Function Chains, as described in
[1],

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: Iceadac2c1a39b4c93e950503d5e23924e07e3f39
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd missing relative path 25/61925/2
Stephen Kitt [Thu, 17 Aug 2017 13:08:34 +0000 (15:08 +0200)]
Add missing relative path

Change-Id: I358b05a938f8b4ef812f1174e33b58d434cbba93
Signed-off-by: Stephen Kitt <[email protected]>
7 years agoAdd SFC shell's command to show SFFs 36/61536/3
David Suarez [Fri, 11 Aug 2017 09:28:23 +0000 (11:28 +0200)]
Add SFC shell's command to show SFFs

Add SFC shell's command to show SFFs, as described in [1],

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: I3a8197d70fef6073a6713f7fbbe30ff01ae43a0f
Signed-off-by: David Suarez <[email protected]>
7 years agoBump versions by x.(y+1).z for next dev cycle 00/61700/1
Thanh Ha [Mon, 14 Aug 2017 17:37:35 +0000 (13:37 -0400)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ib7c6fc7f5861f48c09c6603c147ad55f322d343d
Signed-off-by: Thanh Ha <[email protected]>
7 years agoBump odlparent 2.0.2 to 2.0.4 56/61356/3
Stephen Kitt [Tue, 8 Aug 2017 16:14:13 +0000 (18:14 +0200)]
Bump odlparent 2.0.2 to 2.0.4

Change-Id: I9c74470018d63d8b693068c7ce7373cabb4cf3ed
Signed-off-by: Stephen Kitt <[email protected]>
7 years agoAdd support for the new SFC shell 01/61401/5
David Suarez [Wed, 9 Aug 2017 07:23:43 +0000 (09:23 +0200)]
Add support for the new SFC shell

Add support for the new SFC shell. This is the first commit of a series
adding all the new CLI commands to the Karaf console to show the
provisioned SFC's model entities as described in [1].

[1] https://git.opendaylight.org/gerrit/#/c/61059/

Change-Id: I04498cbbe23aa0ab3ffb22aba87432217b0fe34b
Signed-off-by: David Suarez <[email protected]>
7 years agoReplace size()==0 by isEmpty() 41/61341/1
David Suarez [Tue, 8 Aug 2017 15:15:19 +0000 (17:15 +0200)]
Replace size()==0 by isEmpty()

Replace size()==0 by isEmpty(). It improves readability and avoid "=0".

Change-Id: Id7c7d52a4c7ad41238b32922fcfca3db3c493fee
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd private constructor to this utility class 76/61076/3
David Suarez [Wed, 2 Aug 2017 21:16:53 +0000 (23:16 +0200)]
Add private constructor to this utility class

Add private constructor to this utility class.

Change-Id: Ifd9a3eff6b23712b7ef2ca3f0d6cc82ffa3b1266
Signed-off-by: David Suarez <[email protected]>
7 years agoJoin and simplify if(s) statements 60/61060/3
David Suarez [Wed, 2 Aug 2017 17:21:39 +0000 (19:21 +0200)]
Join and simplify if(s) statements

Join and simplify if(s) statements

Change-Id: I22a2532f5abf68043906f0cfdea77e6e80db51f6
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd the spec document for the new SFC shell 59/61059/4
David Suarez [Wed, 2 Aug 2017 16:58:11 +0000 (18:58 +0200)]
Add the spec document for the new SFC shell

Add the specification documents for the new feature SFC Command Line
Interface (CLI). This shell will include several commands to show the
provisioned SFC's data model.

Change-Id: I09af7269a327ee6cfe35e824d91e8c0c5a8894f7
Signed-off-by: David Suarez <[email protected]>
7 years agoFix some logs 39/61039/4
David Suarez [Wed, 2 Aug 2017 12:26:59 +0000 (14:26 +0200)]
Fix some logs

Fix some logs to comply with the recommended usage for slf4j.

Change-Id: I6e45bde2cc239ec652f1efb04f5b6523e8bb93eb
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd a readAll method to get all the Service Chains 02/61102/2
David Suarez [Thu, 3 Aug 2017 10:48:45 +0000 (12:48 +0200)]
Add a readAll method to get all the Service Chains

Add a readAll method to get all the Service Chains.

Change-Id: I6f95d23b75c90c848a94e50e13cc18d38c1bb31c
Signed-off-by: David Suarez <[email protected]>
7 years agoAdd a readAll method to get all the Service Function Types. 12/61112/1
David Suarez [Thu, 3 Aug 2017 12:45:42 +0000 (14:45 +0200)]
Add a readAll method to get all the Service Function Types.

Add a readAll method to get all the Service Function Types.

Change-Id: I0028800cc3a87b5eec2102604420da0941124404
Signed-off-by: David Suarez <[email protected]>