Search in sources :

Example 1 with StaticNatRules

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

the class BasicNetworkTopology method applyStaticNats.

@Override
public boolean applyStaticNats(final Network network, final List<? extends StaticNat> rules, final VirtualRouter router) throws ResourceUnavailableException {
    if (rules == null || rules.isEmpty()) {
        s_logger.debug("No static nat rules to be applied for network " + network.getId());
        return true;
    }
    s_logger.debug("APPLYING STATIC NAT RULES");
    final String typeString = "static nat rules";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final StaticNatRules natRules = new StaticNatRules(network, rules);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(natRules));
}
Also used : StaticNatRules(com.cloud.network.rules.StaticNatRules) RuleApplier(com.cloud.network.rules.RuleApplier)

Aggregations

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