Search in sources :

Example 1 with HypervisorHostListener

use of com.cloud.engine.subsystem.api.storage.HypervisorHostListener in project cosmic by MissionCriticalCloud.

the class StorageManagerImpl method connectHostToSharedPool.

@Override
public void connectHostToSharedPool(final long hostId, final long poolId) throws StorageUnavailableException, StorageConflictException {
    final StoragePool pool = (StoragePool) _dataStoreMgr.getDataStore(poolId, DataStoreRole.Primary);
    assert pool.isShared() : "Now, did you actually read the name of this method?";
    s_logger.debug("Adding pool " + pool.getName() + " to  host " + hostId);
    final DataStoreProvider provider = _dataStoreProviderMgr.getDataStoreProvider(pool.getStorageProviderName());
    final HypervisorHostListener listener = hostListeners.get(provider.getName());
    listener.hostConnect(hostId, pool.getId());
}
Also used : HypervisorHostListener(com.cloud.engine.subsystem.api.storage.HypervisorHostListener) DataStoreProvider(com.cloud.engine.subsystem.api.storage.DataStoreProvider)

Aggregations

DataStoreProvider (com.cloud.engine.subsystem.api.storage.DataStoreProvider)1 HypervisorHostListener (com.cloud.engine.subsystem.api.storage.HypervisorHostListener)1