"http://localhost/distros/apache/1.0.1/hbase-0.94.0.tar.gz");
Mockito.when(
distroMgr.getPackageUrlByDistroRole("apache",
HadoopRole.ZOOKEEPER_ROLE.toString())).thenReturn(
"http://localhost/distros/apache/1.0.1/zookeeper-3.4.3.tar.gz");
IResourcePoolService resPoolSvc =
context.getBean("resourcePoolService", IResourcePoolService.class);
IDatastoreService dsSvc =
context.getBean("datastoreService", IDatastoreService.class);
INetworkService netSvc =
context.getBean("networkService", INetworkService.class);
cleanUpUtils = new TestResourceCleanupUtils();
cleanUpUtils.setDsSvc(dsSvc);
cleanUpUtils.setNetSvc(netSvc);
cleanUpUtils.setResPoolSvc(resPoolSvc);
cleanupResources();
try {
Set<String> rpNames = resPoolSvc.getAllRPNames();
logger.info("available resource pools: " + rpNames);
resPoolSvc.addResourcePool("myRp1", "cluster1", "rp1");
} catch (Exception e) {
logger.error("ignore create resource pool myRp1 exception. ", e);
}
try {
resPoolSvc.addResourcePool("myRp2", "cluster1", "rp2");
} catch (Exception e) {
logger.error("ignore create resource pool myRp2 exception. ", e);
}
try {
resPoolSvc.addResourcePool("myRp3", "cluster2", "rp1");
} catch (Exception e) {
logger.error("ignore create resource pool myRp3 exception. ", e);
}
try {
resPoolSvc.addResourcePool("myRp4", "cluster2", "rp2");
} catch (Exception e) {
logger.error("ignore create resource pool myRp4 exception. ", e);
}
try {
resPoolSvc.addResourcePool("myRp5", "cluster4", "rp1");
} catch (Exception e) {
logger.error("ignore create resource pool myRp5 exception. ", e);
}
try {
resPoolSvc.addResourcePool("myRp6", "cluster4", "rp2");
} catch (Exception e) {
logger.error("ignore create resource pool myRp6 exception. ", e);
}
try {
netSvc.addDhcpNetwork("dhcpNet1", "CFNetwork");