Search in sources :

Example 1 with LoadBalancingRules

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

the class BasicNetworkTopology method applyLoadBalancingRules.

@Override
public boolean applyLoadBalancingRules(final Network network, final List<LoadBalancingRule> rules, final VirtualRouter router) throws ResourceUnavailableException {
    if (rules == null || rules.isEmpty()) {
        s_logger.debug("No lb rules to be applied for network " + network.getId());
        return true;
    }
    s_logger.debug("APPLYING LOAD BALANCING RULES");
    final String typeString = "loadbalancing rules";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final LoadBalancingRules loadBalancingRules = new LoadBalancingRules(network, rules);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(loadBalancingRules));
}
Also used : RuleApplier(com.cloud.network.rules.RuleApplier) LoadBalancingRules(com.cloud.network.rules.LoadBalancingRules)

Aggregations

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