import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Simple implementation providing bulk flows operations.
*/
public class SalBulkFlowServiceImpl implements SalBulkFlowService {
+ private static final Logger LOG = LoggerFactory.getLogger(SalBulkFlowServiceImpl.class);
+
private final SalFlowService flowService;
private final DataBroker dataBroker;
private final FlowCounter flowCounterBeanImpl = new FlowCounter();
} catch (MalformedObjectNameException | InstanceAlreadyExistsException
| MBeanRegistrationException | NotCompliantMBeanException e) {
rpcResultBuilder = RpcResultBuilder.failed();
- e.printStackTrace();
+ LOG.warn("Exception occurred: {} ", e.getMessage(), e);
}
return Futures.immediateFuture(rpcResultBuilder.build());
}
import com.google.common.base.Optional;
import com.google.common.util.concurrent.Futures;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Unit tests for StatListenCommitFlow.
*/
public class StatListenCommitFlowTest {
+ private static final Logger LOG = LoggerFactory.getLogger(StatListenCommitFlowTest.class);
+
@Mock
private NotificationProviderService mockNotificationProviderService;
method.setAccessible(true);
method.invoke(statCommitFlow, argObjects);
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error("Exception occurred: {} ", e.getMessage(), e);
fail(e.getCause().toString());
}
}
method.setAccessible(true);
method.invoke(statCommitFlow, argObjects);
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error("Exception occurred: {} ", e.getMessage(), e);
fail(e.getCause().toString());
}
}
method.setAccessible(true);
method.invoke(statCommitFlow, argObjects);
} catch (Exception e) {
- e.printStackTrace();
+ LOG.error("Exception occurred: {} ", e.getMessage(), e);
fail(e.getCause().toString());
}
}
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.binding.Notification;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class NotificationProviderServiceHelper {
+
+ private static final Logger LOG = LoggerFactory.getLogger(NotificationProviderServiceHelper.class);
+
private NotificationProviderService notifBroker = new NotificationProviderServiceDummyImpl();
public NotificationProviderService getNotifBroker() {
void propagateNotification(Notification notification) {
try {
- m.invoke(listenerInst, new Object[]{notification});
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
+ m.invoke(listenerInst, notification);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ LOG.error("Exception occurred: {} ", e.getMessage(), e);
}
}
RemoveFlowOutput result = removeFlowOutput.build();
RpcResult<RemoveFlowOutput> rpcResult = assembleRpcResult(input, result);
- LOG.debug(MSG_ADD_FLOW_RPC);
+ LOG.debug("Returning the Remove Flow RPC result to MD-SAL");
return rpcResult;
}
RemoveGroupOutput result = removeGroupOutput.build();
RpcResult<RemoveGroupOutput> rpcResult = assembleRpcResult(input, result);
- LOG.debug(MSG_ADD_FLOW_RPC);
+ LOG.debug("Returning the Remove Group RPC result to MD-SAL");
return rpcResult;
}
RemoveMeterOutput result = removeMeterOutput.build();
RpcResult<RemoveMeterOutput> rpcResult = assembleRpcResult(input, result);
- LOG.debug("Returning the Add Meter RPC result to MD-SAL");
+ LOG.debug("Returning the Remove Meter RPC result to MD-SAL");
return rpcResult;
}
};