Logical SFF component test 55/46455/7
authorMiguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
Fri, 30 Sep 2016 09:16:14 +0000 (11:16 +0200)
committerMiguel Duarte <miguel.duarte.de.mora.barroso@ericsson.com>
Mon, 10 Oct 2016 14:59:03 +0000 (16:59 +0200)
commitbab8a99472f5b9ea7f01e4ea03f317a8a3f16c99
tree1624e096ffcedf3d3003d7510e59c906abfa37d5
parentf46acb356cb4c2523a85ef4e7a573407105cc499
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>
sfc-genius/src/main/java/org/opendaylight/sfc/genius/util/SfcGeniusDataUtils.java
sfc-genius/src/main/java/org/opendaylight/sfc/genius/util/SfcGeniusUtilsDataGetter.java
sfc-genius/src/test/java/org/opendaylight/sfc/genius/util/SfcGeniusDataUtilsTest.java
sfc-renderers/sfc-openflow-renderer/src/main/java/org/opendaylight/sfc/ofrenderer/openflow/SfcOfFlowProgrammerImpl.java
sfc-renderers/sfc-openflow-renderer/src/main/java/org/opendaylight/sfc/ofrenderer/processors/SfcOfRspProcessor.java
sfc-renderers/sfc-openflow-renderer/src/main/java/org/opendaylight/sfc/ofrenderer/processors/SfcRspProcessorLogicalSff.java
sfc-renderers/sfc-openflow-renderer/src/main/java/org/opendaylight/sfc/ofrenderer/utils/SfcLogicalInterfaceOfUtils.java [deleted file]
sfc-renderers/sfc-openflow-renderer/src/test/java/org/opendaylight/sfc/ofrenderer/RspBuilder.java
sfc-renderers/sfc-openflow-renderer/src/test/java/org/opendaylight/sfc/ofrenderer/processors/SfcOfLogicalSffRspProcessorTest.java [new file with mode: 0644]