Search in sources :

Example 1 with SetNodePropertyAsInputOperation

use of org.alien4cloud.tosca.editor.operations.nodetemplate.inputs.SetNodePropertyAsInputOperation in project alien4cloud by alien4cloud.

the class InputPropertiesStepDefinitions method I_define_the_property_of_the_node_as_input_property.

@When("^I define the property \"([^\"]*)\" of the node \"([^\"]*)\" as input property$")
public void I_define_the_property_of_the_node_as_input_property(String inputId, String nodeName) throws Throwable {
    // get the topologyTDO to have the real type of the propertyDefinition
    PropertyDefinition propertyDefinition = getPropertyDefinition(nodeName, inputId);
    AddInputOperation addInputOperation = new AddInputOperation();
    addInputOperation.setPropertyDefinition(propertyDefinition);
    addInputOperation.setInputName(inputId);
    EditorStepDefinitions.do_i_execute_the_operation(addInputOperation);
    SetNodePropertyAsInputOperation setNodePropertyAsInputOperation = new SetNodePropertyAsInputOperation();
    setNodePropertyAsInputOperation.setInputName(inputId);
    setNodePropertyAsInputOperation.setPropertyName(inputId);
    setNodePropertyAsInputOperation.setNodeName(nodeName);
    EditorStepDefinitions.do_i_execute_the_operation(setNodePropertyAsInputOperation);
    EditorStepDefinitions.do_i_save_the_topology();
}
Also used : AddInputOperation(org.alien4cloud.tosca.editor.operations.inputs.AddInputOperation) SetNodePropertyAsInputOperation(org.alien4cloud.tosca.editor.operations.nodetemplate.inputs.SetNodePropertyAsInputOperation) PropertyDefinition(org.alien4cloud.tosca.model.definitions.PropertyDefinition) When(cucumber.api.java.en.When)

Example 2 with SetNodePropertyAsInputOperation

use of org.alien4cloud.tosca.editor.operations.nodetemplate.inputs.SetNodePropertyAsInputOperation in project alien4cloud by alien4cloud.

the class InputPropertiesStepDefinitions method I_associate_the_property_of_a_node_template_to_the_input.

@Then("^I associate the property \"([^\"]*)\" of a node template \"([^\"]*)\" to the input \"([^\"]*)\"$")
public void I_associate_the_property_of_a_node_template_to_the_input(String property, String nodeTemplateName, String inputId) throws Throwable {
    SetNodePropertyAsInputOperation setNodePropertyAsInputOperation = new SetNodePropertyAsInputOperation();
    setNodePropertyAsInputOperation.setInputName(inputId);
    setNodePropertyAsInputOperation.setPropertyName(property);
    setNodePropertyAsInputOperation.setNodeName(nodeTemplateName);
    EditorStepDefinitions.do_i_execute_the_operation(setNodePropertyAsInputOperation);
    EditorStepDefinitions.do_i_save_the_topology();
}
Also used : SetNodePropertyAsInputOperation(org.alien4cloud.tosca.editor.operations.nodetemplate.inputs.SetNodePropertyAsInputOperation) Then(cucumber.api.java.en.Then)

Aggregations

SetNodePropertyAsInputOperation (org.alien4cloud.tosca.editor.operations.nodetemplate.inputs.SetNodePropertyAsInputOperation)2 Then (cucumber.api.java.en.Then)1 When (cucumber.api.java.en.When)1 AddInputOperation (org.alien4cloud.tosca.editor.operations.inputs.AddInputOperation)1 PropertyDefinition (org.alien4cloud.tosca.model.definitions.PropertyDefinition)1