Search in sources :

Example 1 with AttributeMatcherFramework

use of com.emc.storageos.volumecontroller.impl.utils.AttributeMatcherFramework in project coprhd-controller by CoprHD.

the class PlacementTestUtils method setupSchedulers.

private static PlacementManager setupSchedulers(DbClient dbClient, CoordinatorClient coordinator) {
    PortMetricsProcessor portMetricsProcessor = new PortMetricsProcessor();
    portMetricsProcessor.setDbClient(dbClient);
    portMetricsProcessor.setCoordinator(coordinator);
    PlacementManager placementManager = new PlacementManager();
    placementManager.setDbClient(dbClient);
    Map<String, Scheduler> schedulerMap = new HashMap<String, Scheduler>();
    StorageScheduler storageScheduler = new StorageScheduler();
    storageScheduler.setDbClient(dbClient);
    storageScheduler.setCoordinator(coordinator);
    AttributeMatcherFramework matcherFramework = new AttributeMatcherFramework();
    storageScheduler.setMatcherFramework(matcherFramework);
    storageScheduler.setPortMetricsProcessor(portMetricsProcessor);
    SRDFScheduler srdfScheduler = new SRDFScheduler();
    srdfScheduler.setDbClient(dbClient);
    srdfScheduler.setCoordinator(coordinator);
    srdfScheduler.setBlockScheduler(storageScheduler);
    srdfScheduler._permissionsHelper = new PermissionsHelper(dbClient);
    VPlexScheduler vplexScheduler = new VPlexScheduler();
    vplexScheduler.setDbClient(dbClient);
    vplexScheduler.setBlockScheduler(storageScheduler);
    vplexScheduler.setPlacementManager(placementManager);
    PermissionsHelper permHelperVplex = new PermissionsHelper(dbClient);
    vplexScheduler._permissionsHelper = permHelperVplex;
    RecoverPointScheduler rpScheduler = new RecoverPointScheduler();
    rpScheduler.setDbClient(dbClient);
    rpScheduler.setVplexScheduler(vplexScheduler);
    rpScheduler.setBlockScheduler(storageScheduler);
    PermissionsHelper permHelper = new PermissionsHelper(dbClient);
    rpScheduler._permissionsHelper = permHelper;
    schedulerMap.put("srdf", srdfScheduler);
    schedulerMap.put("vplex", vplexScheduler);
    schedulerMap.put("block", storageScheduler);
    schedulerMap.put("rp", rpScheduler);
    placementManager.setStorageSchedulers(schedulerMap);
    // Set up the new schedulerStack.
    List<String> schedulerStack = new ArrayList<String>();
    schedulerStack.add("rp");
    schedulerStack.add("vplex");
    schedulerStack.add("srdf");
    schedulerStack.add("block");
    placementManager.setSchedulerStack(schedulerStack);
    return placementManager;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) PermissionsHelper(com.emc.storageos.api.service.authorization.PermissionsHelper) PortMetricsProcessor(com.emc.storageos.volumecontroller.impl.plugins.metering.smis.processor.PortMetricsProcessor) AttributeMatcherFramework(com.emc.storageos.volumecontroller.impl.utils.AttributeMatcherFramework)

Aggregations

PermissionsHelper (com.emc.storageos.api.service.authorization.PermissionsHelper)1 PortMetricsProcessor (com.emc.storageos.volumecontroller.impl.plugins.metering.smis.processor.PortMetricsProcessor)1 AttributeMatcherFramework (com.emc.storageos.volumecontroller.impl.utils.AttributeMatcherFramework)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1