Search in sources :

Example 1 with LoadBalancerConfigCommand

use of com.cloud.agent.api.routing.LoadBalancerConfigCommand in project CloudStack-archive by CloudStack-extras.

the class SimulatorManagerImpl method simulate.

@DB
@Override
public Answer simulate(Command cmd, String hostGuid) {
    Transaction txn = Transaction.currentTxn();
    txn.transitToUserManagedConnection(_concierge.conn());
    try {
        MockHost host = _mockHost.findByGuid(hostGuid);
        String cmdName = cmd.toString();
        int index = cmdName.lastIndexOf(".");
        if (index != -1) {
            cmdName = cmdName.substring(index + 1);
        }
        MockConfigurationVO config = _mockConfigDao.findByNameBottomUP(host.getDataCenterId(), host.getPodId(), host.getClusterId(), host.getId(), cmdName);
        SimulatorInfo info = new SimulatorInfo();
        info.setHostUuid(hostGuid);
        if (config != null) {
            Map<String, String> configParameters = config.getParameters();
            for (Map.Entry<String, String> entry : configParameters.entrySet()) {
                if (entry.getKey().equalsIgnoreCase("enabled")) {
                    info.setEnabled(Boolean.parseBoolean(entry.getValue()));
                } else if (entry.getKey().equalsIgnoreCase("timeout")) {
                    try {
                        info.setTimeout(Integer.valueOf(entry.getValue()));
                    } catch (NumberFormatException e) {
                        s_logger.debug("invalid timeout parameter: " + e.toString());
                    }
                } else if (entry.getKey().equalsIgnoreCase("wait")) {
                    try {
                        int wait = Integer.valueOf(entry.getValue());
                        Thread.sleep(wait * 1000);
                    } catch (NumberFormatException e) {
                        s_logger.debug("invalid timeout parameter: " + e.toString());
                    } catch (InterruptedException e) {
                        s_logger.debug("thread is interrupted: " + e.toString());
                    }
                }
            }
        }
        if (cmd instanceof GetHostStatsCommand) {
            return _mockAgentMgr.getHostStatistic((GetHostStatsCommand) cmd);
        } else if (cmd instanceof CheckHealthCommand) {
            return _mockAgentMgr.checkHealth((CheckHealthCommand) cmd);
        } else if (cmd instanceof PingTestCommand) {
            return _mockAgentMgr.pingTest((PingTestCommand) cmd);
        } else if (cmd instanceof MigrateCommand) {
            return _mockVmMgr.Migrate((MigrateCommand) cmd, info);
        } else if (cmd instanceof StartCommand) {
            return _mockVmMgr.startVM((StartCommand) cmd, info);
        } else if (cmd instanceof CheckSshCommand) {
            return _mockVmMgr.checkSshCommand((CheckSshCommand) cmd);
        } else if (cmd instanceof SetStaticNatRulesCommand) {
            return _mockVmMgr.SetStaticNatRules((SetStaticNatRulesCommand) cmd);
        } else if (cmd instanceof SetPortForwardingRulesCommand) {
            return _mockVmMgr.SetPortForwardingRules((SetPortForwardingRulesCommand) cmd);
        } else if (cmd instanceof NetworkUsageCommand) {
            return _mockVmMgr.getNetworkUsage((NetworkUsageCommand) cmd);
        } else if (cmd instanceof IpAssocCommand) {
            return _mockVmMgr.IpAssoc((IpAssocCommand) cmd);
        } else if (cmd instanceof LoadBalancerConfigCommand) {
            return _mockVmMgr.LoadBalancerConfig((LoadBalancerConfigCommand) cmd);
        } else if (cmd instanceof DhcpEntryCommand) {
            return _mockVmMgr.AddDhcpEntry((DhcpEntryCommand) cmd);
        } else if (cmd instanceof VmDataCommand) {
            return _mockVmMgr.setVmData((VmDataCommand) cmd);
        } else if (cmd instanceof CleanupNetworkRulesCmd) {
            return _mockVmMgr.CleanupNetworkRules((CleanupNetworkRulesCmd) cmd, info);
        } else if (cmd instanceof CheckNetworkCommand) {
            return _mockAgentMgr.checkNetworkCommand((CheckNetworkCommand) cmd);
        } else if (cmd instanceof StopCommand) {
            return _mockVmMgr.stopVM((StopCommand) cmd);
        } else if (cmd instanceof RebootCommand) {
            return _mockVmMgr.rebootVM((RebootCommand) cmd);
        } else if (cmd instanceof GetVncPortCommand) {
            return _mockVmMgr.getVncPort((GetVncPortCommand) cmd);
        } else if (cmd instanceof CheckConsoleProxyLoadCommand) {
            return _mockVmMgr.CheckConsoleProxyLoad((CheckConsoleProxyLoadCommand) cmd);
        } else if (cmd instanceof WatchConsoleProxyLoadCommand) {
            return _mockVmMgr.WatchConsoleProxyLoad((WatchConsoleProxyLoadCommand) cmd);
        } else if (cmd instanceof SecurityGroupRulesCmd) {
            return _mockVmMgr.AddSecurityGroupRules((SecurityGroupRulesCmd) cmd, info);
        } else if (cmd instanceof SavePasswordCommand) {
            return _mockVmMgr.SavePassword((SavePasswordCommand) cmd);
        } else if (cmd instanceof PrimaryStorageDownloadCommand) {
            return _mockStorageMgr.primaryStorageDownload((PrimaryStorageDownloadCommand) cmd);
        } else if (cmd instanceof CreateCommand) {
            return _mockStorageMgr.createVolume((CreateCommand) cmd);
        } else if (cmd instanceof AttachVolumeCommand) {
            return _mockStorageMgr.AttachVolume((AttachVolumeCommand) cmd);
        } else if (cmd instanceof AttachIsoCommand) {
            return _mockStorageMgr.AttachIso((AttachIsoCommand) cmd);
        } else if (cmd instanceof DeleteStoragePoolCommand) {
            return _mockStorageMgr.DeleteStoragePool((DeleteStoragePoolCommand) cmd);
        } else if (cmd instanceof ModifyStoragePoolCommand) {
            return _mockStorageMgr.ModifyStoragePool((ModifyStoragePoolCommand) cmd);
        } else if (cmd instanceof CreateStoragePoolCommand) {
            return _mockStorageMgr.CreateStoragePool((CreateStoragePoolCommand) cmd);
        } else if (cmd instanceof SecStorageSetupCommand) {
            return _mockStorageMgr.SecStorageSetup((SecStorageSetupCommand) cmd);
        } else if (cmd instanceof ListTemplateCommand) {
            return _mockStorageMgr.ListTemplates((ListTemplateCommand) cmd);
        } else if (cmd instanceof DestroyCommand) {
            return _mockStorageMgr.Destroy((DestroyCommand) cmd);
        } else if (cmd instanceof DownloadProgressCommand) {
            return _mockStorageMgr.DownloadProcess((DownloadProgressCommand) cmd);
        } else if (cmd instanceof DownloadCommand) {
            return _mockStorageMgr.Download((DownloadCommand) cmd);
        } else if (cmd instanceof GetStorageStatsCommand) {
            return _mockStorageMgr.GetStorageStats((GetStorageStatsCommand) cmd);
        } else if (cmd instanceof ManageSnapshotCommand) {
            return _mockStorageMgr.ManageSnapshot((ManageSnapshotCommand) cmd);
        } else if (cmd instanceof BackupSnapshotCommand) {
            return _mockStorageMgr.BackupSnapshot((BackupSnapshotCommand) cmd, info);
        } else if (cmd instanceof DeleteSnapshotBackupCommand) {
            return _mockStorageMgr.DeleteSnapshotBackup((DeleteSnapshotBackupCommand) cmd);
        } else if (cmd instanceof CreateVolumeFromSnapshotCommand) {
            return _mockStorageMgr.CreateVolumeFromSnapshot((CreateVolumeFromSnapshotCommand) cmd);
        } else if (cmd instanceof DeleteTemplateCommand) {
            return _mockStorageMgr.DeleteTemplate((DeleteTemplateCommand) cmd);
        } else if (cmd instanceof SecStorageVMSetupCommand) {
            return _mockStorageMgr.SecStorageVMSetup((SecStorageVMSetupCommand) cmd);
        } else if (cmd instanceof CreatePrivateTemplateFromSnapshotCommand) {
            return _mockStorageMgr.CreatePrivateTemplateFromSnapshot((CreatePrivateTemplateFromSnapshotCommand) cmd);
        } else if (cmd instanceof ComputeChecksumCommand) {
            return _mockStorageMgr.ComputeChecksum((ComputeChecksumCommand) cmd);
        } else if (cmd instanceof CreatePrivateTemplateFromVolumeCommand) {
            return _mockStorageMgr.CreatePrivateTemplateFromVolume((CreatePrivateTemplateFromVolumeCommand) cmd);
        } else if (cmd instanceof MaintainCommand) {
            return _mockAgentMgr.MaintainCommand((MaintainCommand) cmd);
        } else if (cmd instanceof GetVmStatsCommand) {
            return _mockVmMgr.getVmStats((GetVmStatsCommand) cmd);
        } else if (cmd instanceof GetDomRVersionCmd) {
            return _mockVmMgr.getDomRVersion((GetDomRVersionCmd) cmd);
        } else if (cmd instanceof ClusterSyncCommand) {
            return new Answer(cmd);
        } else if (cmd instanceof CopyVolumeCommand) {
            return _mockStorageMgr.CopyVolume((CopyVolumeCommand) cmd);
        } else {
            return Answer.createUnsupportedCommandAnswer(cmd);
        }
    } catch (Exception e) {
        s_logger.debug("Failed execute cmd: " + e.toString());
        txn.rollback();
        return new Answer(cmd, false, e.toString());
    } finally {
        txn.transitToAutoManagedConnection(Transaction.CLOUD_DB);
    }
}
Also used : GetDomRVersionCmd(com.cloud.agent.api.GetDomRVersionCmd) DhcpEntryCommand(com.cloud.agent.api.routing.DhcpEntryCommand) VmDataCommand(com.cloud.agent.api.routing.VmDataCommand) DeleteStoragePoolCommand(com.cloud.agent.api.DeleteStoragePoolCommand) ListTemplateCommand(com.cloud.agent.api.storage.ListTemplateCommand) ManageSnapshotCommand(com.cloud.agent.api.ManageSnapshotCommand) ComputeChecksumCommand(com.cloud.agent.api.ComputeChecksumCommand) MigrateCommand(com.cloud.agent.api.MigrateCommand) AttachVolumeCommand(com.cloud.agent.api.AttachVolumeCommand) SetPortForwardingRulesCommand(com.cloud.agent.api.routing.SetPortForwardingRulesCommand) CreateVolumeFromSnapshotCommand(com.cloud.agent.api.CreateVolumeFromSnapshotCommand) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PingTestCommand(com.cloud.agent.api.PingTestCommand) BackupSnapshotCommand(com.cloud.agent.api.BackupSnapshotCommand) DeleteSnapshotBackupCommand(com.cloud.agent.api.DeleteSnapshotBackupCommand) SetStaticNatRulesCommand(com.cloud.agent.api.routing.SetStaticNatRulesCommand) SecurityGroupRulesCmd(com.cloud.agent.api.SecurityGroupRulesCmd) CreateCommand(com.cloud.agent.api.storage.CreateCommand) DestroyCommand(com.cloud.agent.api.storage.DestroyCommand) SecStorageSetupCommand(com.cloud.agent.api.SecStorageSetupCommand) NetworkUsageCommand(com.cloud.agent.api.NetworkUsageCommand) AttachIsoCommand(com.cloud.agent.api.AttachIsoCommand) CleanupNetworkRulesCmd(com.cloud.agent.api.CleanupNetworkRulesCmd) GetVmStatsCommand(com.cloud.agent.api.GetVmStatsCommand) StopCommand(com.cloud.agent.api.StopCommand) Transaction(com.cloud.utils.db.Transaction) SecStorageVMSetupCommand(com.cloud.agent.api.SecStorageVMSetupCommand) Map(java.util.Map) HashMap(java.util.HashMap) MockConfigurationVO(com.cloud.simulator.MockConfigurationVO) CheckSshCommand(com.cloud.agent.api.check.CheckSshCommand) RebootCommand(com.cloud.agent.api.RebootCommand) StartCommand(com.cloud.agent.api.StartCommand) CheckConsoleProxyLoadCommand(com.cloud.agent.api.proxy.CheckConsoleProxyLoadCommand) SavePasswordCommand(com.cloud.agent.api.routing.SavePasswordCommand) PrimaryStorageDownloadCommand(com.cloud.agent.api.storage.PrimaryStorageDownloadCommand) DownloadCommand(com.cloud.agent.api.storage.DownloadCommand) PrimaryStorageDownloadCommand(com.cloud.agent.api.storage.PrimaryStorageDownloadCommand) CopyVolumeCommand(com.cloud.agent.api.storage.CopyVolumeCommand) WatchConsoleProxyLoadCommand(com.cloud.agent.api.proxy.WatchConsoleProxyLoadCommand) GetHostStatsCommand(com.cloud.agent.api.GetHostStatsCommand) DeleteTemplateCommand(com.cloud.agent.api.storage.DeleteTemplateCommand) IpAssocCommand(com.cloud.agent.api.routing.IpAssocCommand) CreatePrivateTemplateFromSnapshotCommand(com.cloud.agent.api.CreatePrivateTemplateFromSnapshotCommand) LoadBalancerConfigCommand(com.cloud.agent.api.routing.LoadBalancerConfigCommand) ClusterSyncCommand(com.cloud.agent.api.ClusterSyncCommand) MaintainCommand(com.cloud.agent.api.MaintainCommand) ModifyStoragePoolCommand(com.cloud.agent.api.ModifyStoragePoolCommand) GetStorageStatsCommand(com.cloud.agent.api.GetStorageStatsCommand) ConfigurationException(javax.naming.ConfigurationException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) SQLException(java.sql.SQLException) DownloadProgressCommand(com.cloud.agent.api.storage.DownloadProgressCommand) Answer(com.cloud.agent.api.Answer) GetVncPortCommand(com.cloud.agent.api.GetVncPortCommand) MockHost(com.cloud.simulator.MockHost) CreatePrivateTemplateFromVolumeCommand(com.cloud.agent.api.CreatePrivateTemplateFromVolumeCommand) CreateStoragePoolCommand(com.cloud.agent.api.CreateStoragePoolCommand) CheckHealthCommand(com.cloud.agent.api.CheckHealthCommand) DB(com.cloud.utils.db.DB)

