sfc.git
8 years agoClean the usage of boolean expressions 95/50295/2
David Suarez [Wed, 11 Jan 2017 13:56:20 +0000 (14:56 +0100)]
Clean the usage of boolean expressions

Clean the usage of boolean expressions and other minor improvements for
readability.

Change-Id: Ieda16a49c71da3bdc61fc3f2722ab39aba4f6c25
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoMerge "GUI - Add default redirect on app start"
Brady Johnson [Wed, 11 Jan 2017 14:04:14 +0000 (14:04 +0000)]
Merge "GUI - Add default redirect on app start"

8 years agoGUI - Add default redirect on app start 18/50218/3
Daniel Malachovsky [Tue, 10 Jan 2017 18:54:39 +0000 (19:54 +0100)]
GUI - Add default redirect on app start

Due Dlux split we removed Topology app from odl-dlux-core feature.
There were also default redirect to that app, so it was landing page, when
DLUX was started.
This patch adds default route to GUI in this project.

More info:
https://wiki.opendaylight.org/view/Weather#Rename_some_odl-dlux-.2A_features_to_odl-dluxapps-.2A

Change-Id: I025ffe3403392458207af0fea52b57af75bb22b0
Signed-off-by: Daniel Malachovsky <dmalacho@cisco.com>
8 years agoReplace Arrays.asList by Collections.singletonList. 75/50275/2
David Suarez [Wed, 11 Jan 2017 08:31:36 +0000 (09:31 +0100)]
Replace Arrays.asList by Collections.singletonList.

It is a minor performance improvement.

Change-Id: Ibdb6f42918551465e304735fde357aff2b36c9d8
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoMove sfc-scf-openflow into sfc-classifiers 72/50272/2
Yi Yang [Wed, 11 Jan 2017 07:38:04 +0000 (15:38 +0800)]
Move sfc-scf-openflow into sfc-classifiers

We want to add VPP classifier for sfc, so do this change to adapt to multiple sfc classifiers.

Change-Id: I43c9f5a2a423bb802be533a23161c42828696b6c
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agosfc104 demo: fix two issues led by proxy environment variable and recent sfc YANG... 65/50265/2
Yi Yang [Wed, 11 Jan 2017 05:45:48 +0000 (13:45 +0800)]
sfc104 demo: fix two issues led by proxy environment variable and recent sfc YANG model changes

Change-Id: Iab4e2515c56ef122bc114c3f9a343df954bdaefe
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agoMerge "Remove explicit type boxing."
Brady Johnson [Wed, 11 Jan 2017 11:58:49 +0000 (11:58 +0000)]
Merge "Remove explicit type boxing."

8 years agoRemove explicit type boxing. 11/50211/2
David Suarez [Tue, 10 Jan 2017 16:13:26 +0000 (17:13 +0100)]
Remove explicit type boxing.

Autoboxing is applied improving readability.

Change-Id: Ia3388c0e18d1d0b46a1e4bff7f680723b9d3e88e
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoAdd private constructor. 94/50194/2
David Suarez [Tue, 10 Jan 2017 13:53:20 +0000 (14:53 +0100)]
Add private constructor.

Add private constructor to utility class to avoid instantiation.

Change-Id: I194258e406cb3a1d691b7a26c0dcbc63f6de5b2f
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoRefactor the Classifier Processor classes. 11/49711/4
Miguel Duarte [Wed, 21 Dec 2016 15:15:55 +0000 (16:15 +0100)]
Refactor the Classifier Processor classes.

By making the flow generator classes return FlowDetails instead of
FlowBuilders, both the OpenflowClassifierProcessor and the
ClassifierRspsUpdateListener classes are simpler, since they are no
longer responsible of building the FlowDetails object.

The dpdk flow generation was also taken to the classes
implementing the ClassifierInterface (BareClassifier &
LogicallyAttachedClassifier), thus making the processAce simpler.

This enables the processAce and processAcl methods on those classes to
become simpler, thus reducing their cyclomatic complexity - overall
indicator of complexity.

Change-Id: I93af5fc075c19854e417452f62d3afb711c47c51
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoRemove technical debt from the project 10/49710/4
Miguel Duarte [Mon, 19 Dec 2016 10:21:52 +0000 (11:21 +0100)]
Remove technical debt from the project

Break package cycles between scfofrenderer,
scfofrenderer.logicalclassifier, and scfofrenderer.rspupdatelistener
packages.

This was found by analyzing the sonarcube results, and means that these
3 modules are tightly coupled. By restructuring the packages, the
circular dependencies are fixed.

Modified the OpenflowClassifierProcessor, attempting to make it simpler.
In a latter commit, its methods will be split, thus simplifying it quite
a lot.

Change-Id: I00b29c163edb6bdc72ee6c9d2fae7691211049c4
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoModified JSON files in resources to adapt them to deprecated fields in Service Functions 18/50118/3
eabasan [Mon, 9 Jan 2017 08:08:17 +0000 (09:08 +0100)]
Modified JSON files in resources to adapt them to deprecated fields in Service Functions
Added one configuration example using bidirectional field in SF type

Change-Id: I10d872873f6a1f56855788f159b5ac31ac8cf797
Signed-off-by: eabasan <santiago.abascal@ericsson.com>
8 years agoMerge "Removing deprecated SF fields"
Yi Yang [Thu, 22 Dec 2016 00:12:38 +0000 (00:12 +0000)]
Merge "Removing deprecated SF fields"

8 years agoRemoving deprecated SF fields 87/49687/1
Brady Johnson [Thu, 10 Nov 2016 10:29:28 +0000 (11:29 +0100)]
Removing deprecated SF fields

- The SF fields nsh-aware and request-reclassification were
  deprecated in Beryllium. The fields were added to the
  SF-type, so use those instead.

Change-Id: I81d4b3fddd23fb68bed556f73b44c5e9fde7eff6
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoClassifier reacts to first SF location updates 44/49444/5
Miguel Duarte [Wed, 30 Nov 2016 11:42:39 +0000 (12:42 +0100)]
Classifier reacts to first SF location updates

Whenever the first SF in an RSP migrates to another compute node, the
classifier rules are updated accordingly - whether sending the packet
through a different tunnel connected to the new compute node, or, in
scenarios when the SF moved to the compute node where the classifier is
installed, by jumping directly to the SFC transport ingress table.

The helper methods on the OpenflowClassifierProcessor were moved into a
new class - ClassifierHandler.

The ClassifierRspUpdateDataGetter was finished, providing 2 methods:
  - filter all ACLs whose ACEs impact the supplied RSP
  - filter all ScfClassifier objects that implement those ACLs

The ClassifierRspsUpdateListener was added logic on how to identify the
movement of the first SF in any RSP, and also triggers the classifier
flows update through the ClassifierRspUpdateProcessor.

The ClassifierRspUpdateProcessor follows the same principle of the
OpenflowClassifierProcessor - build all the flows to be installed. A new
class was created to separate the concerns (classifier updates have the
RSP as its single argument, whereas classifier add/delete have the ACL
and the ScfClassifier objects as arguments).

