use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.IngressElementCountersRequestConfigBuilder in project netvirt by opendaylight.
the class StatisticsImpl method putIngressElementCounterRequestInConfig.
private void putIngressElementCounterRequestInConfig(AcquireElementCountersRequestHandlerInput input, ElementCountersDirection direcion, ReadWriteTransaction transaction, String requestKey, InstanceIdentifier<IngressElementCountersRequestConfig> ecrcIdentifier, Optional<IngressElementCountersRequestConfig> iecrcOpt, String generatedUniqueId) {
IngressElementCountersRequestConfig requestConfig = iecrcOpt.get();
CounterRequestsBuilder crb = new CounterRequestsBuilder();
crb.setRequestId(requestKey);
crb.setKey(new CounterRequestsKey(requestKey));
crb.setFilters(input.getOutgoingTraffic().getFilters());
crb.setPortId(input.getPortId());
crb.setLportTag(getLportTag(input.getPortId()));
crb.setDpn(getDpn(input.getPortId()));
crb.setTrafficDirection(direcion.toString());
crb.setGeneratedUniqueId(generatedUniqueId);
List<CounterRequests> counterRequests = requestConfig.getCounterRequests();
counterRequests.add(crb.build());
IngressElementCountersRequestConfigBuilder ecrcb = new IngressElementCountersRequestConfigBuilder();
ecrcb.setCounterRequests(counterRequests);
requestConfig = ecrcb.build();
transaction.put(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, requestConfig, WriteTransaction.CREATE_MISSING_PARENTS);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.statistics.rev170120.IngressElementCountersRequestConfigBuilder in project netvirt by opendaylight.
the class StatisticsImpl method creatIngressEelementCountersContainerInConfig.
private void creatIngressEelementCountersContainerInConfig(ReadWriteTransaction transaction, InstanceIdentifier<IngressElementCountersRequestConfig> ecrcIdentifier) {
IngressElementCountersRequestConfigBuilder iecrcb = new IngressElementCountersRequestConfigBuilder();
List<CounterRequests> counterRequests = new ArrayList<>();
iecrcb.setCounterRequests(counterRequests);
IngressElementCountersRequestConfig iecrc = iecrcb.build();
transaction.put(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, iecrc, WriteTransaction.CREATE_MISSING_PARENTS);
}
Aggregations