Search in sources :

Example 16 with PhysicalNetworkSetupInfo

use of com.cloud.network.PhysicalNetworkSetupInfo in project cloudstack by apache.

the class Ovm3HypervisorNetworkTest method CheckNetworkCommandPublicFailTest.

@Test
public void CheckNetworkCommandPublicFailTest() throws ConfigurationException {
    hypervisor = support.prepare(configTest.getParams());
    List<PhysicalNetworkSetupInfo> setups = new ArrayList<PhysicalNetworkSetupInfo>();
    PhysicalNetworkSetupInfo networkInfo = new PhysicalNetworkSetupInfo();
    networkInfo.setPublicNetworkName(network.getInterface() + "." + 3000);
    setups.add(networkInfo);
    CheckNetworkCommand cmd = new CheckNetworkCommand(setups);
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult(), false);
}
Also used : Answer(com.cloud.agent.api.Answer) ArrayList(java.util.ArrayList) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PhysicalNetworkSetupInfo(com.cloud.network.PhysicalNetworkSetupInfo) Test(org.junit.Test) ConnectionTest(com.cloud.hypervisor.ovm3.objects.ConnectionTest) CloudStackPluginTest(com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest) NetworkTest(com.cloud.hypervisor.ovm3.objects.NetworkTest) XenTest(com.cloud.hypervisor.ovm3.objects.XenTest) Ovm3HypervisorResourceTest(com.cloud.hypervisor.ovm3.resources.Ovm3HypervisorResourceTest) Ovm3SupportTest(com.cloud.hypervisor.ovm3.support.Ovm3SupportTest) XmlTestResultTest(com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)

Example 17 with PhysicalNetworkSetupInfo

use of com.cloud.network.PhysicalNetworkSetupInfo in project cloudstack by apache.

the class Ovm3HypervisorNetworkTest method CheckNetworkCommandTest.

@Test
public void CheckNetworkCommandTest() throws ConfigurationException {
    hypervisor = support.prepare(configTest.getParams());
    List<PhysicalNetworkSetupInfo> setups = new ArrayList<PhysicalNetworkSetupInfo>();
    PhysicalNetworkSetupInfo networkInfo = new PhysicalNetworkSetupInfo();
    setups.add(networkInfo);
    CheckNetworkCommand cmd = new CheckNetworkCommand(setups);
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult());
}
Also used : Answer(com.cloud.agent.api.Answer) ArrayList(java.util.ArrayList) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PhysicalNetworkSetupInfo(com.cloud.network.PhysicalNetworkSetupInfo) Test(org.junit.Test) ConnectionTest(com.cloud.hypervisor.ovm3.objects.ConnectionTest) CloudStackPluginTest(com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest) NetworkTest(com.cloud.hypervisor.ovm3.objects.NetworkTest) XenTest(com.cloud.hypervisor.ovm3.objects.XenTest) Ovm3HypervisorResourceTest(com.cloud.hypervisor.ovm3.resources.Ovm3HypervisorResourceTest) Ovm3SupportTest(com.cloud.hypervisor.ovm3.support.Ovm3SupportTest) XmlTestResultTest(com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)

Example 18 with PhysicalNetworkSetupInfo

use of com.cloud.network.PhysicalNetworkSetupInfo in project cloudstack by apache.

the class XenServer610WrapperTest method testCheckNetworkCommandFailure.

@Test
public void testCheckNetworkCommandFailure() {
    final XenServer610Resource xenServer610Resource = new XenServer610Resource();
    final PhysicalNetworkSetupInfo info = new PhysicalNetworkSetupInfo();
    final List<PhysicalNetworkSetupInfo> setupInfos = new ArrayList<PhysicalNetworkSetupInfo>();
    setupInfos.add(info);
    final CheckNetworkCommand checkNet = new CheckNetworkCommand(setupInfos);
    final Answer answer = xenServer610Resource.executeRequest(checkNet);
    assertTrue(answer.getResult());
}
Also used : Answer(com.cloud.agent.api.Answer) XenServer610Resource(com.cloud.hypervisor.xenserver.resource.XenServer610Resource) ArrayList(java.util.ArrayList) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PhysicalNetworkSetupInfo(com.cloud.network.PhysicalNetworkSetupInfo) Test(org.junit.Test)