Example 2 with LoadBalancerConfigCommand

use of com.cloud.agent.api.routing.LoadBalancerConfigCommand in project cosmic by MissionCriticalCloud.

the class HAProxyConfiguratorTest method testGenerateConfigurationLoadBalancerProxyProtocolConfigCommand.

/**
 * Test method for {@link com.cloud.network.HAProxyConfigurator#generateConfiguration(com.cloud.agent.api.routing.LoadBalancerConfigCommand)}.
 */
@Test
public void testGenerateConfigurationLoadBalancerProxyProtocolConfigCommand() {
    final List<LbDestination> dests = new ArrayList<>();
    dests.add(new LbDestination(443, 8443, "10.1.10.2", false));
    dests.add(new LbDestination(443, 8443, "10.1.10.2", true));
    final LoadBalancerTO lb = new LoadBalancerTO("1", "10.2.0.1", 443, "tcp", "http", false, false, false, dests, 60000, 60000);
    lb.setLbProtocol("tcp-proxy");
    final LoadBalancerTO[] lba = new LoadBalancerTO[1];
    lba[0] = lb;
    final HAProxyConfigurator hpg = new HAProxyConfigurator();
    final LoadBalancerConfigCommand cmd = new LoadBalancerConfigCommand(lba, "10.0.0.1", "10.1.0.1", "10.1.1.1", null, 1L, "12", false);
    final String result = genConfig(hpg, cmd);
    assertTrue("'send-proxy' should result if protocol is 'tcp-proxy'", result.contains("send-proxy"));
}
Also used : ArrayList(java.util.ArrayList) LoadBalancerTO(com.cloud.agent.api.to.LoadBalancerTO) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) LoadBalancerConfigCommand(com.cloud.agent.api.routing.LoadBalancerConfigCommand) Test(org.junit.Test)