Everything else are tests (+- 600 lines)

Change-Id: I487d98d282b28aefd79d0658fcc50e20897beffa
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoMerge "Deprecating the SFC and RSP symmetric flags"
Yi Yang [Wed, 21 Dec 2016 08:34:09 +0000 (08:34 +0000)]
Merge "Deprecating the SFC and RSP symmetric flags"

8 years agoHandle RSP updates on the classifier APIs 59/49359/4
Miguel Duarte [Wed, 14 Dec 2016 10:11:27 +0000 (11:11 +0100)]
Handle RSP updates on the classifier APIs

The APIs leveraged by the classifier were changed enabling it to update
its flows when the first SF in an RSP migrates to another compute node.

New classes (to be implemented in the next commit):
  - ClassifierRspUpdateDataGetter
This class queries MD-SAL for all ACLs whose ACEs target the supplied
RSPs, and also queries MD-SAL for all Classifiers enforcing the filtered
ACLs.

  - ClassifierRspsUpdateListener
Identifies relevant RSP updates (RSPs whose 1st SF neutron port changed
data-plane IDs), and processes that RSP update - deleting the old
impacted flows, and creating new ones.

API changes:
  - OpenflowClassifierProcessor
The OpenflowClassifierProcessor now *has* a BareClassifier, and a
LogicallyAttachedClassifier object, injected through the constructor.

Which classifier(Bare vs LogicallyAttached) is used for each processed
request depends on the type of SFF to which it is connected to.

  - SfcNshHeader
The SfcNshHeader class now encapsulates an RSP object, which can be set
through a different constructor. Using this allows us to save DS reads
on RSP updates, since we are notified with the new object.

  - SfcScfOfProcessor
The SfcScfOfProcessor class got simpler, and now does not have to
encapsulate and inject the transaction object into the OpenflowWriter
and OpenflowClassifierProcessor.

  - SfcScfOfRenderer
The SfcScfOfRenderer class now also features an update handler for RSPs.
Also, it injects the required dependencies into the
OpenflowClassifierProcessor and OpenflowWriter objects, while making
them share the same transaction objects.

  - SfcOfFlowWriterInterface
The SfcOfFlowWriterInterface and its subclass now encapsulate an
EventBus, and expose a transactional API. Clients that want to share the
same transaction object as the OpenflowWriter register themselves, and
are notified whenever the OpenflowWriter commits a transaction.

Also, the FlowDetails class manipulated by the SfcOfFlowWriterInterface
now encapsulates the used RSP path ID, making it easier / more efficient
for the SfcOfFlowWriterInterface clients to delete a set of related
flows.

Log messages are tuned throughout the classifier code, along with the
used log levels.

Change-Id: I0d61f090bdfec2e58aa0e811988ea9cca32be66c
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoDeprecating the SFC and RSP symmetric flags 46/49546/4
Brady Johnson [Fri, 11 Nov 2016 09:26:07 +0000 (10:26 +0100)]
Deprecating the SFC and RSP symmetric flags

- Chain symmetry is now a function of the SF-type bidirectionality flag
- The SFP symmetry flag, if present, will override the SF-type
  bidirectionality flag
- Minor cleanup of the SfcProviderRpcTest test

Change-Id: I1bbc3a368a28ad69169b640cc729ec69dd17180e
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoMerge "Add blueprint for sfc-genius module"
Brady Johnson [Wed, 14 Dec 2016 09:58:22 +0000 (09:58 +0000)]
Merge "Add blueprint for sfc-genius module"

8 years agoAdd unit test for logical SFF RSP Processor with SFs in different compute nodes 44/48244/6
eabasan [Fri, 11 Nov 2016 06:52:10 +0000 (07:52 +0100)]
Add unit test for logical SFF RSP Processor with SFs in different compute nodes

Change-Id: Ia74690c081ac514f5c765a207ab9cdb0abcf6ae7
Signed-off-by: eabasan <santiago.abascal@ericsson.com>
8 years agoAdd blueprint for sfc-genius module 08/49308/3
Jaime Caamaño Ruiz [Tue, 13 Dec 2016 16:10:55 +0000 (17:10 +0100)]
Add blueprint for sfc-genius module

Change-Id: Id311dbaca587419fb99217ffba128eb06eba76d4
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoBUG 7350: NullPointerException when creating RSP without any topology node connected 88/49288/1
Diego Granados [Tue, 13 Dec 2016 10:08:49 +0000 (11:08 +0100)]
BUG 7350: NullPointerException when creating RSP without any topology node connected

The bug is triggered when looking for a dpdk port during RSP
rendering. An unchecked-for-null iteration is performed in
the topology nodes list. Now the list of nodes is checked
for null before iterating

Change-Id: I8ba5e7532bb34ac1d941ad1761cc1e6601d7020f
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoBUG 7204 : Typo in method names of sfc-vnfm-tacker 69/48469/3
venkatamahesh [Fri, 18 Nov 2016 10:30:19 +0000 (16:00 +0530)]
BUG 7204 : Typo in method names of sfc-vnfm-tacker

There is a typo in method names of sfc-vnfm-tacker
In this patch it is changed accordingly

Change-Id: I5f2b66979ce9944cb753d68a124b91024cc8c30c
Signed-off-by: venkatamahesh kotha <venkatamaheshkotha@gmail.com>
8 years agoBUG 4221 When deleting a RSP remove symmetric path if necessary 79/48879/5
eceabpe [Thu, 1 Dec 2016 15:24:19 +0000 (16:24 +0100)]
BUG 4221 When deleting a RSP remove symmetric path if necessary

Solution and Unit Test for:
Bug 4221 - When deleting a RSP need to remove symmetric path if it exists

Change-Id: I0466a357eb39b5229ee2f7769285f7184f421bbc
Signed-off-by: eceabpe <alvaro.berlanga@ericsson.com>
8 years agoUpdates to SFC Proof of Transit feature. 66/48766/7
Srihari Raghavan [Tue, 29 Nov 2016 09:17:46 +0000 (14:47 +0530)]
Updates to SFC Proof of Transit feature.

1. Add RPC trigger to enable SFC Proof of Transit feature.
2. Add changes to handle RPC trigger to enable the feature.
3. Augmentation updates to RSP.
4. Add unit tests to verify the changes.
5. Design guide and documentation: https://github.com/ciscoDevNet/iOAM

Change-Id: I195c9b83fb16a5789eab704b862dc918a110344b
Signed-off-by: Srihari Raghavan <srihari@cisco.com>
8 years agoRemove sfc-provider-impl capability from sfc-test-consumer-initial.xml 47/49247/1
Vratko Polak [Mon, 12 Dec 2016 15:02:52 +0000 (16:02 +0100)]
Remove sfc-provider-impl capability from sfc-test-consumer-initial.xml

sfc-provider-impl has been migrated to Blueprint,
so the capability will never appear.

