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));
}
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));
}
Aggregations