Search in sources :

Example 1 with UserdataPwdRules

use of com.cloud.network.rules.UserdataPwdRules in project cosmic by MissionCriticalCloud.

the class AdvancedNetworkTopology method applyUserData.

@Override
public boolean applyUserData(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest, final DomainRouterVO router) throws ResourceUnavailableException {
    s_logger.debug("APPLYING VPC USERDATA RULES");
    final String typeString = "userdata and password entry";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final UserdataPwdRules pwdRules = new UserdataPwdRules(network, nic, profile, dest);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<>(pwdRules));
}
Also used : UserdataPwdRules(com.cloud.network.rules.UserdataPwdRules)

Example 2 with UserdataPwdRules

use of com.cloud.network.rules.UserdataPwdRules in project cosmic by MissionCriticalCloud.

the class BasicNetworkTopology method applyUserData.

@Override
public boolean applyUserData(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest, final DomainRouterVO router) throws ResourceUnavailableException {
    s_logger.debug("APPLYING USERDATA RULES");
    final String typeString = "userdata and password entry";
    final Long podId = dest.getPod().getId();
    boolean isPodLevelException = false;
    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 UserdataPwdRules pwdRules = new UserdataPwdRules(network, nic, profile, dest);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<>(pwdRules));
}
Also used : UserdataPwdRules(com.cloud.network.rules.UserdataPwdRules)

Example 3 with UserdataPwdRules

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

the class BasicNetworkTopology method applyUserData.

@Override
public boolean applyUserData(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final DeployDestination dest, final DomainRouterVO router) throws ResourceUnavailableException {
    s_logger.debug("APPLYING USERDATA RULES");
    final String typeString = "userdata and password entry";
    final Long podId = dest.getPod().getId();
    boolean isPodLevelException = false;
    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 UserdataPwdRules pwdRules = new UserdataPwdRules(network, nic, profile, dest);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(pwdRules));
}
Also used : UserdataPwdRules(com.cloud.network.rules.UserdataPwdRules) RuleApplier(com.cloud.network.rules.RuleApplier)

Example 4 with UserdataPwdRules

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

the class AdvancedNetworkTopology method applyUserData.

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

Aggregations

UserdataPwdRules (com.cloud.network.rules.UserdataPwdRules)4 RuleApplier (com.cloud.network.rules.RuleApplier)2