use of alien4cloud.it.Context in project alien4cloud by alien4cloud.
the class DeploymentTopologyStepDefinitions method doSubstitution.
public void doSubstitution(String templateName, String resourceId, String restUrlFormat) throws IOException {
Context context = Context.getInstance();
Application application = context.getApplication();
String envId = context.getDefaultApplicationEnvironmentId(application.getName());
String restUrl = String.format(restUrlFormat, application.getId(), envId, templateName);
NameValuePair resourceParam = new BasicNameValuePair("locationResourceTemplateId", resourceId);
String response = Context.getRestClientInstance().postUrlEncoded(restUrl, Lists.newArrayList(resourceParam));
context.registerRestResponse(response);
}
Aggregations