Change-Id: Id14ea9529e8928815fd8f933298bc3f34acfae9f
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoRemove sfc-bootstrap module 20/49120/3
David Suarez [Wed, 7 Dec 2016 23:47:58 +0000 (00:47 +0100)]
Remove sfc-bootstrap module

Since SFC is already using Blueprint as dependency injection framework,
the sfc-bootstrap module is not needed anymore.

Change-Id: I2e16c4fe6994c54c8b640d3a18c46a9374136b50
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoBUG 7269: System Info tab,no data displayed 68/49168/2
Alberto Quintana Heras [Fri, 9 Dec 2016 07:24:39 +0000 (08:24 +0100)]
BUG 7269: System Info tab,no data displayed

Added parameter to call SfcRestangularSvc.getCurrentInstance().oneUrl
When enter to System Info tab, debugging javascript, an error
is displayed in the console.

Change-Id: Ic86186e0fd89cfbee01cab8db7a3b8864ef1a6cb
Signed-off-by: Alberto Quintana Heras <alberto.quintanaheras@altran.com>
8 years agoMerge "Fix clearly badly broken Blueprint wiring"
Brady Johnson [Fri, 9 Dec 2016 08:51:30 +0000 (08:51 +0000)]
Merge "Fix clearly badly broken Blueprint wiring"

8 years agoFix clearly badly broken Blueprint wiring 51/49151/1
Michael Vorburger [Thu, 8 Dec 2016 14:42:22 +0000 (15:42 +0100)]
Fix clearly badly broken Blueprint wiring

Unable to find property descriptor dataProvider on class
org.opendaylight.sfc.sfc_netconf.provider.api.SfcNetconfServiceFunctionAPI
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable
to find property descriptor dataProvider on class
org.opendaylight.sfc.sfc_netconf.provider.api.SfcNetconfServiceFunctionAPI

Indeed SfcNetconfServiceFunctionAPI's setDataProvider() method is static,
so you cannot do <property name="dataProvider" ref="dataBroker"/> for
<bean id="sfcnetconfservicefunctionapi"
  class="org.opendaylight.sfc.sfc_netconf.provider.api.SfcNetconfServiceFunctionAPI">

Thus, at the very least, you would need a fake non-static setter there,
(although that's very ugly, static-is-evil; but that's beyond this change).

Change-Id: I6cc200b0e0fbde25ae3c9bf637272a4362479e07
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
8 years agoMinor refactor of the VPP Renderer 54/48454/6
Brady Johnson [Thu, 17 Nov 2016 14:14:28 +0000 (15:14 +0100)]
Minor refactor of the VPP Renderer

- removing circular dependencies between listener and renderer packages
- changing listeners to use AbstractDataTreeChangeListener
- patchSet 4: changes due to code review comments

Change-Id: Ie97634be1cfdbe014df771b65bc501e4128eec1c
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoBUG 6347: Fine tune RSP removal on SFF update 61/48661/3
Jaime Caamaño Ruiz [Thu, 24 Nov 2016 13:50:10 +0000 (14:50 +0100)]
BUG 6347: Fine tune RSP removal on SFF update

Remove only RSPs affected by SFF dictionary change. If a dictionary
entry is changed or removed, an RSP with a hop on that SFF for the SF
corresponding to that dictionary entry will be removed. Otherwise, it
won't be removed for such a change.

Change-Id: I945bb725f620fd48d5e9bb279b27bdedf43831db
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoFix comparison of required and available capabilities 29/48829/1
Michal Rehak [Wed, 30 Nov 2016 14:14:53 +0000 (15:14 +0100)]
Fix comparison of required and available capabilities

    - upon netconf node capabilities are compared. But
      because of model change in netconf available
      capabilities are no longer plain list of strings.
      Currently netconf provides a AvailableCapability
      object with additional leaves and string names
      must be extracted first and then compared.

Change-Id: Ia4e17a55cc8ab04714fb5b53a882e148593089ad
Signed-off-by: Michal Rehak <mirehak@cisco.com>
8 years agoBUG 7243 : Modify the checkbox text color to be visible 63/48763/1
venkatamahesh [Tue, 29 Nov 2016 08:46:31 +0000 (14:16 +0530)]
BUG 7243 : Modify the checkbox text color to be visible

At present the text is not visible as it sync with background
color. In this patch I have modified to be visible to users

Change-Id: I2ecc90b42a4664610e188b21c4c225ee586ed1f5
Signed-off-by: venkatamahesh kotha <venkatamaheshkotha@gmail.com>
8 years agoAdd empty checkstyle-suppressions.xml 54/48754/1
Jaime Caamaño Ruiz [Mon, 28 Nov 2016 19:07:25 +0000 (20:07 +0100)]
Add empty checkstyle-suppressions.xml

Due to change 48715 [0] in odlparent, now checkstyle configuration
inherited from odlparent looks for a checkstyle-suppressions.xml file.
Rather than overriding the configuration, an empty file to add
exceptions in the future is added. This fixes a build failure.

 [0] https://git.opendaylight.org/gerrit/#/c/48715/

Change-Id: I4aa18385c73b2f7f25373a4affb56fab23efee18
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoMerge "BUG 7242 : Correction in the command for starting sfc_agent"
Brady Johnson [Mon, 28 Nov 2016 09:58:47 +0000 (09:58 +0000)]
Merge "BUG 7242 : Correction in the command for starting sfc_agent"

8 years agoMerge "Integrate classifier w/ genius - commit #3"
Brady Johnson [Mon, 28 Nov 2016 09:54:51 +0000 (09:54 +0000)]
Merge "Integrate classifier w/ genius - commit #3"

8 years agoBUG 7242 : Correction in the command for starting sfc_agent 99/48699/2
venkatamahesh [Fri, 25 Nov 2016 13:19:20 +0000 (18:49 +0530)]
BUG 7242 : Correction in the command for starting sfc_agent

When we execute with the specified command it is throwing error
as we are not specifying .py to sfc_agent. If we execute with
.py extension there is no errors

Change-Id: Iba8bf04d8e74d84e3109bf48470f61576eddc90a
Signed-off-by: venkatamahesh kotha <venkatamaheshkotha@gmail.com>
8 years agoIntegrate classifier w/ genius - commit #3 76/48476/3
Miguel Duarte [Fri, 18 Nov 2016 12:36:50 +0000 (13:36 +0100)]
Integrate classifier w/ genius - commit #3

This commit finishes the integration of the current SFC classifier w/
genius.

The remaining methods of the API providing in the previous commits are
implemented, specifically:

The genius service binding w/ the interfaces to classify is finished,
and is called from the OpenflowClassifierProcessor.

The LogicalClassifierDataGetter is finished, providing all necessary
data-retrieval methods required by the LogicallyAttachedClassifier.

The flow generation logic made in the LogicallyAttachedClassifier is
finished.

Unit testing of the remaining classes is added.

Quicker bail-out of the openflowWriter when no flows are to be writen or
deleted.

Change-Id: I52755b98fc3eeb2f78c8afd90f4d83c6f65ae527
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoBUG 7171: ACL configuration via GUI Broken 81/48681/3
swatideshpande [Thu, 24 Nov 2016 18:57:39 +0000 (10:57 -0800)]
BUG 7171: ACL configuration via GUI Broken

