Search in sources :

Example 1 with DhcpEntryRules

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

the class AdvancedNetworkTopology method applyDhcpEntry.

@Override
public boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest, final DomainRouterVO router) throws ResourceUnavailableException {
    s_logger.debug("APPLYING VPC DHCP ENTRY RULES");
    final String typeString = "dhcp entry";
    final Long podId = null;
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final DhcpEntryRules dhcpRules = new DhcpEntryRules(network, nic, profile, dest);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(dhcpRules));
}
Also used : RuleApplier(com.cloud.network.rules.RuleApplier) DhcpEntryRules(com.cloud.network.rules.DhcpEntryRules)

Example 2 with DhcpEntryRules

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

the class BasicNetworkTopology method applyDhcpEntry.

@Override
public boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest, final DomainRouterVO router) throws ResourceUnavailableException {
    s_logger.debug("APPLYING DHCP ENTRY RULES");
    final String typeString = "dhcp entry";
    final Long podId = dest.getPod().getId();
    boolean isPodLevelException = false;
    // scope
    if (podId != null && profile.getVirtualMachine().getType() == VirtualMachine.Type.User && network.getTrafficType() == TrafficType.Guest && network.getGuestType() == Network.GuestType.Shared) {
        isPodLevelException = true;
    }
    final boolean failWhenDisconnect = false;
    final DhcpEntryRules dhcpRules = new DhcpEntryRules(network, nic, profile, dest);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(dhcpRules));
}
Also used : RuleApplier(com.cloud.network.rules.RuleApplier) DhcpEntryRules(com.cloud.network.rules.DhcpEntryRules)

Aggregations

DhcpEntryRules (com.cloud.network.rules.DhcpEntryRules)2 RuleApplier (com.cloud.network.rules.RuleApplier)2