diff options
Diffstat (limited to 'grToolkit')
3 files changed, 11 insertions, 4 deletions
diff --git a/grToolkit/provider/pom.xml b/grToolkit/provider/pom.xml index 64de68eb..2789a20a 100755 --- a/grToolkit/provider/pom.xml +++ b/grToolkit/provider/pom.xml @@ -49,6 +49,10 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>annotations</artifactId> + </dependency> + <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-test-model</artifactId> <scope>test</scope> diff --git a/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java b/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java index 14e27ef3..7a8b3deb 100755 --- a/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java +++ b/grToolkit/provider/src/main/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProvider.java @@ -217,7 +217,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT * on a single line. */ private void defineMembers() { - member = configDatastore.getActorContext().getCurrentMemberName().getName(); + member = configDatastore.getActorUtils().getCurrentMemberName().getName(); log.info("defineMembers(): Cluster member: {}", member); log.info("defineMembers(): Parsing akka.conf for cluster memberMap..."); @@ -452,6 +452,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT * @deprecated No longer used since the refactor to use the HealthResolver * pattern. Retained so the logic can be replicated later. */ + @Deprecated private void isolateSiteFromCluster(ArrayList<ClusterActor> activeSite, ArrayList<ClusterActor> standbySite, String port) { log.info("isolateSiteFromCluster(): Halting Akka traffic..."); for(ClusterActor actor : standbySite) { @@ -486,6 +487,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT * @deprecated No longer used since the refactor to use the HealthResolver * pattern. Retained so the logic can be replicated later. */ + @Deprecated private void downUnreachableNodes(ArrayList<ClusterActor> activeSite, ArrayList<ClusterActor> standbySite, String port) { log.info("downUnreachableNodes(): Setting site unreachable..."); JSONObject jolokiaInput = new JSONObject(); @@ -521,6 +523,7 @@ public class GrToolkitProvider implements AutoCloseable, GrToolkitService, DataT * @deprecated No longer used since the refactor to use the HealthResolver * pattern. Retained so the logic can be replicated later. */ + @Deprecated private void backupMdSal(ArrayList<ClusterActor> activeSite, String port) { log.info("backupMdSal(): Backing up data..."); try { diff --git a/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java b/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java index 3be15959..edd6d1b8 100644 --- a/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java +++ b/grToolkit/provider/src/test/java/org/onap/ccsdk/sli/plugins/grtoolkit/GrToolkitProviderTest.java @@ -35,7 +35,7 @@ import org.onap.ccsdk.sli.plugins.grtoolkit.data.ClusterActor; import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; -import org.opendaylight.controller.cluster.datastore.utils.ActorContext; +import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; @@ -101,11 +101,11 @@ public class GrToolkitProviderTest { dbLibService = mock(DbLibService.class); connection = mock(DBLibConnection.class); - ActorContext actorContext = mock(ActorContext.class); + ActorUtils actorContext = mock(ActorUtils.class); MemberName memberName = MemberName.forName("Test"); when(actorContext.getCurrentMemberName()).thenReturn(memberName); - when(configDatastore.getActorContext()).thenReturn(actorContext); + when(configDatastore.getActorUtils()).thenReturn(actorContext); try { when(connection.isReadOnly()).thenReturn(false); |