Search in sources :

Example 1 with RPProtectionRecommendation

use of com.emc.storageos.volumecontroller.RPProtectionRecommendation in project coprhd-controller by CoprHD.

the class RecoverPointSchedulerTest method fireProtectionPlacementRulesCLRSite1NoCapacityTest.

@Test
public void fireProtectionPlacementRulesCLRSite1NoCapacityTest() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, SecurityException, NoSuchMethodException {
    ProtectionSystem ps = buildProtectionSystemWithCapacity();
    // set the remote site vol capacity to 1 less than full.
    ps.getSiteVolumeCount().remove("1");
    ps.getSiteVolumeCount().put("1", "510");
    RPProtectionRecommendation ppm1 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm1, ps, "1", "2", nh1, nh2, pool1, poolA, 1);
    RPProtectionRecommendation ppm2 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm2, ps, "1", "2", nh1, nh2, pool1, poolB, 1);
    RPProtectionRecommendation ppm3 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm3, ps, "1", "2", nh1, nh2, pool2, poolA, 2);
    RPProtectionRecommendation ppm4 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm4, ps, "1", "2", nh1, nh2, pool3, poolB, 4);
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm1, 1));
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm2, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm3, 2));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm4, 4));
}
Also used : RPProtectionRecommendation(com.emc.storageos.volumecontroller.RPProtectionRecommendation) ProtectionSystem(com.emc.storageos.db.client.model.ProtectionSystem) Test(org.junit.Test)

Example 2 with RPProtectionRecommendation

use of com.emc.storageos.volumecontroller.RPProtectionRecommendation in project coprhd-controller by CoprHD.

the class RecoverPointSchedulerTest method fireProtectionPlacementRulesCDPValidTest.

@Test
public void fireProtectionPlacementRulesCDPValidTest() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, SecurityException, NoSuchMethodException {
    ProtectionSystem ps = buildProtectionSystemWithCapacity();
    RPProtectionRecommendation ppm1 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm1, ps, "1", "1", nh1, nh1, pool1, pool1, 1);
    RPProtectionRecommendation ppm2 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm2, ps, "1", "1", nh1, nh1, pool1, pool2, 1);
    RPProtectionRecommendation ppm3 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm3, ps, "1", "1", nh1, nh1, pool2, pool1, 1);
    RPProtectionRecommendation ppm4 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm4, ps, "1", "1", nh1, nh1, pool2, pool2, 1);
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm1, 1));
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm2, 1));
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm3, 1));
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm4, 1));
}
Also used : RPProtectionRecommendation(com.emc.storageos.volumecontroller.RPProtectionRecommendation) ProtectionSystem(com.emc.storageos.db.client.model.ProtectionSystem) Test(org.junit.Test)

Example 3 with RPProtectionRecommendation

use of com.emc.storageos.volumecontroller.RPProtectionRecommendation in project coprhd-controller by CoprHD.

the class RecoverPointSchedulerTest method fireProtectionPlacementRulesCDPNoCapacity.

@Test
public void fireProtectionPlacementRulesCDPNoCapacity() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, SecurityException, NoSuchMethodException {
    ProtectionSystem ps = this.buildProtectionSystemWithNoCapacity();
    RPProtectionRecommendation ppm1 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm1, ps, "1", "1", nh1, nh1, pool1, pool1, 1);
    RPProtectionRecommendation ppm2 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm2, ps, "1", "1", nh1, nh1, pool1, pool2, 1);
    RPProtectionRecommendation ppm3 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm3, ps, "1", "1", nh1, nh1, pool2, pool1, 1);
    RPProtectionRecommendation ppm4 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm4, ps, "1", "1", nh1, nh1, pool2, pool2, 1);
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm1, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm2, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm3, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm4, 1));
}
Also used : RPProtectionRecommendation(com.emc.storageos.volumecontroller.RPProtectionRecommendation) ProtectionSystem(com.emc.storageos.db.client.model.ProtectionSystem) Test(org.junit.Test)

Example 4 with RPProtectionRecommendation

use of com.emc.storageos.volumecontroller.RPProtectionRecommendation in project coprhd-controller by CoprHD.

the class RecoverPointSchedulerTest method fireProtectionPlacementRulesCLRSite1NoCapacityMultiVolumeTest.