The current yang model for ACLs is ietf-access-control-list(2016-02-18).
sfc-ui, is constructing ACL requests as per
ietf-acces-control-list(2015-03-17)causing breakage.

The acl key has changed from "acl-name" to "acl-type acl-name",
in Rev 2016-02-18.

Fix done in sfc-ui module for acl key change as well as schema change
for all ietf-access-list config requests.
Input box added to "Create Access List" screen for configuring ACL Type.
Fix added for service-classifier requests to adhere to yang model Rev
service-function-classifier(2014-07-01)

Change-Id: I7947047d1cf08fbb8104f040de04d786e9faefa1
Signed-off-by: swatideshpande <swati.deshpande@serro.com>
8 years agoMerge "Integrate classifier w/ genius - commit #2"
Yi Yang [Fri, 25 Nov 2016 01:27:44 +0000 (01:27 +0000)]
Merge "Integrate classifier w/ genius - commit #2"

8 years agoRedundant if(x>0) brushing befor for( ;x<0; ) 66/48666/2
guillermo tomasini [Thu, 24 Nov 2016 14:49:06 +0000 (15:49 +0100)]
Redundant if(x>0) brushing befor for( ;x<0; )

Change-Id: I2477c76b1558ca49aec4a0946efa37325728cd0c
Author: Guillermo Tomasini <guillermo.pablo.tomasini.redonas@ericsson.com>
Signed-off-by: guillermo tomasini <guillermo.pablo.tomasini.redondas@ericsson.com>
8 years agoIntegrate classifier w/ genius - commit #2 46/48446/8
Miguel Duarte [Fri, 18 Nov 2016 11:26:32 +0000 (12:26 +0100)]
Integrate classifier w/ genius - commit #2

Major refactor of the SfcScfOfProcessor class, which had too many
responsabilities. These were split among the following classes:

SfcScfOfProcessor:
Processes adding classifier flows into a number of OVS switches.
Client of the OpenflowClassifierProcessor class, from which it gets
a list of all the flows to install among the OVSs, writing them in a
single transaction object.

OpenflowClassifierProcessor:
Encapsulates a transaction object, and processes the creation of
ACLs (along w/ respective ACEs) into the OVS switches.
Client of the LogicallyAttachedClassifier class.

ClassifierInterface:
Responsible for building the classifier flows required for the
logical SFF feature. WIP, and will feature in the next commit.
There are 2 types of ClassifierInterface:
  - LogicallyAttachedClassifier - empty implementation; will be uploaded
    in the next commit
  - BareClassifier - 'Legacy' scenario, moved into a wrapper class

LogicalClassifierDataGetter:
Utility class used to fetch data relevant to the OpenflowClassifier
Processor and the LogicallyAttached classifier.
Encapsulates the genius RPC, and fetches data from genius, SFC, and
IETF data models. WIP, and will feature in the next commit.

The SfcScfOfUtils are also refactored, building the required flows, so
that the SfcScfOfProcessor can install them afterwards, in a single
transaction object.

Blueprint injection of the RpcProvider (required for the logical SFF
feature).

Add unit testing of the legacy scenarios, and well as w/ DPDK flow
generation.

In this commit, while the way the classifier works is drastically
changed, no new functionallity is added. It finished paving the way
for integrating the new feature, making it easier to be understood,
and easier to unit test.

In the next - and last - commit, I will complete the APIs of the
forementioned classes, thus enabling the classifier to be attached
to a logical SFF.

Change-Id: I8c59078b8b04b4e8cb49e85a779f2d4940c1e546
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agosfc104 demo: check openflow renderer and sfc classifier initialization 51/48651/2
Yi Yang [Thu, 24 Nov 2016 07:49:39 +0000 (15:49 +0800)]
sfc104 demo: check openflow renderer and sfc classifier initialization

- sleep longer time for vpp node connection
- check openflow renderer and sfc classifier initialization

Change-Id: Ia77b930ed4412306bce4523e1d4ee4461e075c35
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agovpp renderer: fix netconf node capabilities check issue 50/48650/1
Yi Yang [Thu, 24 Nov 2016 07:32:26 +0000 (15:32 +0800)]
vpp renderer: fix netconf node capabilities check issue

netconf project commit ebce6c1ba9a22e420c87b45e5b20501dc7047730
broke vpp renderer, it changed netconf node topology model
, vpp renderer is using it to check if a netconf node is vpp
node or not.

This fix is to adapt to new netconf node topology model, it has
been verified in sfc104 vpp demo.

Change-Id: I191fdb298d560b207ab2cc20fc9e13f2f9730ebe
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agoMinor cleanup of sfc-provider unit tests 30/48530/2
Brady Johnson [Mon, 21 Nov 2016 11:17:52 +0000 (12:17 +0100)]
Minor cleanup of sfc-provider unit tests

- removed all warnings
- removed old references to the removed OpendaylightSfc class
- removed duplicate entry in sfc-model/pom.xml
- patchSet 2: addressed code review comments

Change-Id: I149acf7c7e84ee98ffe12f2604bc15a78a87846f
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoFix a bug in the refactored ScfListener 73/48473/2
Miguel Duarte [Fri, 18 Nov 2016 11:35:40 +0000 (12:35 +0100)]
Fix a bug in the refactored ScfListener

The SfcScfOfDataListener was recently refactored, replacing the
onDataChanged notification method by an onDataTreeChanged method.

In that change, the lines that initializes/closes the listeners got
lost, making the SCF feature deaf/blind to classifiers being added /
deleted.

Change-Id: I77104b30c87939156cd4458fef4a6f9859bbbabe
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoRemove flake8 warnings from sfc-test 67/48467/2
George Paraskevopoulos [Fri, 18 Nov 2016 10:08:39 +0000 (12:08 +0200)]
Remove flake8 warnings from sfc-test

Change-Id: Ie2a1bcd11ee6095e62158ffaf9cb24246f588967
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
8 years agoBUG 7196 : Doc style changes to README file 36/48436/4
venkatamahesh [Thu, 17 Nov 2016 12:32:45 +0000 (18:02 +0530)]
BUG 7196 : Doc style changes to README file

At present the commands in this file are combined with
text lines. In this patch I have modified the style to
quick understanding.

Signed-off-by: venkatamahesh kotha <venkatamaheshkotha@gmail.com>
Change-Id: I60d163b94b649f6bafc40abaf00c7a8e75b5ba84

8 years agoRemoving last parts of the old renamed SFCOFL2 feature 95/48395/3
Brady Johnson [Wed, 16 Nov 2016 09:08:19 +0000 (10:08 +0100)]
Removing last parts of the old renamed SFCOFL2 feature

- The feature was still in the karaf features as deprecated.
  It has now been removed.
- There was a stale reference to sfcofl2 in the pom.xml

