X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fservices%2Fsal%2FSalGroupServiceImpl.java;h=7c14b0deeba3bad9534451f23af4558ace789623;hb=211844a4fda1b9ab05732680697ca507e952a285;hp=042e5a8cd22854733f1b26f2f47803fdcff9df62;hpb=f1af4f7f93a7d7e27b85dc1b45e725a531799f26;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImpl.java old mode 100644 new mode 100755 index 042e5a8cd2..7c14b0deeb --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupServiceImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the @@ -11,7 +11,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; -import java.util.concurrent.Future; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack; import org.opendaylight.openflowplugin.impl.services.multilayer.MultiLayerGroupService; @@ -66,7 +65,7 @@ public class SalGroupServiceImpl implements SalGroupService { } @Override - public Future> addGroup(final AddGroupInput input) { + public ListenableFuture> addGroup(final AddGroupInput input) { final ListenableFuture> resultFuture = addGroupMessage.canUseSingleLayerSerialization() ? addGroupMessage.handleServiceCall(input) @@ -76,10 +75,7 @@ public class SalGroupServiceImpl implements SalGroupService { @Override public void onSuccess(RpcResult result) { if (result.isSuccessful()) { - if (LOG.isDebugEnabled()) { - LOG.debug("Group add with id={} finished without error", input.getGroupId().getValue()); - } - deviceContext.getDeviceGroupRegistry().store(input.getGroupId()); + LOG.debug("adding group successful {}", input.getGroupId().getValue()); } else { if (LOG.isDebugEnabled()) { LOG.debug("Group add with id={} failed, errors={}", input.getGroupId().getValue(), @@ -90,7 +86,7 @@ public class SalGroupServiceImpl implements SalGroupService { @Override public void onFailure(Throwable throwable) { - LOG.warn("Service call for adding group={} failed, reason: {}", + LOG.warn("Service call for adding group={} failed", input.getGroupId().getValue(), throwable); } @@ -100,7 +96,7 @@ public class SalGroupServiceImpl implements SalGroupService { @Override - public Future> updateGroup(final UpdateGroupInput input) { + public ListenableFuture> updateGroup(final UpdateGroupInput input) { final ListenableFuture> resultFuture = updateGroupMessage.canUseSingleLayerSerialization() ? updateGroupMessage.handleServiceCall(input.getUpdatedGroup()) @@ -123,7 +119,7 @@ public class SalGroupServiceImpl implements SalGroupService { @Override public void onFailure(Throwable throwable) { - LOG.warn("Service call for updating group={} failed, reason: {}", + LOG.warn("Service call for updating group={} failed", input.getOriginalGroup().getGroupId(), throwable); } }, MoreExecutors.directExecutor()); @@ -131,7 +127,7 @@ public class SalGroupServiceImpl implements SalGroupService { } @Override - public Future> removeGroup(final RemoveGroupInput input) { + public ListenableFuture> removeGroup(final RemoveGroupInput input) { final ListenableFuture> resultFuture = removeGroupMessage.canUseSingleLayerSerialization() ? removeGroupMessage.handleServiceCall(input) @@ -144,7 +140,6 @@ public class SalGroupServiceImpl implements SalGroupService { if (LOG.isDebugEnabled()) { LOG.debug("Group remove with id={} finished without error", input.getGroupId().getValue()); } - removeGroup.getDeviceRegistry().getDeviceGroupRegistry().addMark(input.getGroupId()); } else { LOG.warn("Group remove with id={} failed, errors={}", input.getGroupId().getValue(), ErrorUtil.errorsToString(result.getErrors())); @@ -154,7 +149,7 @@ public class SalGroupServiceImpl implements SalGroupService { @Override public void onFailure(Throwable throwable) { - LOG.warn("Service call for removing group={} failed, reason: {}", + LOG.warn("Service call for removing group={} failed", input.getGroupId().getValue(), throwable); } }, MoreExecutors.directExecutor());