}
BigInteger dpId = port.getDpId();
int lportTag = port.getLPortTag();
- Set<MacAddress> macs = filteredAAPs.stream().map(aap -> aap.getMacAddress()).collect(Collectors.toSet());
+ Set<MacAddress> macs = filteredAAPs.stream().map(AllowedAddressPairs::getMacAddress)
+ .collect(Collectors.toSet());
for (MacAddress mac : macs) {
List<MatchInfoBase> matches = new ArrayList<>();
matches.add(new MatchEthernetSource(mac));
//exclude filteredAAP entries from port's AAP's before comparison
List<AllowedAddressPairs> filteredAllowedAddressed = allowedAddresses.stream().filter(
aap -> !filteredAAPs.contains(aap)).collect(Collectors.toList());
- Set<MacAddress> macs = filteredAAPs.stream().map(aap -> aap.getMacAddress()).collect(Collectors.toSet());
+ Set<MacAddress> macs = filteredAAPs.stream().map(AllowedAddressPairs::getMacAddress)
+ .collect(Collectors.toSet());
List<AllowedAddressPairs> aapWithDuplicateMac = filteredAllowedAddressed.stream()
.filter(entry -> macs.contains(entry.getMacAddress())).collect(Collectors.toList());
return !aapWithDuplicateMac.isEmpty();
private void deregisterListeners() {
Queue<RecoverableListener> recoverableListeners =
serviceRecoveryRegistry.getRecoverableListeners(AclServiceUtils.getRecoverServiceRegistryKey());
- recoverableListeners.forEach((recoverableListener -> recoverableListener.deregisterListener()));
+ recoverableListeners.forEach((RecoverableListener::deregisterListener));
}
private void registerListeners() {
Queue<RecoverableListener> recoverableListeners =
serviceRecoveryRegistry.getRecoverableListeners(AclServiceUtils.getRecoverServiceRegistryKey());
- recoverableListeners.forEach((recoverableListener -> recoverableListener.registerListener()));
+ recoverableListeners.forEach((RecoverableListener::registerListener));
}
@Override
private void addFlowToTx(short tableId, String flowId, int priority, List<? extends MatchInfoBase> matches,
List<InstructionInfo> instructions) {
- String flowName = flowId;
int idleTimeOut = 0;
int hardTimeOut = 0;
BigInteger cookie = AclConstants.COOKIE_ACL_BASE;
- FlowEntity flowEntity = MDSALUtil.buildFlowEntity(this.dpId, tableId, flowId, priority, flowName, idleTimeOut,
- hardTimeOut, cookie, matches, instructions);
+ FlowEntity flowEntity = MDSALUtil.buildFlowEntity(this.dpId, tableId, flowId, priority, flowId, idleTimeOut,
+ hardTimeOut, cookie, matches, instructions);
LOG.trace("Installing Acl default Flow:: DpnId: {}, flowId: {}, flowName: {}, tableId: {}", dpId, flowId,
- flowName, tableId);
+ flowId, tableId);
mdsalManager.addFlowToTx(flowEntity, tx);
}
* @return the integer
*/
public Integer allocateAclTag(String aclName) {
- Integer aclTag = AclServiceUtils.allocateId(this.idManager, AclConstants.ACL_TAG_POOL_NAME, aclName,
- AclConstants.INVALID_ACL_TAG);
- return aclTag;
+ return AclServiceUtils.allocateId(this.idManager, AclConstants.ACL_TAG_POOL_NAME, aclName,
+ AclConstants.INVALID_ACL_TAG);
}
/**