Change-Id: I88b465977fd4cc65872e30763113c09114dae987
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoReplace onDataChanged method in SfcScfOfDataListener 09/48409/2
Ursicio Martin [Wed, 16 Nov 2016 13:52:29 +0000 (14:52 +0100)]
Replace onDataChanged method in SfcScfOfDataListener

Change-Id: I3bf931099d86287cf0deeba68c1406b8dc658fc7
Signed-off-by: Ursicio Martin <ursicio.javier.martin@ericsson.com>
8 years agoNo prefix required for type parameter of SF 98/48398/2
swatideshpande [Wed, 16 Nov 2016 12:33:13 +0000 (04:33 -0800)]
No prefix required for type parameter of SF

sfc-ui,is adding prefix "service-function-type:" for SF type.
i.e if Service Function type is selected as 'firewall',SF type gets set
as "type":"service-function-type:firewall".

The prefix is not required to be added, it suffices to set type as
firewall/dpi/ids etc. The prefix is causing SF creation failure in
sfc_agent.

Bug:7179
Change-Id: I26381def21b987ff9b1ef46a0493791222e76ddd
Signed-off-by: swatideshpande <swati.deshpande@serro.com>
8 years agoNew configuration examples for SFC - Logical SFF 95/47895/6
eceujmm [Thu, 3 Nov 2016 14:19:39 +0000 (15:19 +0100)]
New configuration examples for SFC - Logical SFF

Change-Id: I07699cdd531576de3f030d22bc6cdc52bca54a26
Signed-off-by: eceujmm <ursicio.javier.martin@ericsson.com>
8 years agoAdd XML encoding to pom.xml and formatting. 27/48327/3
David Suarez [Mon, 14 Nov 2016 16:06:03 +0000 (17:06 +0100)]
Add XML encoding to pom.xml and formatting.

Change-Id: I5eef334cb47ae509dba0bdb0d946fa283adc7476
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoIntegrate classifier w/ genius - commit #1 60/48260/6
Miguel Duarte [Fri, 11 Nov 2016 13:14:01 +0000 (14:14 +0100)]
Integrate classifier w/ genius - commit #1

For the logical SFF feature, the existent SFC classifier has to be
integrated w/ genius, for 2 reasons:
  - currently, it writes to table 0, which is owned by genius. It should
    write to a different table
  - logical sff requires the classifier to steer packets based on the
    dpn IDs of the OVS switches hosted in the compute nodes where the
    classifier / first SFF are located

This commit prepares the ground for that functionality, which will be
added in the next commit.

The genius service binding is exposed as an API, thus
enabling the classifier to leverage it.

The openflow writer, is also exposed as an API, thus enabling the
classifier to also leverage its functionallity (install multiple flows
within the same transaction object).
  - Trasactional support for the classifier was not used, but for
    logical SFF scenarios *is* required, because we cannot bind an
    interface to genius and not install its respective flows.

Additionally, the TableIndexMapper is also modified, registering the
classifier table.

Finally, the one of the geniusRPCs is also modified, allowing for an
offset to be added - this way, the actions gotten from genius can be
appended to another list of actions.

Change-Id: If849f5f3f66ef295c48d76e0bc52d9b57d8891c4
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoReplace deprecated DataChangeListener in SF Scheduler Type 14/48214/6
eceujmm [Thu, 10 Nov 2016 14:34:39 +0000 (15:34 +0100)]
Replace deprecated DataChangeListener in SF Scheduler Type

Change-Id: I793dda563e6e4788d8f5bbb6d1b36dc4cf4828f7
Signed-off-by: eceujmm <ursicio.javier.martin@ericsson.com>
8 years agoSfcGeniusRpcClient singleton removal 01/47901/9
Diego Granados [Thu, 3 Nov 2016 15:21:30 +0000 (16:21 +0100)]
SfcGeniusRpcClient singleton removal

SfcGeniusRpcClient implementation as a singleton was temporary: done
that way in order not to interfere with upcoming blueprint impl,
but needed to be fixed (e.g. it was making component test harder).
Fixed

Change-Id: Ief23609b13396cae35c3fe2c06027ce5b284d4b8
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoChange clustered listener by the single one. 50/48350/2
David Suarez [Tue, 15 Nov 2016 08:41:09 +0000 (09:41 +0100)]
Change clustered listener by the single one.

Change clustered listener by the single one since there is no
need for all the cluster members to get notified.

Minor changes in Copyrights.

Change-Id: I1d9067bd15a46f0e9fac917d3af1207df848b48d
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoBug 7181 - "Bug 6768: The OpendaylightSfc class should be refactored..." has a bug... 21/48321/2
guillermo tomasini [Mon, 14 Nov 2016 15:24:06 +0000 (16:24 +0100)]
Bug 7181 - "Bug 6768: The OpendaylightSfc class should be refactored..." has a bug in sfc-provider.xml

Change-Id: Ib0174acf337e755fd12db0e6823c48dc50af9e17
Signed-off-by: g tomasini <guillermo.pablo.tomasini.redondas@ericsson.com>
8 years agoReorder the organization to avoid YANG editor complaints. 33/48233/1
David Suarez [Thu, 10 Nov 2016 20:02:10 +0000 (21:02 +0100)]
Reorder the organization to avoid YANG editor complaints.

Minor change to avoid YANG editor complaints.

Change-Id: Ia4fca6cfa050a9030e300b32721fd265d0123167
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoBug 6768: The OpendaylightSfc class should be refactored... 48/46348/16
guillermo tomasini [Tue, 11 Oct 2016 13:09:48 +0000 (15:09 +0200)]
Bug 6768: The OpendaylightSfc class should be refactored...

Change-Id: I0e079aecee87768e40787b2a86209b7b36d30e9e
Signed-off-by: g tomasini <guillermo.pablo.tomasini.redondas@ericsson.com>
8 years agoEnable activation of feature odl-sfc-genius 00/46300/3
Jaime Caamaño Ruiz [Thu, 29 Sep 2016 14:26:55 +0000 (16:26 +0200)]
Enable activation of feature odl-sfc-genius

Add feature 'odl-sfc-genius' that functionally enables SFC integration
with Genius. This allows configuring a logical SFF and SFs attached to
this logical SFF via logical ports/interfaces (i.e. neutron ports).

Change-Id: Ieaec3f68d9bbb74324f97d5406b97176f35a1f20
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoMerge "Add a load/path-aware Service Function Scheduler API."
Brady Johnson [Thu, 10 Nov 2016 07:44:27 +0000 (07:44 +0000)]
Merge "Add a load/path-aware Service Function Scheduler API."

8 years agoAdd a load/path-aware Service Function Scheduler API. 32/46932/2
Dongeun Suh [Fri, 14 Oct 2016 06:47:32 +0000 (15:47 +0900)]
Add a load/path-aware Service Function Scheduler API.

Most of the scheduler code are based on the two existing Service Function Schedulers
(SfcServiceFunctionLoadBalanceSchedulerAPI.java, SfcServiceFunctionLoadBalanceSchedulerAPI.java)

