use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.policy.rev170207.Service in project netvirt by opendaylight.
the class ElanServiceProvider method removeKnownL3DmacAddress.
@Override
public void removeKnownL3DmacAddress(String macAddress, String elanInstanceName) {
if (!isL2BeforeL3) {
LOG.trace("ELAN service is after L3VPN in the Netvirt pipeline skip known L3DMAC flows installation");
return;
}
ElanInstance elanInstance = elanInstanceCache.get(elanInstanceName).orNull();
if (elanInstance == null) {
LOG.warn("Null elan instance {}", elanInstanceName);
return;
}
List<BigInteger> dpnsIdsForElanInstance = elanUtils.getParticipatingDpnsInElanInstance(elanInstanceName);
if (dpnsIdsForElanInstance.isEmpty()) {
LOG.warn("No DPNs for elan instance {}", elanInstance);
return;
}
elanUtils.removeDmacRedirectToDispatcherFlows(elanInstance.getElanTag(), macAddress, dpnsIdsForElanInstance);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.policy.rev170207.Service in project netvirt by opendaylight.
the class ElanServiceProvider method addKnownL3DmacAddress.
@Override
public void addKnownL3DmacAddress(String macAddress, String elanInstanceName) {
if (!isL2BeforeL3) {
LOG.trace("ELAN service is after L3VPN in the Netvirt pipeline skip known L3DMAC flows installation");
return;
}
ElanInstance elanInstance = elanInstanceCache.get(elanInstanceName).orNull();
if (elanInstance == null) {
LOG.warn("Null elan instance {}", elanInstanceName);
return;
}
List<BigInteger> dpnsIdsForElanInstance = elanUtils.getParticipatingDpnsInElanInstance(elanInstanceName);
if (dpnsIdsForElanInstance.isEmpty()) {
LOG.warn("No DPNs for elan instance {}", elanInstance);
return;
}
elanUtils.addDmacRedirectToDispatcherFlows(elanInstance.getElanTag(), elanInstanceName, macAddress, dpnsIdsForElanInstance);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.policy.rev170207.Service in project netvirt by opendaylight.
the class StatisticsImpl method createIdPool.
private void createIdPool() {
if (checkPoolExists()) {
return;
}
CreateIdPoolInput createPool = new CreateIdPoolInputBuilder().setPoolName(CountersServiceUtils.COUNTERS_PULL_NAME).setLow(CountersServiceUtils.COUNTERS_PULL_START).setHigh(CountersServiceUtils.COUNTERS_PULL_START + CountersServiceUtils.COUNTERS_PULL_END).build();
Future<RpcResult<Void>> result = idManagerService.createIdPool(createPool);
Futures.addCallback(JdkFutureAdapters.listenInPoolThread(result), new FutureCallback<RpcResult<Void>>() {
@Override
public void onFailure(Throwable error) {
LOG.error("Failed to create idPool for Aliveness Monitor Service", error);
}
@Override
public void onSuccess(@Nonnull RpcResult<Void> rpcResult) {
if (rpcResult.isSuccessful()) {
LOG.debug("Created IdPool for tap");
} else {
LOG.error("RPC to create Idpool failed {}", rpcResult.getErrors());
}
}
}, MoreExecutors.directExecutor());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.policy.rev170207.Service in project netvirt by opendaylight.
the class NeutronPortPairListener method remove.
/**
* Method removes PortPair which is identified by InstanceIdentifier.
*
* @param deletedPortPair - PortPair for removing
*/
@Override
public void remove(PortPair deletedPortPair) {
LOG.info("Received remove port pair event {}", deletedPortPair);
ServiceFunctionKey sfKey = PortPairTranslator.getSFKey(deletedPortPair);
LOG.info("Removing service function {}", sfKey);
sfcMdsalHelper.removeServiceFunction(sfKey);
ServiceFunctionForwarder sff;
ServiceFunctionForwarder updatedSff;
SffName sffName = new SffName(SfcMdsalHelper.NETVIRT_LOGICAL_SFF_NAME);
sff = sfcMdsalHelper.readServiceFunctionForwarder(new ServiceFunctionForwarderKey(sffName));
updatedSff = PortPairGroupTranslator.removePortPairFromServiceFunctionForwarder(sff, deletedPortPair);
LOG.info("Updating service function forwarder as {}", updatedSff);
sfcMdsalHelper.addServiceFunctionForwarder(updatedSff);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.policy.rev170207.Service in project netvirt by opendaylight.
the class PortChainTranslator method buildServiceFunctionPath.
public static ServiceFunctionPath buildServiceFunctionPath(ServiceFunctionChain sfc) {
Preconditions.checkNotNull(sfc, "Service Function Chain must not be null");
ServiceFunctionPathBuilder sfpBuilder = new ServiceFunctionPathBuilder();
// Set the name
sfpBuilder.setName(new SfpName(SFP_NAME_PREFIX + sfc.getName().getValue()));
sfpBuilder.setSymmetric(sfc.isSymmetric());
// Set related SFC name
sfpBuilder.setServiceChainName(sfc.getName());
return sfpBuilder.build();
}
Aggregations