From: Anil Vishnoi Date: Fri, 17 Jan 2014 13:27:23 +0000 (+0530) Subject: Fixed bug : 205 X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-1~74 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b8220f5a647c50a885deeac1b684ddb92a20ec04;ds=inline Fixed bug : 205 https://bugs.opendaylight.org/show_bug.cgi?id=205 Change-Id: Ifec5bf5c53b293d70645d534c46615f52d5b1c8e Signed-off-by: Anil Vishnoi --- diff --git a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsProvider.java b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsProvider.java index 45bc905502..bb5dea3bd5 100644 --- a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsProvider.java +++ b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsProvider.java @@ -177,34 +177,32 @@ public class StatisticsProvider implements AutoCloseable { for (Node targetNode : targetNodes){ - InstanceIdentifier targetInstanceId = InstanceIdentifier.builder(Nodes.class).child(Node.class,targetNode.getKey()).toInstance(); - NodeRef targetNodeRef = new NodeRef(targetInstanceId); + if(targetNode.getAugmentation(FlowCapableNode.class) != null){ + + spLogger.info("Send request for stats collection to node : {})",targetNode.getId()); + + InstanceIdentifier targetInstanceId = InstanceIdentifier.builder(Nodes.class).child(Node.class,targetNode.getKey()).toInstance(); + + NodeRef targetNodeRef = new NodeRef(targetInstanceId); - try { + try{ + sendAggregateFlowsStatsFromAllTablesRequest(targetNode.getKey()); - sendAggregateFlowsStatsFromAllTablesRequest(targetNode.getKey()); + sendAllFlowsStatsFromAllTablesRequest(targetNodeRef); - sendAllFlowsStatsFromAllTablesRequest(targetNodeRef); - - sendAllNodeConnectorsStatisticsRequest(targetNodeRef); + sendAllNodeConnectorsStatisticsRequest(targetNodeRef); - sendAllFlowTablesStatisticsRequest(targetNodeRef); + sendAllFlowTablesStatisticsRequest(targetNodeRef); - sendAllQueueStatsFromAllNodeConnector (targetNodeRef); - - }catch(Exception e){ - spLogger.error("Exception occured while sending statistics requests : {}",e); - } - - if(targetNode.getAugmentation(FlowCapableNode.class) != null){ - - spLogger.info("Send request for stats collection to node : {})",targetNode.getId()); - - try{ - sendAllGroupStatisticsRequest(targetNodeRef); - sendAllMeterStatisticsRequest(targetNodeRef); - sendGroupDescriptionRequest(targetNodeRef); - sendMeterConfigStatisticsRequest(targetNodeRef); + sendAllQueueStatsFromAllNodeConnector (targetNodeRef); + + sendAllGroupStatisticsRequest(targetNodeRef); + + sendAllMeterStatisticsRequest(targetNodeRef); + + sendGroupDescriptionRequest(targetNodeRef); + + sendMeterConfigStatisticsRequest(targetNodeRef); }catch(Exception e){ spLogger.error("Exception occured while sending statistics requests : {}", e); }