Example 3 with LoadBalancerConfigCommand

use of com.cloud.agent.api.routing.LoadBalancerConfigCommand in project cosmic by MissionCriticalCloud.

the class ConfigHelperTest method testGenerateCommandCfgLoadBalancer.

@Test
public void testGenerateCommandCfgLoadBalancer() {
    final LoadBalancerConfigCommand command = generateLoadBalancerConfigCommand();
    final AbstractConfigItemFacade configItemFacade = AbstractConfigItemFacade.getInstance(command.getClass());
    final List<ConfigItem> config = configItemFacade.generateConfig(command);
    assertTrue(config.size() > 0);
    final ConfigItem fileConfig = config.get(0);
    assertNotNull(fileConfig);
    assertTrue(fileConfig instanceof FileConfigItem);
    final String fileContents = ((FileConfigItem) fileConfig).getFileContents();
    assertNotNull(fileContents);
    final LoadBalancerRules jsonClass = gson.fromJson(fileContents, LoadBalancerRules.class);
    assertNotNull(jsonClass);
    assertEquals(jsonClass.getType(), "loadbalancer");
    final List<LoadBalancerRule> rules = jsonClass.getRules();
    assertNotNull(rules);
    assertTrue(rules.size() == 1);
    assertEquals(rules.get(0).getRouterIp(), "10.1.10.2");
    final ConfigItem scriptConfig = config.get(1);
    assertNotNull(scriptConfig);
    assertTrue(scriptConfig instanceof ScriptConfigItem);
}
Also used : LoadBalancerRule(com.cloud.agent.resource.virtualnetwork.model.LoadBalancerRule) AbstractConfigItemFacade(com.cloud.agent.resource.virtualnetwork.facade.AbstractConfigItemFacade) LoadBalancerRules(com.cloud.agent.resource.virtualnetwork.model.LoadBalancerRules) LoadBalancerConfigCommand(com.cloud.agent.api.routing.LoadBalancerConfigCommand) Test(org.junit.Test)

