@Test @SuppressWarnings("unchecked") public void testGroupsAsTopologyChild() throws Exception { String adp = new Scanner(new File(Resources.getResource("nuro/iaas/nuro_adp-iaas.yml").toURI())).useDelimiter("\\Z").next(); dam = damGenerator.generateDam(adp); template = YamlParser.load(dam); testMetadataTemplate(template); assertTrue(template.containsKey(DamGenerator.TOPOLOGY_TEMPLATE)); Map<String, Object> topologyTemplate = (Map<String, Object>) template.get(DamGenerator.TOPOLOGY_TEMPLATE); assertTrue(topologyTemplate.containsKey(DamGenerator.GROUPS)); Map<String, Object> topologyGroups = (Map<String, Object>) topologyTemplate.get(DamGenerator.GROUPS); assertNotNull(topologyGroups); assertEquals(topologyGroups.size(), 8); assertTrue(topologyGroups.containsKey("operation_www")); assertTrue(topologyGroups.containsKey("operation_db")); assertTrue(topologyGroups.containsKey("add_brooklyn_location_Amazon_EC2_m1_small_eu_central_1")); assertTrue(topologyGroups.containsKey("add_brooklyn_location_Amazon_EC2_m4_10xlarge_eu_west_1")); assertTrue(topologyGroups.containsKey("monitoringInformation")); assertTrue(topologyGroups.containsKey("sla_gen_info")); assertTrue(topologyGroups.containsKey("seaclouds_monitoring_configuration")); testSeaCloudsPolicy(topologyGroups); }
public String generateDam(String adp) { originalAdp = normalizeComputeTypes(YamlParser.load(adp)); ApplicationFacade applicationFacade = new ApplicationFacade(originalAdp, configBag); applicationFacade.setAgreementGenerator(agreementGenerator); applicationFacade.generateDam(); String generatedDam = applicationFacade.templateToString(); template = YamlParser.load(generatedDam); customize(); return YamlParser.dump(template); }
DamGenerator { public String generateDam(String adp) { originalAdp = normalizeComputeTypes(YamlParser.load(adp)); ApplicationFacade applicationFacade = new ApplicationFacade(originalAdp, configBag); applicationFacade.setAgreementGenerator(agreementGenerator); applicationFacade.generateDam(); String generatedDam = applicationFacade.templateToString(); template = YamlParser.load(generatedDam); customize(); return YamlParser.dump(template); } }
DamGenerator { public String generateDam(String adp) { originalAdp = normalizeComputeTypes(YamlParser.load(adp)); ApplicationFacade applicationFacade = new ApplicationFacade(originalAdp, configBag); applicationFacade.setAgreementGenerator(agreementGenerator); applicationFacade.generateDam(); String generatedDam = applicationFacade.templateToString(); template = YamlParser.load(generatedDam); customize(); return YamlParser.dump(template); } DamGenerator(DamGeneratorConfigBag configBag); }
DamGenerator { public String generateDam(String adp) { originalAdp = normalizeComputeTypes(YamlParser.load(adp)); ApplicationFacade applicationFacade = new ApplicationFacade(originalAdp, configBag); applicationFacade.setAgreementGenerator(agreementGenerator); applicationFacade.generateDam(); String generatedDam = applicationFacade.templateToString(); template = YamlParser.load(generatedDam); customize(); return YamlParser.dump(template); } DamGenerator(DamGeneratorConfigBag configBag); String generateDam(String adp); void relationManagement(); void setAgreementGenerator(AgreementGenerator agreementGenerator); }
DamGenerator { public String generateDam(String adp) { originalAdp = normalizeComputeTypes(YamlParser.load(adp)); ApplicationFacade applicationFacade = new ApplicationFacade(originalAdp, configBag); applicationFacade.setAgreementGenerator(agreementGenerator); applicationFacade.generateDam(); String generatedDam = applicationFacade.templateToString(); template = YamlParser.load(generatedDam); customize(); return YamlParser.dump(template); } DamGenerator(DamGeneratorConfigBag configBag); String generateDam(String adp); void relationManagement(); void setAgreementGenerator(AgreementGenerator agreementGenerator); static final String TYPE; static final String POLICIES; static final String GROUPS; static final String MEMBERS; static final String ID; static final String APPLICATION; static final String TOPOLOGY_TEMPLATE; static final String NODE_TEMPLATES; static final String NODE_TYPES; static final String PROPERTIES; static final String BROOKLYN_POLICY_TYPE; static final String SEACLOUDS_APPLICATION_CONFIGURATION; static final String SEACLOUDS_MONITORING_INITIALIZATION; static final String REQUIREMENTS; static final String HOST; }