Search in sources :

Example 16 with IpAssocCommand

use of com.cloud.agent.api.routing.IpAssocCommand in project cloudstack by apache.

the class VirtualRoutingResourceTest method generateIpAssocCommand.

protected IpAssocCommand generateIpAssocCommand() {
    final List<IpAddressTO> ips = new ArrayList<>();
    ips.add(new IpAddressTO(1, "64.1.1.10", true, true, true, "vlan://64", "64.1.1.1", "255.255.255.0", "01:23:45:67:89:AB", 1000, false));
    ips.add(new IpAddressTO(2, "64.1.1.11", false, false, false, "vlan://64", "64.1.1.1", "255.255.255.0", "01:23:45:67:89:AB", 1000, false));
    ips.add(new IpAddressTO(3, "65.1.1.11", true, false, false, "vlan://65", "65.1.1.1", "255.255.255.0", "11:23:45:67:89:AB", 1000, false));
    final IpAddressTO[] ipArray = ips.toArray(new IpAddressTO[ips.size()]);
    final IpAssocCommand cmd = new IpAssocCommand(ipArray);
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, ROUTERNAME);
    assertEquals(cmd.getAnswersCount(), 3);
    return cmd;
}
Also used : IpAddressTO(com.cloud.agent.api.to.IpAddressTO) ArrayList(java.util.ArrayList) IpAssocCommand(com.cloud.agent.api.routing.IpAssocCommand)

Aggregations

IpAssocCommand (com.cloud.agent.api.routing.IpAssocCommand)16 IpAddressTO (com.cloud.agent.api.to.IpAddressTO)8 Answer (com.cloud.agent.api.Answer)7 Test (org.junit.Test)6 GetDomRVersionCmd (com.cloud.agent.api.GetDomRVersionCmd)3 CloudStackPluginTest (com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest)3 ConnectionTest (com.cloud.hypervisor.ovm3.objects.ConnectionTest)3 LinuxTest (com.cloud.hypervisor.ovm3.objects.LinuxTest)3 NetworkTest (com.cloud.hypervisor.ovm3.objects.NetworkTest)3 XenTest (com.cloud.hypervisor.ovm3.objects.XenTest)3 XmlTestResultTest (com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)3 Ovm3ConfigurationTest (com.cloud.hypervisor.ovm3.resources.helpers.Ovm3ConfigurationTest)3 Ovm3SupportTest (com.cloud.hypervisor.ovm3.support.Ovm3SupportTest)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 CheckRouterCommand (com.cloud.agent.api.CheckRouterCommand)2 CheckS2SVpnConnectionsCommand (com.cloud.agent.api.CheckS2SVpnConnectionsCommand)2 CleanupNetworkRulesCmd (com.cloud.agent.api.CleanupNetworkRulesCmd)2