Example 19 with PhysicalNetworkSetupInfo

use of com.cloud.network.PhysicalNetworkSetupInfo in project cloudstack by apache.

the class NotAValidCommand method testCheckNetworkCommandSuccess.

@Test
public void testCheckNetworkCommandSuccess() {
    final List<PhysicalNetworkSetupInfo> setupInfos = new ArrayList<PhysicalNetworkSetupInfo>();
    final CheckNetworkCommand checkNet = new CheckNetworkCommand(setupInfos);
    final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(checkNet, citrixResourceBase);
    assertTrue(answer.getResult());
}
Also used : RebootAnswer(com.cloud.agent.api.RebootAnswer) CreateAnswer(com.cloud.agent.api.storage.CreateAnswer) AttachAnswer(org.apache.cloudstack.storage.command.AttachAnswer) Answer(com.cloud.agent.api.Answer) ArrayList(java.util.ArrayList) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PhysicalNetworkSetupInfo(com.cloud.network.PhysicalNetworkSetupInfo) Test(org.junit.Test)

Example 20 with PhysicalNetworkSetupInfo

use of com.cloud.network.PhysicalNetworkSetupInfo in project cloudstack by apache.

the class NotAValidCommand method testCheckNetworkCommandFailure.

@Test
public void testCheckNetworkCommandFailure() {
    final PhysicalNetworkSetupInfo info = new PhysicalNetworkSetupInfo();
    final List<PhysicalNetworkSetupInfo> setupInfos = new ArrayList<PhysicalNetworkSetupInfo>();
    setupInfos.add(info);
    final CheckNetworkCommand checkNet = new CheckNetworkCommand(setupInfos);
    final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(checkNet, citrixResourceBase);
    assertFalse(answer.getResult());
}
Also used : RebootAnswer(com.cloud.agent.api.RebootAnswer) CreateAnswer(com.cloud.agent.api.storage.CreateAnswer) AttachAnswer(org.apache.cloudstack.storage.command.AttachAnswer) Answer(com.cloud.agent.api.Answer) ArrayList(java.util.ArrayList) CheckNetworkCommand(com.cloud.agent.api.CheckNetworkCommand) PhysicalNetworkSetupInfo(com.cloud.network.PhysicalNetworkSetupInfo) Test(org.junit.Test)

Aggregations

PhysicalNetworkSetupInfo (com.cloud.network.PhysicalNetworkSetupInfo)21 CheckNetworkCommand (com.cloud.agent.api.CheckNetworkCommand)15 ArrayList (java.util.ArrayList)14 Answer (com.cloud.agent.api.Answer)13 Test (org.junit.Test)13 CheckNetworkAnswer (com.cloud.agent.api.CheckNetworkAnswer)6 AttachAnswer (org.apache.cloudstack.storage.command.AttachAnswer)6 CloudStackPluginTest (com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest)5 ConnectionTest (com.cloud.hypervisor.ovm3.objects.ConnectionTest)5 NetworkTest (com.cloud.hypervisor.ovm3.objects.NetworkTest)5 XenTest (com.cloud.hypervisor.ovm3.objects.XenTest)5 XmlTestResultTest (com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)5 Ovm3HypervisorResourceTest (com.cloud.hypervisor.ovm3.resources.Ovm3HypervisorResourceTest)5 Ovm3SupportTest (com.cloud.hypervisor.ovm3.support.Ovm3SupportTest)5 CheckRouterAnswer (com.cloud.agent.api.CheckRouterAnswer)4 LibvirtRequestWrapper (com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper)4 RebootAnswer (com.cloud.agent.api.RebootAnswer)2 CreateAnswer (com.cloud.agent.api.storage.CreateAnswer)2 StartupRoutingCommand (com.cloud.agent.api.StartupRoutingCommand)1 ClusterVO (com.cloud.dc.ClusterVO)1