Change-Id: I4dc98dd7da07308a50c23bf76343ab031d42e23a
Signed-off-by: Dongeun Suh <dongeunsuh@gmail.com>
8 years agoAdd sfc104 demo 31/47831/7
Yi Yang [Wed, 2 Nov 2016 11:34:26 +0000 (19:34 +0800)]
Add sfc104 demo

Current sfc103 demo is totoally docker container based, so it can't run with OVS DPDK and VPP.

This sfc104 demo has many improvements compared to sfc103 demo, including:

  * Only install a VM once, then import this new VM for all Classifiers, SFs and SFFs.
  * VMs can be used for demos repeatedly, you mustn't repeat VMs installation.
  * ODL SFC is started by you instead of this demo, so you can use this demo to test your ODL SFC development branch.
  * it includes three demos for OVS, OVS DPDK and VPP, respectively. These demos leverage the same vagrant VMs, so you are unncessary to create new vagrant VMs.
  * You can copy sfc104 to any other place to run, it doesn't depend on any other sfc code.

Change-Id: I95f5d153ddde09e49bc934905931fe789408b4e3
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agoUpdate RSP on VM migration for sfc-genius 29/47429/12
Jaime Caamaño Ruiz [Fri, 30 Sep 2016 15:08:17 +0000 (17:08 +0200)]
Update RSP on VM migration for sfc-genius

A VM migration is detected when the interface state corresponding to
the neutron port is created. This signals the end of a process that
started when that interface state was previously removed.

Once the interface state is created, all the RSPs relying on that
interface are re-rendered. This is achieved by first deleting the RSP
and then creating it again.

Change-Id: Ia1564976540a0eae2fd3ccfe3f9c5d59b63e1424
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoUnit Test for ServiceFunctionClassifierListener 91/47891/4
eceujmm [Thu, 3 Nov 2016 13:29:09 +0000 (14:29 +0100)]
Unit Test for ServiceFunctionClassifierListener

Change-Id: Ib3ddede453888d216d53a43cc0a9031b1a7e5a32
Signed-off-by: eceujmm <ursicio.javier.martin@ericsson.com>
8 years agoBug 7089: Logical SFF - Operational datastore 46/47846/7
Diego Granados [Wed, 2 Nov 2016 09:37:26 +0000 (10:37 +0100)]
Bug 7089: Logical SFF - Operational datastore

LSFF operational datastore implementation, including:
- RSP state: now RSPs which use a logical SFF are
  updated after rendering with information about the
  data plane node used in each hop
- SFF state: Logical SFFs now keep a list of dpn-ids
  for all the switches participating in the LSFF,
  including the list of RSPs using each switch. Yang
  model was updated (the existing one already contained
  a section aiming to hold this info, but was incorrect)
- SFF state: dictionary info for logical SFF has been
  removed from the model (will not be implemented; was
  redundant with the dpnid info included in the RSPs)

Operational datastore updates are performed transactionally
and asynchronously (in a separate thread) in order not
to delay the release of the RSP rendering lock. A separate
DS transaction than the one used for flows is used (the
one for flows is not exposed to the renderer; exposing it
breaks encapsulation principle in SfcFlowWriterImpl ->
considered not worth)

Change-Id: Iedc28fc37bd772218cb22d686931f9e6a22ae656
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years ago Bug 7087: ServiceFunctionClassifierListener - Invalid Update Operation 46/48046/1
eceujmm [Mon, 7 Nov 2016 11:56:27 +0000 (12:56 +0100)]
 Bug 7087: ServiceFunctionClassifierListener - Invalid Update Operation

Change-Id: I710d9b88547a31d72b1a3231aa398440b4df2f6a
Signed-off-by: eceujmm <ursicio.javier.martin@ericsson.com>
8 years agoPorting SFF/SF update changes from stable/boron 00/48000/2
Brady Johnson [Fri, 4 Nov 2016 10:53:11 +0000 (11:53 +0100)]
Porting SFF/SF update changes from stable/boron

- Originally fixed in stable/boron for BUG 7039
- couldnt do a straight cherry-pick, so the changes
  had to be manually ported.

Change-Id: Ie9c51ed14564bb3077591f913c94b641c0c98683
Signed-off-by: Brady Johnson <brady.allen.johnson@ericsson.com>
8 years agoEnable NSH-based service function chaining on OVS DPDK 24/46924/6
Yi Yang [Fri, 14 Oct 2016 00:11:21 +0000 (08:11 +0800)]
Enable NSH-based service function chaining on OVS DPDK

For OVS DPDK use case, dpdk0 is a physical Ethernet
interface, br-int needs to be configured IP address
to handle management traffic, you can imagine dpdk0
as ethX. In addtion, VxLAN-gpe + NSH implementation
for DPDK in Intel OVS NSH patches also needs some
complementary flows to receive and send VxLAN-gpe +
NSH packets. So we have to add some flows similar to
the below for br-int in case of OVS DPDK:

table=0, in_port=1 actions=NORMAL
table=0, in_port=LOCAL actions=output:1

Here port 1 is dpdk0.

This patch can detect OVS DPDK and dpdk0 therefore add
necessary flows into SFC table 0, it will do
nothing for non-DPDK ovs.

In order to make sure br-int is configured correctly
and can work with next SFF, you must add ARP entry and
route entry for br-int, here is an example for reference:

$ sudo ovs-appctl tnl/arp/set br-int 192.168.50.75 08:00:27:bf:ae:0d
$ sudo ovs-appctl ovs/route/add 192.168.50.75/24 br-int

Change-Id: Ieea5599690ea7046f85d2b59926625042b2dbfe3
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8 years agoBug 6278: Switch to use odlparent's karaf-parent 92/43292/6
Ryan Goulding [Sun, 7 Aug 2016 23:34:12 +0000 (19:34 -0400)]
Bug 6278: Switch to use odlparent's karaf-parent

Change-Id: Ic379884ea79e0c648dae997ab234c4ac0b0e477f
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
8 years agoMinor changes. 71/47071/3
David Suarez [Tue, 18 Oct 2016 13:08:16 +0000 (15:08 +0200)]
Minor changes.

Changes in copyright section and a method name.

Change-Id: I5f088c99a516daf474f8f2f2f76cfb7094b2a3c8
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoReplace deprecated DataChangeListener in SF Classifier. 88/47488/2
David Suarez [Wed, 19 Oct 2016 22:52:38 +0000 (00:52 +0200)]
Replace deprecated DataChangeListener in SF Classifier.

Change deprecated DataChangeListener by the new DataTreeChangeListener
in Service Function Classifier.

Change-Id: Ic10ec32c9c508396ad0dbef194da45a914428f40
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoFix unchecked operation warnings on sfc-genius tests 99/46299/3
Jaime Caamaño Ruiz [Wed, 21 Sep 2016 18:07:39 +0000 (20:07 +0200)]
Fix unchecked operation warnings on sfc-genius tests

Change-Id: I95b3b71e7ebbf0bbc76bbac057aa176922e87271
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoSFC openflow renderer: remove RuntimeException as a communication mechanism 13/47013/7
eceujmm [Mon, 17 Oct 2016 11:55:54 +0000 (13:55 +0200)]
SFC openflow renderer: remove RuntimeException as a communication mechanism

