Search in sources :

Example 1 with NetworkAclsRules

use of com.cloud.network.rules.NetworkAclsRules in project cloudstack by apache.

the class AdvancedNetworkTopology method applyNetworkACLs.

@Override
public boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem> rules, final VirtualRouter router, final boolean isPrivateGateway) throws ResourceUnavailableException {
    if (rules == null || rules.isEmpty()) {
        s_logger.debug("No network ACLs to be applied for network " + network.getId());
        return true;
    }
    s_logger.debug("APPLYING NETWORK ACLs RULES");
    final String typeString = "network acls";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final NetworkAclsRules aclsRules = new NetworkAclsRules(network, rules, isPrivateGateway);
    final boolean result = applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(aclsRules));
    return result;
}
Also used : NetworkAclsRules(com.cloud.network.rules.NetworkAclsRules) RuleApplier(com.cloud.network.rules.RuleApplier)

Aggregations

NetworkAclsRules (com.cloud.network.rules.NetworkAclsRules)1 RuleApplier (com.cloud.network.rules.RuleApplier)1