use of com.emc.storageos.volumecontroller.impl.plugins.discovery.smis.DataCollectionJobUtil in project coprhd-controller by CoprHD.
the class SMICommunicationInterfaceTest method testXIVBlockPlugin.
// Need to start coordinator & DB service, before running this test
@Test
public void testXIVBlockPlugin() {
StorageProvider provider = createXIVProvider();
try {
Map<String, Object> cache = new ConcurrentHashMap<String, Object>();
Set<String> idset = new HashSet<String>();
idset.add("SYMMETRIX+000194900404+VOLUME+00000");
cache.put("000194900404-block-Volumes", idset);
xiv.injectCache(cache);
xiv.injectDBClient(_dbClient);
xiv.injectCoordinatorClient(coordinator);
// scanTest(_smiplugin);
AccessProfile profile = populateSMISAccessProfile(provider);
verifyDB(profile);
Map<String, StorageSystemViewObject> storageSystemsCache = Collections.synchronizedMap(new HashMap<String, StorageSystemViewObject>());
profile.setCache(storageSystemsCache);
xiv.scan(profile);
DataCollectionJobUtil util = new DataCollectionJobUtil();
util.setDbClient(_dbClient);
util.setConfigInfo(configinfo);
List<URI> providerList = new ArrayList<URI>();
providerList.add(provider.getId());
util.performBookKeeping(storageSystemsCache, providerList);
// provider.getStorageSystems();
// profile.setSystemId(provider.getSystemId());
profile.setserialID(profile.getserialID());
xiv.discover(profile);
} catch (Exception e) {
_LOGGER.error(e.getMessage(), e);
}
}
Aggregations