Example 4 with LoadBalancerConfigCommand

use of com.cloud.agent.api.routing.LoadBalancerConfigCommand in project cosmic by MissionCriticalCloud.

the class ConfigHelperTest method generateLoadBalancerConfigCommand.

protected LoadBalancerConfigCommand generateLoadBalancerConfigCommand() {
    final List<LoadBalancerTO> lbs = new ArrayList<>();
    final List<LbDestination> dests = new ArrayList<>();
    dests.add(new LbDestination(80, 8080, "10.1.10.2", false));
    dests.add(new LbDestination(80, 8080, "10.1.10.2", true));
    lbs.add(new LoadBalancerTO(UUID.randomUUID().toString(), "64.10.1.10", 80, "tcp", "algo", false, false, false, dests, 60000, 60000));
    final LoadBalancerTO[] arrayLbs = new LoadBalancerTO[lbs.size()];
    lbs.toArray(arrayLbs);
    final NicTO nic = new NicTO();
    final LoadBalancerConfigCommand cmd = new LoadBalancerConfigCommand(arrayLbs, "64.10.2.10", "10.1.10.2", "192.168.1.2", nic, null, "1000", false);
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, "10.1.10.2");
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, ROUTERNAME);
    return cmd;
}
Also used : ArrayList(java.util.ArrayList) LoadBalancerTO(com.cloud.agent.api.to.LoadBalancerTO) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) NicTO(com.cloud.agent.api.to.NicTO) LoadBalancerConfigCommand(com.cloud.agent.api.routing.LoadBalancerConfigCommand)

