Search in sources :

Example 1 with SecondaryStorageResource

use of org.apache.cloudstack.storage.resource.SecondaryStorageResource in project cloudstack by apache.

the class SimulatorSecondaryDiscoverer method find.

@Override
public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI uri, String username, String password, List<String> hostTags) {
    if (!uri.getScheme().equalsIgnoreCase("sim")) {
        s_logger.debug("It's not NFS or file or ISO, so not a secondary storage server: " + uri.toString());
        return null;
    }
    List<ImageStoreVO> stores = imageStoreDao.listImageStores();
    for (ImageStoreVO store : stores) {
        _mockStorageMgr.preinstallTemplates(store.getUrl(), dcId);
    }
    Map<SecondaryStorageResource, Map<String, String>> resources = new HashMap<SecondaryStorageResource, Map<String, String>>();
    resources.put(this.resource, new HashMap<String, String>());
    return resources;
}
Also used : HashMap(java.util.HashMap) ImageStoreVO(org.apache.cloudstack.storage.datastore.db.ImageStoreVO) HashMap(java.util.HashMap) Map(java.util.Map) SecondaryStorageResource(org.apache.cloudstack.storage.resource.SecondaryStorageResource)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 ImageStoreVO (org.apache.cloudstack.storage.datastore.db.ImageStoreVO)1 SecondaryStorageResource (org.apache.cloudstack.storage.resource.SecondaryStorageResource)1