Search in sources :

Example 56 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class MultipleServicesMonitoringStrategyTest method testProcessingSoftwareGluster.

@Test
public void testProcessingSoftwareGluster() {
    doThrow(new RuntimeException()).when(glusterStrategy).processSoftwareCapabilities(any());
    exception.expect(RuntimeException.class);
    VDS vds = new VDS();
    strategy.processSoftwareCapabilities(vds);
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) Test(org.junit.Test)

Example 57 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class VirtMonitoringStrategyTest method testProtectRhel7InRhel6.

@Test
public void testProtectRhel7InRhel6() {
    VDS vds = createBaseVds();
    vdsFromDb.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
    vds.setHostOs("RHEL - 7Server - 1.el7");
    virtStrategy.processSoftwareCapabilities(vds);
    assertEquals(VDSStatus.NonOperational, vds.getStatus());
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) Test(org.junit.Test)

Example 58 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class VirtMonitoringStrategyTest method testNeedToProcessHardwareCapsFalse.

@Test
public void testNeedToProcessHardwareCapsFalse() {
    VDS oldVds = new VDS();
    oldVds.setClusterId(Guid.newGuid());
    oldVds.setId(Guid.newGuid());
    oldVds.setCpuFlags("flag1");
    VDS newVds = oldVds.clone();
    assertFalse(virtStrategy.processHardwareCapabilitiesNeeded(oldVds, newVds));
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) Test(org.junit.Test)

Example 59 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class VirtMonitoringStrategyTest method testAllowRhel6InRhel7.

@Test
public void testAllowRhel6InRhel7() {
    VDS vds = createBaseVds();
    vdsFromDb.setHostOs("RHEL - 7Server - 1.el7");
    vds.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
    cluster.setClusterPolicyId(ClusterPolicy.UPGRADE_POLICY_GUID);
    virtStrategy.processSoftwareCapabilities(vds);
    assertFalse(vds.getStatus().equals(VDSStatus.NonOperational));
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) Test(org.junit.Test)

Example 60 with VDS

use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.

the class VirtMonitoringStrategyTest method testAllowRhel7InRhel6.

@Test
public void testAllowRhel7InRhel6() {
    VDS vds = createBaseVds();
    vdsFromDb.setHostOs("RHEL - 6Server - 6.5.0.1.el6");
    vds.setHostOs("RHEL - 7Server - 1.el7");
    cluster.setClusterPolicyId(ClusterPolicy.UPGRADE_POLICY_GUID);
    virtStrategy.processSoftwareCapabilities(vds);
    assertFalse(vds.getStatus().equals(VDSStatus.NonOperational));
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) Test(org.junit.Test)

Aggregations

VDS (org.ovirt.engine.core.common.businessentities.VDS)578 ArrayList (java.util.ArrayList)160 Test (org.junit.Test)138 Guid (org.ovirt.engine.core.compat.Guid)132 List (java.util.List)78 VM (org.ovirt.engine.core.common.businessentities.VM)65 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)55 HashMap (java.util.HashMap)53 HashSet (java.util.HashSet)48 Map (java.util.Map)45 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)42 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)42 Set (java.util.Set)40 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)39 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)39 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)39 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)38 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)38 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)37 Frontend (org.ovirt.engine.ui.frontend.Frontend)35