Example 5 with LoadBalancerConfigCommand

use of com.cloud.agent.api.routing.LoadBalancerConfigCommand in project cosmic by MissionCriticalCloud.

the class CommandSetupHelper method createApplyLoadBalancingRulesCommands.

public void createApplyLoadBalancingRulesCommands(final List<LoadBalancingRule> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {
    final LoadBalancerTO[] lbs = new LoadBalancerTO[rules.size()];
    int i = 0;
    // We don't support VR to be inline currently
    final boolean inline = false;
    for (final LoadBalancingRule rule : rules) {
        final boolean revoked = rule.getState().equals(FirewallRule.State.Revoke);
        final String protocol = rule.getProtocol();
        final String lb_protocol = rule.getLbProtocol();
        final String algorithm = rule.getAlgorithm();
        final String uuid = rule.getUuid();
        final String srcIp = rule.getSourceIp().addr();
        final int srcPort = rule.getSourcePortStart();
        final List<LbDestination> destinations = rule.getDestinations();
        final List<LbStickinessPolicy> stickinessPolicies = rule.getStickinessPolicies();
        // Load default values and fallback to hardcoded if not available
        final Integer defaultClientTimeout = NumbersUtil.parseInt(_configDao.getValue(Config.DefaultLoadBalancerClientTimeout.key()), 60000);
        final Integer defaultServerTimeout = NumbersUtil.parseInt(_configDao.getValue(Config.DefaultLoadBalancerServerTimeout.key()), 60000);
        // set timeouts, use defaults if not available
        Integer clientTimeout = rule.getClientTimeout();
        if (clientTimeout != null) {
            clientTimeout = NumbersUtil.parseInt(clientTimeout.toString(), defaultClientTimeout);
        } else {
            clientTimeout = defaultClientTimeout;
        }
        Integer serverTimeout = rule.getServerTimeout();
        if (serverTimeout != null) {
            serverTimeout = NumbersUtil.parseInt(serverTimeout.toString(), defaultServerTimeout);
        } else {
            serverTimeout = defaultServerTimeout;
        }
        final LoadBalancerTO lb = new LoadBalancerTO(uuid, srcIp, srcPort, protocol, algorithm, revoked, false, inline, destinations, stickinessPolicies, clientTimeout, serverTimeout);
        lb.setLbProtocol(lb_protocol);
        lbs[i++] = lb;
    }
    String routerPublicIp = null;
    if (router instanceof DomainRouterVO) {
        final DomainRouterVO domr = _routerDao.findById(router.getId());
        routerPublicIp = domr.getPublicIpAddress();
        if (routerPublicIp == null) {
            routerPublicIp = router.getPublicIpAddress();
        }
    }
    final Network guestNetwork = _networkModel.getNetwork(guestNetworkId);
    final Nic nic = _nicDao.findByNtwkIdAndInstanceId(guestNetwork.getId(), router.getId());
    final NicProfile nicProfile = new NicProfile(nic, guestNetwork, nic.getBroadcastUri(), nic.getIsolationUri(), _networkModel.getNetworkRate(guestNetwork.getId(), router.getId()), _networkModel.getNetworkTag(router.getHypervisorType(), guestNetwork));
    final NetworkOffering offering = _networkOfferingDao.findById(guestNetwork.getNetworkOfferingId());
    final String maxconn;
    if (offering.getConcurrentConnections() == null) {
        maxconn = _configDao.getValue(Config.NetworkLBHaproxyMaxConn.key());
    } else {
        maxconn = offering.getConcurrentConnections().toString();
    }
    final LoadBalancerConfigCommand cmd = new LoadBalancerConfigCommand(lbs, routerPublicIp, _routerControlHelper.getRouterIpInNetwork(guestNetworkId, router.getId()), router.getPrivateIpAddress(), _itMgr.toNicTO(nicProfile, router.getHypervisorType()), router.getVpcId(), maxconn, offering.isKeepAliveEnabled());
    cmd.lbStatsVisibility = _configDao.getValue(Config.NetworkLBHaproxyStatsVisbility.key());
    cmd.lbStatsUri = _configDao.getValue(Config.NetworkLBHaproxyStatsUri.key());
    cmd.lbStatsAuth = _configDao.getValue(Config.NetworkLBHaproxyStatsAuth.key());
    cmd.lbStatsPort = _configDao.getValue(Config.NetworkLBHaproxyStatsPort.key());
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _routerControlHelper.getRouterControlIp(router.getId()));
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
    final Zone zone = zoneRepository.findOne(router.getDataCenterId());
    cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, zone.getNetworkType().toString());
    cmds.addCommand(cmd);
}
Also used : LoadBalancingRule(com.cloud.network.lb.LoadBalancingRule) NetworkOffering(com.cloud.offering.NetworkOffering) Zone(com.cloud.db.model.Zone) Nic(com.cloud.vm.Nic) LoadBalancerTO(com.cloud.agent.api.to.LoadBalancerTO) LbStickinessPolicy(com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy) NicProfile(com.cloud.vm.NicProfile) LbDestination(com.cloud.network.lb.LoadBalancingRule.LbDestination) Network(com.cloud.network.Network) DomainRouterVO(com.cloud.vm.DomainRouterVO) LoadBalancerConfigCommand(com.cloud.agent.api.routing.LoadBalancerConfigCommand)

