Search in sources :

Example 1 with AddInputOperation

use of org.alien4cloud.tosca.editor.operations.inputs.AddInputOperation 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)

Aggregations

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