Conflicts:
sfc-renderers/sfc-openflow-renderer/src/main/java/org/opendaylight/sfc/ofrenderer/processors/SfcRspProcessorLogicalSff.java

Change-Id: Ib79a96e5341326c5a0beb94946e5c7d0eca0fa65
Signed-off-by: eceujmm <ursicio.javier.martin@ericsson.com>
8 years agoCorrections in mac handling for logical sff 60/46760/5
Diego Granados [Thu, 6 Oct 2016 16:02:59 +0000 (18:02 +0200)]
Corrections in mac handling for logical sff

Included changes:
- nextHop: inner dst mac address was being changed instead of
     the one in the eth encapsulation header (fixed). Also, added
     the src mac address, so the packet can be correctly forwarded
     (by switching src and dst mac) after SF processing
- changed src mac address at chain egress so the packet won't
     be dropped because of bad src mac at subsequent pipeline
     stages
- Table 0 (classifier) table is no longer written by Logical
     transport processor in any circumstance (logical SFF is
     always used in cooperation with Genius -> Genius owns
     table 0 always (it is used for service binding)
- Some test improvements

Change-Id: I1f344604801f0855cc35ea27885de91427766f24
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoChange deprecated DataChangeListener. 43/47043/5
David Suarez [Mon, 17 Oct 2016 23:07:31 +0000 (01:07 +0200)]
Change deprecated DataChangeListener.

Change deprecated DataChangeListener by the new DataTreeChangeListener.

Change-Id: I81f84548f97930da80ebb72ef07d9c6599220189
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agofix for netconf model change 41/47341/1
Diego Granados [Fri, 21 Oct 2016 11:13:24 +0000 (13:13 +0200)]
fix for netconf model change

 - fixes changes made in https://git.opendaylight.org/gerrit/#/c/43972/,
   which was breaking SFC build

Change-Id: Ib29dfed9f6f80493b4ef0d8ff5ab5677e45666ca
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoBind SFC service to interface in sfc-genius 00/46000/10
Jaime Caamaño Ruiz [Wed, 21 Sep 2016 15:04:56 +0000 (17:04 +0200)]
Bind SFC service to interface in sfc-genius

Performs bind of SFC service for the logical interfaces handled through
Genius. Includes adding the SFC terminating service action to the
interface node, which handles SFC traffic incoming through tunnel, if
it is the first interface bound to SFC service on the node.

Some comments about the solution implemented through this patch:

- For Boron it is expected to have a independent vxlan-gpe tunnel mesh
that uses a VNID of 0 for all SFC traffic.
- Using a rather uninspired flow priority and cookie for the rule that is
added on the genius dispatcher table through the binding. Feedback
welcome.

Change-Id: Iee00923a1e18e61902dc2c2218f7a4e84717da27
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
8 years agoBump SFC versions and remove incorrent parent versions 01/47001/2
Miguel Angel Munoz Gonzalez [Mon, 17 Oct 2016 08:26:39 +0000 (10:26 +0200)]
Bump SFC versions and remove incorrent parent versions

sfc-ui/module/pom.xml included a hardcoded version reference
from the dlux project. Now it is dependent on sfc-ui and
sfc-ui depends on sfc parent pom.

Change-Id: I5da41297b8ef7836b03856e32ebdeb5d223412db
Signed-off-by: Miguel Angel Munoz Gonzalez <miguel.angel.munoz.gonzalez@ericsson.com>
8 years agoChange deprecated DataChangeListener by the new DataTreeChangeListener. 52/46752/7
David Suarez [Tue, 11 Oct 2016 07:45:05 +0000 (09:45 +0200)]
Change deprecated DataChangeListener by the new DataTreeChangeListener.
It adds two abstract listeners to simplify the process of creating new
listeners.

Change-Id: Ia00fded0029fa34e9b9bf85c2d779094d8ebff6f
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoHardcode sfc-ui version to avoid compilation warning 37/46937/2
Miguel Angel Munoz Gonzalez [Fri, 14 Oct 2016 08:34:58 +0000 (10:34 +0200)]
Hardcode sfc-ui version to avoid compilation warning

sfc-ui module version is set to fixed valud 0.5.0-SNAPSHOT
temporarily to fix the blocker issue caused by
https://git.opendaylight.org/gerrit/#/c/46730/

Further discussions are being held to remove the version tag
from this module and inherit from parent project, maybe
requiring bumping the versions.

Change-Id: I62d19f6a3c48af2d3be48accf1f27867d57bf874
Signed-off-by: Miguel Angel Munoz Gonzalez <miguel.angel.munoz.gonzalez@ericsson.com>
8 years agoFix NPE when clearing SFF initialization flows 46/46946/1
Miguel Duarte [Fri, 14 Oct 2016 12:50:40 +0000 (14:50 +0200)]
Fix NPE when clearing SFF initialization flows

NPE whenever initialization flows did not exist (for instance, no RSP
ever created). Fixed by checking their existence before filtering
the ones that belong to orphan SFFs.

Change-Id: Id5601c630395551d031658de8e74f847904c6124
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoRemove technical debt from the project. 62/46762/4
Miguel Duarte [Tue, 11 Oct 2016 08:59:22 +0000 (10:59 +0200)]
Remove technical debt from the project.

Added a couple of tests to SfcOfRspTransactionalProcessorTest, thus
checking that attempting to delete a nonexistent RSP does not crash the
process.

Hid the constructors of some classes that only contain static methods.

Refactored the OpenFlowProgrammer, thus removing plenty of duplicated
code.

Logged the exceptions on the SfcOfFlowWriterImpl, thus removing sonar
warnings.

Change-Id: I8771897ec5026f255c8def7e7627275eb5ec90c8
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoRemove Maven warnings for using variable in version 30/46730/2
Miguel Angel Munoz Gonzalez [Mon, 10 Oct 2016 14:09:46 +0000 (16:09 +0200)]
Remove Maven warnings for using variable in version

This commit fixes the warning for using a variable in the
version tag of the artifact.
The artifact should get the version from the parent pom.
Note that variables in version tag should not be allowed.

Change-Id: I2cafc4609e27c74ea0874b4a0c3bbf4fc1707cdd
Signed-off-by: Miguel Angel Munoz Gonzalez <miguel.angel.munoz.gonzalez@ericsson.com>
8 years agoLogical SFF component test 55/46455/7
Miguel Duarte [Fri, 30 Sep 2016 09:16:14 +0000 (11:16 +0200)]
Logical SFF component test

Features a component test of the RspProcessor used when the SFC uses a
logical SFF. The test features and end to end scenario of 2 SFs,
connected through a logical SFF entity. The genius RPC, and the genius
data utils are mocked.

The test provided 'simulates' a single compute node being used, since
the mocked genius RPC is returning the same dataplane ID, independently
of the logical interface being queried.

Notes:
- Added a couple of methods to the SfcGeniusDataUtils class, thus
entirely replacing the API of SfcLogicalInterfaceOfUtils.
- Removed SfcLogicalInterfaceOfUtils, since SfcGeniusDataUtils provides
the same functionality, but using better abstractions, and has been
extensively unit tested.
- Replaced the calls to this API throughout the code, namely, in the
processor classes.
- Changes add to be made to the RspBuilder class, enabling logical SFFs to
be used in unit/component tests.
- An empty constructor had to be added to the OpenFlowProgrammer class, so
that it could be mocked / spied in unit tests.

Change-Id: I32de81363ad69d6a8ca0cb32aaa061887ebbf76f
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoAdd Genius-based app coexistence (table index mapping) 22/46622/6
Diego Granados [Tue, 4 Oct 2016 12:46:53 +0000 (14:46 +0200)]
Add Genius-based app coexistence (table index mapping)

Added logic for performing translation between a set of external SFC
table indexes and the table indexes which are reserved by Genius for those tables.
For doing so, the client module (sfc renderers using Genius) first builds a
SfcTableIndexMapper (using the convenience SfcTableIndexMapperBuilder
class) by providing the table indexes it uses for each SFC table (this
mechanism exists in order not to have a circular dependency between
sfc-genius and the sfc renderer). Later, at flow writing time, the flow
programmer will use the mapping class in order to retrieve the correct
table indexes for each SFC table

In short, this logic allows to perform Genius-based application coexistence
at table level, while keeping the previous application coexistence when
genius is not used

Change-Id: I536ce79fde7d1960db9d3192a11ba9088e367806
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoUpdate ODL integration maven repo 09/46709/1
Guo Ruijing [Sun, 9 Oct 2016 20:39:04 +0000 (16:39 -0400)]
Update ODL integration maven repo

Change-Id: Ib640308b72bc5d90d9a24a59c1d3dd3fc060cc85
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
8 years agoMove sfc-provider listeners to their own package following the typical 76/46676/2
David Suarez [Fri, 7 Oct 2016 13:44:24 +0000 (15:44 +0200)]
Move sfc-provider listeners to their own package following the typical
structure
in other bundles.

Change-Id: I0f30502ff96d9bb94a6b0eac809e3f8b2f1ce084
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoAdd BP wiring for sfc-pot 50/45450/3
Rashmi Pujar [Fri, 9 Sep 2016 21:21:58 +0000 (17:21 -0400)]
Add BP wiring for sfc-pot

Change-Id: I3cac8051a891fd2a7fe229c8eaeaaebc992f1573
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoAdd BP wiring for sfc-sb-rest 49/45449/3
Rashmi Pujar [Fri, 9 Sep 2016 21:02:06 +0000 (17:02 -0400)]
Add BP wiring for sfc-sb-rest

Change-Id: I5d55db2e18842e7f915b383a2c9976fca76e980e
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoAdd BP wiring for sfc-lisp 44/45444/3
Rashmi Pujar [Fri, 9 Sep 2016 20:11:18 +0000 (16:11 -0400)]
Add BP wiring for sfc-lisp

Change-Id: I822a4d22113ea97cc6766af6f69816d2cb24fde8
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoAdd BP wiring for sfc-vpp-renderer 43/45443/3
Rashmi Pujar [Fri, 9 Sep 2016 19:13:39 +0000 (15:13 -0400)]
Add BP wiring for sfc-vpp-renderer

Change-Id: I5cd39e31c4cadabe9eaf5b253b31ee97296df2a1
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoAdd BP wiring for sfc-scf-openflow 40/45440/4
Rashmi Pujar [Fri, 9 Sep 2016 18:36:03 +0000 (14:36 -0400)]
Add BP wiring for sfc-scf-openflow

Change-Id: I48692a63f6ffe3d10c4442b9d1cc11c7adc58a4b
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoAdd blueprint wiring for sfc-ovs bundle 38/45438/3
Rashmi Pujar [Fri, 9 Sep 2016 17:39:28 +0000 (13:39 -0400)]
Add blueprint wiring for sfc-ovs bundle

Change-Id: Ib5feb7fdfacc7528ff43bfdab2b45eb16cdce3cb
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
8 years agoUtilities for Genius related datastore operations 34/46134/9
Miguel Duarte [Fri, 23 Sep 2016 13:50:52 +0000 (15:50 +0200)]
Utilities for Genius related datastore operations

  - Utils for genius data retrieval, namely the MAC address of the service
    function, connected through a neutron port, and the name of the
    logical interface to which a service function is connected to. This
    data is required for the Logical SFF feature.
  - Unit Tests of the supplied classes

Change-Id: I7acd13504b489330854a6a79da07c5f0433c06da
Signed-off-by: Miguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
8 years agoMinor formatting and checkstyle changes to improve readability. 65/46565/7
David Suarez [Wed, 5 Oct 2016 16:38:45 +0000 (18:38 +0200)]
Minor formatting and checkstyle changes to improve readability.

Change-Id: I4a9832c419d00c7ad50b4000b15534e0759b3b71
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
8 years agoNew transport processor for Logical SFF 02/46302/9
Diego Granados [Thu, 28 Jul 2016 12:23:05 +0000 (14:23 +0200)]
New transport processor for Logical SFF

Created a new RSP processor class for chains which use Logical SFFs.
On such chains, SFF configuration is trivial (it only defines SFF name),
while SFs attached to the logical SFF define use Logical Interfaces as DPL.
That logical interfaces are used to gather all required information for
path rendering via Genius project

Transport protocols are the same than in the NshEth processor (that is,
Eth+NSH between the SFF and SF, and VXGPE+NSH between the SFFs)

Change-Id: Ic8175c02006f7b6c08120941b7e535d551c3f56a
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>
8 years agoUnbind SFC service from interface on sfc-genius. 84/45884/7
Jaime Caamaño Ruiz [Fri, 30 Sep 2016 14:36:16 +0000 (16:36 +0200)]
Unbind SFC service from interface on sfc-genius.

Performs unbind of SFC service for the logical interfaces handled
through Genius. Includes removing the SFC terminating service action
from the interface node, which handles SFC traffic incoming through
tunnel, if there are no more interfaces bound to SFC service on the
node.

A handler is setup for this task, SfcGeniusServiceHandler, which
coordinates the task through more sub-handlers specialized in read and
write operations through asynchronous APIs. JDK8 new CompletableFuture
is leveraged to asynchronously chain read & write asynchronous
operations.

For the time being, the module stores in-memory the data plane node
location of each interface (dpnInterfaces map), which is an information
needed to handle the terminating service actions. On a later patch, this
will be stored in the SFC operational data store.

The implementation is asynchronous for the following reasons:
- Javadoc of APIs recommend using the asynchronous interfaces over
  the synchronous ones.
- With the introduction of JDK8, more code facilities are available to
  produce asynchronous readable code.
- Being sfc-genius an independent small module, it's deemed a good
  chance to get a taste for it.

Change-Id: I145b4eb0aa6a4f17ff0c3bd8344a0486d8d7be96
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>