Aggregations

LoadBalancerConfigCommand (com.cloud.agent.api.routing.LoadBalancerConfigCommand)20 LoadBalancerTO (com.cloud.agent.api.to.LoadBalancerTO)14 LbDestination (com.cloud.network.lb.LoadBalancingRule.LbDestination)12 ArrayList (java.util.ArrayList)8 Test (org.junit.Test)6 Answer (com.cloud.agent.api.Answer)4 NicTO (com.cloud.agent.api.to.NicTO)4 LoadBalancingRule (com.cloud.network.lb.LoadBalancingRule)4 NetworkOffering (com.cloud.offering.NetworkOffering)4 LoadBalancerRule (com.cloud.agent.resource.virtualnetwork.model.LoadBalancerRule)3 LoadBalancerRules (com.cloud.agent.resource.virtualnetwork.model.LoadBalancerRules)3 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)3 Nic (com.cloud.vm.Nic)3 ConfigurationException (javax.naming.ConfigurationException)3 AttachIsoCommand (com.cloud.agent.api.AttachIsoCommand)2 BackupSnapshotCommand (com.cloud.agent.api.BackupSnapshotCommand)2 CheckHealthCommand (com.cloud.agent.api.CheckHealthCommand)2 CheckNetworkCommand (com.cloud.agent.api.CheckNetworkCommand)2 CleanupNetworkRulesCmd (com.cloud.agent.api.CleanupNetworkRulesCmd)2 ComputeChecksumCommand (com.cloud.agent.api.ComputeChecksumCommand)2