Search in sources :

Example 1 with Ovm3Configuration

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

the class Ovm3HypervisorResourceTest method vmActionPreparation.

private Ovm3HypervisorResource vmActionPreparation() throws ConfigurationException {
    Ovm3Configuration config = new Ovm3Configuration(configTest.getParams());
    con = support.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 2 with Ovm3Configuration

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

the class Ovm3VirtualRoutingResourceTest 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()));
    virtualrouting.setConnection(con);
    return con;
}
Also used : Ovm3Configuration(com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration)

Example 3 with Ovm3Configuration

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

the class Ovm3HypervisorSupportTest method GetHostStatsCommandFailTest.

@Test
public void GetHostStatsCommandFailTest() throws ConfigurationException {
    con = prepare();
    Ovm3Configuration config = new Ovm3Configuration(configTest.getParams());
    GetHostStatsCommand cmd = new GetHostStatsCommand(config.getCsHostGuid(), config.getAgentName(), 1L);
    con.setNull();
    Answer ra = hypervisor.executeRequest(cmd);
    results.basicBooleanTest(ra.getResult(), false);
}
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)

Example 4 with Ovm3Configuration

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

the class Ovm3HypervisorSupportTest method prepare.

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

Example 5 with Ovm3Configuration

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

the class Ovm3HypervisorSupportTest method ReportedVmStatesTest.

@Test
public void ReportedVmStatesTest() throws ConfigurationException, Ovm3ResourceException {
    Ovm3Configuration config = new Ovm3Configuration(configTest.getParams());
    con.setResult(xen.getMultipleVmsListXML());
    Ovm3HypervisorSupport hypervisor = new Ovm3HypervisorSupport(con, config);
    hypervisor.vmStateMapClear();
    State vmState = hypervisor.getVmState(vmName);
    results.basicStringTest(vmState.toString(), State.Running.toString());
    hypervisor.setVmStateStarting(vmName);
    results.basicStringTest(hypervisor.getVmState(vmName).toString(), State.Starting.toString());
    hypervisor.setVmState(vmName, State.Running);
    results.basicStringTest(hypervisor.getVmState(vmName).toString(), State.Running.toString());
    hypervisor.revmoveVmState(vmName);
    assertNull(hypervisor.getVmState(vmName));
}
Also used : State(com.cloud.vm.VirtualMachine.State) 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