validateCartridge(parser);
// deploy - grab cartridges
List<Cartridge> cartridges = parser.getCartridgesList();
ThreadExecutor exec = new ThreadExecutor(3);
// create Jclouds objects, for each IaaS
for (Cartridge cartridge : cartridges) {
// jclouds object building is time consuming, hence I use Java executor framework
exec.execute(new JcloudsObjectBuilder(cartridge, deploymentFileData));
}
exec.shutdown();
// update map
fileToCartridgeListMap.put(deploymentFileData.getAbsolutePath(),
new ArrayList<Cartridge>(cartridges));
log.info("Successfully deployed the Cartridge definition specified at "+deploymentFileData.getAbsolutePath());