From f6cf4c680344527f473ff23ee8bf69010b2d0bca Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Mon, 25 Sep 2017 17:39:05 +0200 Subject: [PATCH] Fix for SfcProviderRpc and IpSgtDistribution failures SFC removed static implementation of SfcProviderRpc. This patch creates an an instance of SfcProviderRpc in SfcManager to be used instead of static implementation. IpSgtDistribution tests were failing because of errors in pom files. Once BindingNormalizedNodeCodec was refactored in MDSal tests failed because of class not found exception. Pom files were fixed to address this issue. Change-Id: If323f84f98995751b755b0aab3be04e88fc4f24e Signed-off-by: Michal Cmarada --- .../renderer/ofoverlay/SfcManager.java | 7 ++-- .../ip-sgt-distribution-service/pom.xml | 36 +++---------------- sxp-integration/pom.xml | 10 ++++-- sxp-integration/sxp-ep-provider/pom.xml | 6 ---- sxp-integration/sxp-ise-adapter/pom.xml | 6 ---- 5 files changed, 16 insertions(+), 49 deletions(-) diff --git a/renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/SfcManager.java b/renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/SfcManager.java index 9da882ef3..5bec98442 100644 --- a/renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/SfcManager.java +++ b/renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/SfcManager.java @@ -9,6 +9,7 @@ package org.opendaylight.groupbasedpolicy.renderer.ofoverlay; import com.google.common.base.Optional; +import com.google.common.base.Preconditions; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -73,6 +74,7 @@ public class SfcManager implements AutoCloseable, DataTreeChangeListener allActionInstancesIid; private final ListenerRegistration actionListener; + private final SfcProviderRpc sfcProviderRpc; /* * local cache of the RSP first hops that we've requested from SFC, @@ -110,8 +112,10 @@ public class SfcManager implements AutoCloseable, DataTreeChangeListener> result = - SfcProviderRpc.getSfcProviderRpc() - .readRenderedServicePathFirstHop(builder.build()); + sfcProviderRpc.readRenderedServicePathFirstHop(builder.build()); try { RpcResult output = diff --git a/sxp-integration/ip-sgt-distribution-service/pom.xml b/sxp-integration/ip-sgt-distribution-service/pom.xml index faa47cba8..cab9305ee 100644 --- a/sxp-integration/ip-sgt-distribution-service/pom.xml +++ b/sxp-integration/ip-sgt-distribution-service/pom.xml @@ -7,13 +7,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.opendaylight.mdsal - binding-parent - 0.12.0-SNAPSHOT - + org.opendaylight.groupbasedpolicy + sxp-integration + 0.7.0-SNAPSHOT + .. - org.opendaylight.groupbasedpolicy ip-sgt-distribution-service 0.7.0-SNAPSHOT bundle @@ -25,33 +24,6 @@ 1.6.0-SNAPSHOT - - - - org.opendaylight.controller - mdsal-artifacts - 1.7.0-SNAPSHOT - pom - import - - - org.opendaylight.sxp - sxp-core - ${sxp.version} - - - org.opendaylight.sxp - sxp-api - ${sxp.version} - - - org.opendaylight.sxp - sxp-controller - ${sxp.version} - - - - org.opendaylight.mdsal.model diff --git a/sxp-integration/pom.xml b/sxp-integration/pom.xml index 0f1ee8066..2da6f2a43 100644 --- a/sxp-integration/pom.xml +++ b/sxp-integration/pom.xml @@ -60,6 +60,11 @@ sxp-core ${sxp.version} + + org.opendaylight.sxp + sxp-controller + ${sxp.version} + @@ -75,9 +80,8 @@ org.opendaylight.controller - sal-binding-broker-impl - test-jar - test + sal-binding-broker-impl + test diff --git a/sxp-integration/sxp-ep-provider/pom.xml b/sxp-integration/sxp-ep-provider/pom.xml index 772e0746c..f6d64d13c 100755 --- a/sxp-integration/sxp-ep-provider/pom.xml +++ b/sxp-integration/sxp-ep-provider/pom.xml @@ -65,12 +65,6 @@ slf4j-log4j12 test - - org.opendaylight.controller - sal-binding-broker-impl - test-jar - test - org.powermock powermock-module-junit4 diff --git a/sxp-integration/sxp-ise-adapter/pom.xml b/sxp-integration/sxp-ise-adapter/pom.xml index 9d3fc043a..3b714a0bf 100755 --- a/sxp-integration/sxp-ise-adapter/pom.xml +++ b/sxp-integration/sxp-ise-adapter/pom.xml @@ -71,12 +71,6 @@ powermock-api-mockito test - - org.opendaylight.controller - sal-binding-broker-impl - test-jar - test - -- 2.36.6