use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.DirectionBase in project netvirt by opendaylight.
the class AclServiceUtils method getRemoteAclIdsByDirection.
public static Set<Uuid> getRemoteAclIdsByDirection(Acl acl, Class<? extends DirectionBase> direction) {
Set<Uuid> remoteAclIds = new HashSet<>();
AccessListEntries accessListEntries = acl.getAccessListEntries();
if (accessListEntries != null && accessListEntries.getAce() != null) {
for (Ace ace : accessListEntries.getAce()) {
SecurityRuleAttr aceAttr = AclServiceUtils.getAccesssListAttributes(ace);
if (aceAttr.getDirection().equals(direction) && doesAceHaveRemoteGroupId(aceAttr)) {
remoteAclIds.add(aceAttr.getRemoteGroupId());
}
}
}
return remoteAclIds;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.rev160608.DirectionBase in project netvirt by opendaylight.
the class AclServiceUtils method getRemoteAclIdsByDirection.
public Set<Uuid> getRemoteAclIdsByDirection(List<Uuid> aclIds, Class<? extends DirectionBase> direction) {
Set<Uuid> remoteAclIds = new HashSet<>();
if (aclIds == null || aclIds.isEmpty()) {
return remoteAclIds;
}
for (Uuid aclId : aclIds) {
Acl acl = this.aclDataUtil.getAcl(aclId.getValue());
if (null == acl) {
LOG.warn("ACL {} not found in cache.", aclId.getValue());
continue;
}
remoteAclIds.addAll(getRemoteAclIdsByDirection(acl, direction));
}
return remoteAclIds;
}
Aggregations