Search in sources :

Example 1 with CounterResultBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder in project netvirt by opendaylight.

the class StatisticsImpl method getNodeConnectorResult.

private boolean getNodeConnectorResult(List<CounterResult> counters, BigInteger dpId, String portNumber) {
    CounterResultDataStructure counterResultDS = counterRetriever.getNodeConnectorCountersDirect(new NodeId(CountersUtils.getNodeId(dpId)), new NodeConnectorId(CountersUtils.getNodeConnectorId(dpId, portNumber)));
    if (counterResultDS == null) {
        return false;
    }
    CounterResultBuilder crb = new CounterResultBuilder();
    String resultId = CountersUtils.getNodeConnectorId(dpId, portNumber);
    crb.setId(resultId);
    createGroups(counters, counterResultDS, crb, resultId);
    return !counters.isEmpty();
}
Also used : CounterResultBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId)

Example 2 with CounterResultBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder in project netvirt by opendaylight.

the class StatisticsImpl method createCounterResults.

private void createCounterResults(List<CounterResult> counters, CounterResultDataStructure counterResultDS, String resultId) {
    for (String counterResultId : counterResultDS.getResults().keySet()) {
        CounterResultBuilder crb = new CounterResultBuilder();
        crb.setId(resultId);
        createGroups(counters, counterResultDS, crb, counterResultId);
    }
}
Also used : CounterResultBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder)

Example 3 with CounterResultBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder in project netvirt by opendaylight.

the class StatisticsImpl method createCounterResults.

private void createCounterResults(List<CounterResult> counters, CounterResultDataStructure counterResultDS) {
    for (String counterResultId : counterResultDS.getResults().keySet()) {
        CounterResultBuilder crb = new CounterResultBuilder();
        crb.setId(counterResultId);
        createGroups(counters, counterResultDS, crb, counterResultId);
    }
}
Also used : CounterResultBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder)

Aggregations

CounterResultBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.result.CounterResultBuilder)3 NodeConnectorId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId)1 NodeId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId)1