use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.TunnelList in project genius by opendaylight.
the class ItmMonitorIntervalWorker method toggleTunnelMonitoring.
private void toggleTunnelMonitoring(WriteTransaction transaction) {
List<String> tunnelList = ItmUtils.getInternalTunnelInterfaces(dataBroker);
LOG.debug("ItmMonitorIntervalWorker toggleTunnelMonitoring: List of tunnel interfaces: {}", tunnelList);
InstanceIdentifier<TunnelMonitorInterval> iid = InstanceIdentifier.builder(TunnelMonitorInterval.class).build();
TunnelMonitorInterval intervalBuilder = new TunnelMonitorIntervalBuilder().setInterval(interval).build();
ItmUtils.asyncUpdate(LogicalDatastoreType.OPERATIONAL, iid, intervalBuilder, dataBroker, ItmUtils.DEFAULT_CALLBACK);
for (String tunnel : tunnelList) {
toggle(tunnel, transaction);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.TunnelList in project genius by opendaylight.
the class ItmMonitorToggleWorker method toggleTunnelMonitoring.
private void toggleTunnelMonitoring(WriteTransaction transaction) {
List<String> tunnelList = ItmUtils.getInternalTunnelInterfaces(dataBroker);
LOG.debug("toggleTunnelMonitoring: TunnelList size {}", tunnelList.size());
InstanceIdentifier<TunnelMonitorParams> iid = InstanceIdentifier.builder(TunnelMonitorParams.class).build();
TunnelMonitorParams protocolBuilder = new TunnelMonitorParamsBuilder().setEnabled(enabled).setMonitorProtocol(monitorProtocol).build();
LOG.debug("toggleTunnelMonitoring: Updating Operational DS");
ItmUtils.asyncUpdate(LogicalDatastoreType.OPERATIONAL, iid, protocolBuilder, dataBroker, ItmUtils.DEFAULT_CALLBACK);
for (String tunnel : tunnelList) {
toggle(tunnel, transaction);
}
}
Aggregations