use of alien4cloud.rest.topology.UpdatePropertyRequest in project alien4cloud by alien4cloud.
the class DeploymentTopologyStepDefinitions method i_update_the_capability_property_to_for_the_subtituted_node.
@When("^I update the capability \"(.*?)\" property \"(.*?)\" to \"(.*?)\" for the subtituted node \"(.*?)\"$")
public void i_update_the_capability_property_to_for_the_subtituted_node(String capabilityName, String propertyName, String propertyValue, String nodeName) throws Throwable {
Context context = Context.getInstance();
Application application = context.getApplication();
String envId = context.getDefaultApplicationEnvironmentId(application.getName());
UpdatePropertyRequest request = new UpdatePropertyRequest(propertyName, propertyValue);
String restUrl = String.format("/rest/v1/applications/%s/environments/%s/deployment-topology/substitutions/%s/capabilities/%s/properties", application.getId(), envId, nodeName, capabilityName);
String response = Context.getRestClientInstance().postJSon(restUrl, JsonUtil.toString(request));
context.registerRestResponse(response);
}
use of alien4cloud.rest.topology.UpdatePropertyRequest in project alien4cloud by alien4cloud.
the class DeploymentTopologyStepDefinitions method updateProperty.
private void updateProperty(String propertyName, Object propertyValue, String nodeName, String endpoint) throws IOException {
Context context = Context.getInstance();
Application application = context.getApplication();
String envId = context.getDefaultApplicationEnvironmentId(application.getName());
UpdatePropertyRequest request = new UpdatePropertyRequest(propertyName, propertyValue);
String restUrl = String.format(endpoint, application.getId(), envId, nodeName);
String response = Context.getRestClientInstance().postJSon(restUrl, JsonUtil.toString(request));
context.registerRestResponse(response);
}
Aggregations