import org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.interfacemanager.servicebindings.flowbased.state.factory.FlowBasedServicesStateAddable;
-import org.opendaylight.genius.interfacemanager.servicebindings.flowbased.utilities.FlowBasedServicesUtils;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.L2vlan;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.Tunnel;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.ServicesInfo;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final void bindServices(List<ListenableFuture<Void>> futures, Interface ifaceState,
List<BoundServices> allServices, Class<? extends ServiceModeBase> serviceMode) {
futures.add(txRunner.callWithNewReadWriteTransactionAndSubmit(CONFIGURATION, tx -> {
- LOG.debug("binding services on interface {}", ifaceState.getName());
- ServicesInfo servicesInfo = FlowBasedServicesUtils.getServicesInfoForInterface(tx, ifaceState.getName(),
- serviceMode);
- if (servicesInfo == null) {
- LOG.trace("service info is null for interface {}", ifaceState.getName());
- return;
- }
- if (allServices == null || allServices.isEmpty()) {
- LOG.trace("bound services is empty for interface {}", ifaceState.getName());
- return;
- }
-
if (L2vlan.class.equals(ifaceState.getType()) || Tunnel.class.equals(ifaceState.getType())) {
+ LOG.debug("binding services on interface {}", ifaceState.getName());
bindServicesOnInterface(tx, allServices, ifaceState);
}
}));