Search in sources :

Example 6 with Ovm3Configuration

use of com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration in project cloudstack by apache.

the class Ovm3StorageProcessorTest method prepare.

private ConnectionTest prepare() throws ConfigurationException {
    Ovm3Configuration config = new Ovm3Configuration(configTest.getParams());
    con = support.prepConnectionResults();
    hypervisor.setConnection(con);
    results.basicBooleanTest(hypervisor.configure(config.getAgentName(), configTest.getParams()));
    return con;
}
Also used : Ovm3Configuration(com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration)

Example 7 with Ovm3Configuration

use of com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration in project cloudstack by apache.

the class Ovm3VmSupportTest method GetVmStatsCommandTest.

@Test
public void GetVmStatsCommandTest() throws ConfigurationException {
    hypervisor = support.prepare(configTest.getParams());
    Ovm3Configuration configuration = new Ovm3Configuration(configTest.getParams());
    List<String> vms = new ArrayList<String>();
    vms.add(xen.getVmName());
    GetVmStatsCommand cmd = new GetVmStatsCommand(vms, configuration.getCsHostGuid(), hypervisor.getName());
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult());
    cmd = new GetVmStatsCommand(vms, configuration.getCsHostGuid(), hypervisor.getName());
    ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult());
}
Also used : Answer(com.cloud.agent.api.Answer) ArrayList(java.util.ArrayList) GetVmStatsCommand(com.cloud.agent.api.GetVmStatsCommand) Test(org.junit.Test) ConnectionTest(com.cloud.hypervisor.ovm3.objects.ConnectionTest) CloudStackPluginTest(com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest) 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 8 with Ovm3Configuration

use of com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration in project cloudstack by apache.

the class Ovm3VmSupportTest method MigrateCommandTest.

@Test
public void MigrateCommandTest() throws ConfigurationException, Ovm3ResourceException {
    Ovm3Configuration configuration = new Ovm3Configuration(configTest.getParams());
    hypervisor = support.prepare(configTest.getParams());
    MigrateCommand cmd = new MigrateCommand(xen.getVmName(), configuration.getAgentIp(), false, hyperTest.createVm(xen.getVmName()), false);
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult());
}
Also used : Answer(com.cloud.agent.api.Answer) MigrateCommand(com.cloud.agent.api.MigrateCommand) Test(org.junit.Test) ConnectionTest(com.cloud.hypervisor.ovm3.objects.ConnectionTest) CloudStackPluginTest(com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest) 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 9 with Ovm3Configuration

use of com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration in project cloudstack by apache.

the class Ovm3SupportTest method prepare.

public Ovm3HypervisorResource prepare(Map<String, Object> params) throws ConfigurationException {
    Ovm3Configuration config = new Ovm3Configuration(params);
    con = prepConnectionResults();
    hypervisor.setConnection(con);
    results.basicBooleanTest(hypervisor.configure(config.getAgentName(), configTest.getParams()));
    return hypervisor;
}
Also used : Ovm3Configuration(com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration)

Example 10 with Ovm3Configuration

use of com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration in project cloudstack by apache.

the class Ovm3HypervisorSupportTest method GetHostStatsCommandTest.

@Test
public void GetHostStatsCommandTest() throws ConfigurationException {
    con = prepare();
    Ovm3Configuration config = new Ovm3Configuration(configTest.getParams());
    GetHostStatsCommand cmd = new GetHostStatsCommand(config.getCsHostGuid(), config.getAgentName(), 1L);
    con.setResult(this.dom0stats);
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult());
}
Also used : Answer(com.cloud.agent.api.Answer) GetHostStatsCommand(com.cloud.agent.api.GetHostStatsCommand) Test(org.junit.Test) ConnectionTest(com.cloud.hypervisor.ovm3.objects.ConnectionTest) LinuxTest(com.cloud.hypervisor.ovm3.objects.LinuxTest) NetworkTest(com.cloud.hypervisor.ovm3.objects.NetworkTest) XenTest(com.cloud.hypervisor.ovm3.objects.XenTest) Ovm3SupportTest(com.cloud.hypervisor.ovm3.support.Ovm3SupportTest) XmlTestResultTest(com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)

Aggregations

ConnectionTest (com.cloud.hypervisor.ovm3.objects.ConnectionTest)11 XenTest (com.cloud.hypervisor.ovm3.objects.XenTest)11 XmlTestResultTest (com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)11 Ovm3SupportTest (com.cloud.hypervisor.ovm3.support.Ovm3SupportTest)11 Test (org.junit.Test)11 Ovm3Configuration (com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration)10 NetworkTest (com.cloud.hypervisor.ovm3.objects.NetworkTest)9 CloudStackPluginTest (com.cloud.hypervisor.ovm3.objects.CloudStackPluginTest)7 Ovm3ConfigurationTest (com.cloud.hypervisor.ovm3.resources.helpers.Ovm3ConfigurationTest)5 Answer (com.cloud.agent.api.Answer)4 LinuxTest (com.cloud.hypervisor.ovm3.objects.LinuxTest)4 GetHostStatsCommand (com.cloud.agent.api.GetHostStatsCommand)2 Ovm3HypervisorResourceTest (com.cloud.hypervisor.ovm3.resources.Ovm3HypervisorResourceTest)2 GetVmStatsCommand (com.cloud.agent.api.GetVmStatsCommand)1 MigrateCommand (com.cloud.agent.api.MigrateCommand)1 StartupCommand (com.cloud.agent.api.StartupCommand)1 StartupRoutingCommand (com.cloud.agent.api.StartupRoutingCommand)1 VirtualRoutingResource (com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource)1 Connection (com.cloud.hypervisor.ovm3.objects.Connection)1 Ovm3ResourceException (com.cloud.hypervisor.ovm3.objects.Ovm3ResourceException)1