@Test
public void fireProtectionPlacementRulesCLRSite1NoCapacityMultiVolumeTest() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, SecurityException, NoSuchMethodException {
    ProtectionSystem ps = buildProtectionSystemWithCapacity();
    // set the remote site vol capacity to 1 less than full.
    ps.getSiteVolumeCount().remove("1");
    ps.getSiteVolumeCount().put("1", "510");
    RPProtectionRecommendation ppm1 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm1, ps, "1", "2", nh1, nh2, pool1, poolA, 1);
    RPProtectionRecommendation ppm2 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm2, ps, "1", "2", nh1, nh2, pool1, poolB, 1);
    RPProtectionRecommendation ppm3 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm3, ps, "1", "2", nh1, nh2, pool2, poolA, 2);
    RPProtectionRecommendation ppm4 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm4, ps, "1", "2", nh1, nh2, pool3, poolB, 4);
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm1, 1));
    assertTrue(invokeFireProtectionPlacementRules(ps, ppm2, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm3, 2));
    assertTrue(!invokeFireProtectionPlacementRules(ps, ppm4, 4));
}
Also used : RPProtectionRecommendation(com.emc.storageos.volumecontroller.RPProtectionRecommendation) ProtectionSystem(com.emc.storageos.db.client.model.ProtectionSystem) Test(org.junit.Test)

Example 5 with RPProtectionRecommendation

use of com.emc.storageos.volumecontroller.RPProtectionRecommendation in project coprhd-controller by CoprHD.

the class RecoverPointSchedulerTest method fireProtectionPlacementRulesCDPMixedProtectionSystems.

@Test
public void fireProtectionPlacementRulesCDPMixedProtectionSystems() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, SecurityException, NoSuchMethodException {
    ProtectionSystem ps1 = this.buildProtectionSystemWithCapacity();
    ProtectionSystem ps2 = this.buildProtectionSystemNoCGAvailability();
    RPProtectionRecommendation ppm1 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm1, ps1, "1", "1", nh1, nh1, pool1, pool1, 1);
    RPProtectionRecommendation ppm2 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm2, ps2, "1", "1", nh2, nh2, poolA, poolB, 1);
    RPProtectionRecommendation ppm3 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm3, ps2, "1", "1", nh2, nh2, poolA, poolA, 1);
    RPProtectionRecommendation ppm4 = new RPProtectionRecommendation();
    fillRecommendationObject(ppm4, ps2, "1", "1", nh2, nh2, poolB, poolB, 1);
    assertTrue(invokeFireProtectionPlacementRules(ps1, ppm1, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps2, ppm2, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps2, ppm3, 1));
    assertTrue(!invokeFireProtectionPlacementRules(ps2, ppm4, 1));
}
Also used : RPProtectionRecommendation(com.emc.storageos.volumecontroller.RPProtectionRecommendation) ProtectionSystem(com.emc.storageos.db.client.model.ProtectionSystem) Test(org.junit.Test)

Aggregations

RPProtectionRecommendation (com.emc.storageos.volumecontroller.RPProtectionRecommendation)33 ProtectionSystem (com.emc.storageos.db.client.model.ProtectionSystem)25 RPRecommendation (com.emc.storageos.volumecontroller.RPRecommendation)22 ArrayList (java.util.ArrayList)20 Test (org.junit.Test)20 VirtualArray (com.emc.storageos.db.client.model.VirtualArray)18 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)18 StoragePool (com.emc.storageos.db.client.model.StoragePool)17 BlockConsistencyGroup (com.emc.storageos.db.client.model.BlockConsistencyGroup)15 VirtualPoolCapabilityValuesWrapper (com.emc.storageos.volumecontroller.impl.utils.VirtualPoolCapabilityValuesWrapper)15 NamedURI (com.emc.storageos.db.client.model.NamedURI)13 List (java.util.List)13 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)12 StringSet (com.emc.storageos.db.client.model.StringSet)12 VpoolProtectionVarraySettings (com.emc.storageos.db.client.model.VpoolProtectionVarraySettings)12 Recommendation (com.emc.storageos.volumecontroller.Recommendation)12 Project (com.emc.storageos.db.client.model.Project)11 StringMap (com.emc.storageos.db.client.model.StringMap)11 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)11 Network (com.emc.storageos.db.client.model.Network)10