@Test public void injectNodeTemplatePropertiesAsInputs() throws Exception { PaaSNodeTemplate paaSNodeTemplate = buildPaaSNodeTemplate(); PaaSUtils.processNodeTemplateProperties(paaSNodeTemplate); Operation operation = paaSNodeTemplate.getInterfaces().get(interface1).getOperations().get(operation1); Assert.assertNotNull(operation.getInputParameters()); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + fake1)); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + fake5)); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + fake2)); Assert.assertFalse(operation.getInputParameters().containsKey(fake3)); Assert.assertEquals(operation.getInputParameters().get(fake1), new ScalarPropertyValue("1_from_operation")); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + generateCapaInputName(fakeCapa1, fake1))); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + generateCapaInputName(fakeCapa1, fake3))); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + generateCapaInputName(fakeCapa1, fake2))); Assert.assertTrue(operation.getInputParameters().containsKey(SELF + generateCapaInputName(fakeCapa1, fake5))); }
public static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate) { NodeTemplate template = paaSTemplate.getTemplate(); if (MapUtils.isNotEmpty(template.getProperties())) { injectPropertiesAsInputs(ToscaFunctionConstants.SELF, null, template.getProperties(), paaSTemplate.getInterfaces(), baseName -> StringUtils.joinWith(AlienUtils.DEFAULT_PREFIX_SEPARATOR, ToscaFunctionConstants.SELF, baseName)); } injectCapabilitiesProperties(template, paaSTemplate.getInterfaces()); }
PaaSUtils { public static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate) { NodeTemplate template = paaSTemplate.getTemplate(); if (MapUtils.isNotEmpty(template.getProperties())) { injectPropertiesAsInputs(ToscaFunctionConstants.SELF, null, template.getProperties(), paaSTemplate.getInterfaces(), baseName -> StringUtils.joinWith(AlienUtils.DEFAULT_PREFIX_SEPARATOR, ToscaFunctionConstants.SELF, baseName)); } injectCapabilitiesProperties(template, paaSTemplate.getInterfaces()); } }
PaaSUtils { public static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate) { NodeTemplate template = paaSTemplate.getTemplate(); if (MapUtils.isNotEmpty(template.getProperties())) { injectPropertiesAsInputs(ToscaFunctionConstants.SELF, null, template.getProperties(), paaSTemplate.getInterfaces(), baseName -> StringUtils.joinWith(AlienUtils.DEFAULT_PREFIX_SEPARATOR, ToscaFunctionConstants.SELF, baseName)); } injectCapabilitiesProperties(template, paaSTemplate.getInterfaces()); }  }
PaaSUtils { public static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate) { NodeTemplate template = paaSTemplate.getTemplate(); if (MapUtils.isNotEmpty(template.getProperties())) { injectPropertiesAsInputs(ToscaFunctionConstants.SELF, null, template.getProperties(), paaSTemplate.getInterfaces(), baseName -> StringUtils.joinWith(AlienUtils.DEFAULT_PREFIX_SEPARATOR, ToscaFunctionConstants.SELF, baseName)); } injectCapabilitiesProperties(template, paaSTemplate.getInterfaces()); }  static PaaSNodeTemplate getMandatoryHostTemplate(final PaaSNodeTemplate paaSNodeTemplate); static PaaSNodeTemplate getHostTemplate(PaaSNodeTemplate paaSNodeTemplate); static void injectPropertiesAsOperationInputs(Map<String, PaaSNodeTemplate> nodeTemplates); static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate); static void processRelationshipTemplateProperties(PaaSRelationshipTemplate paaSRelationshipTemplate,
            Map<String, PaaSNodeTemplate> paaSNodeTemplates); }
PaaSUtils { public static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate) { NodeTemplate template = paaSTemplate.getTemplate(); if (MapUtils.isNotEmpty(template.getProperties())) { injectPropertiesAsInputs(ToscaFunctionConstants.SELF, null, template.getProperties(), paaSTemplate.getInterfaces(), baseName -> StringUtils.joinWith(AlienUtils.DEFAULT_PREFIX_SEPARATOR, ToscaFunctionConstants.SELF, baseName)); } injectCapabilitiesProperties(template, paaSTemplate.getInterfaces()); }  static PaaSNodeTemplate getMandatoryHostTemplate(final PaaSNodeTemplate paaSNodeTemplate); static PaaSNodeTemplate getHostTemplate(PaaSNodeTemplate paaSNodeTemplate); static void injectPropertiesAsOperationInputs(Map<String, PaaSNodeTemplate> nodeTemplates); static void processNodeTemplateProperties(PaaSNodeTemplate paaSTemplate); static void processRelationshipTemplateProperties(PaaSRelationshipTemplate paaSRelationshipTemplate,
            Map<String, PaaSNodeTemplate> paaSNodeTemplates); final static String CAPABILITIES; }