Search in sources :

Example 1 with RecommendationRequest

use of alien4cloud.rest.component.RecommendationRequest in project alien4cloud by alien4cloud.

the class DefineAsDefaultForCapabilityDefinitionsSteps method I_flag_the_node_type_as_default_for_the_capability.

@Given("^I flag the node type \"([^\"]*)\" as default for the \"([^\"]*)\" capability$")
public // @When("^I flag the node type \"([^\"]*)\" as default for the \"([^\"]*)\" capability$")
void I_flag_the_node_type_as_default_for_the_capability(String componentId, String capability) throws Throwable {
    RecommendationRequest recRequest = new RecommendationRequest(componentId, capability);
    String jSon = jsonMapper.writeValueAsString(recRequest);
    Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/recommendation", jSon));
}
Also used : RecommendationRequest(alien4cloud.rest.component.RecommendationRequest) Given(cucumber.api.java.en.Given)

Example 2 with RecommendationRequest

use of alien4cloud.rest.component.RecommendationRequest in project alien4cloud by alien4cloud.

the class DefineAsDefaultForCapabilityDefinitionsSteps method I_unflag_the_node_type_as_default_for_the_capability.

@When("^I unflag the node type \"([^\"]*)\" as default for the \"([^\"]*)\" capability$")
public void I_unflag_the_node_type_as_default_for_the_capability(String componentId, String capability) throws Throwable {
    RecommendationRequest recRequest = new RecommendationRequest(componentId, capability);
    String jSon = jsonMapper.writeValueAsString(recRequest);
    Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/unflag", jSon));
}
Also used : RecommendationRequest(alien4cloud.rest.component.RecommendationRequest) When(cucumber.api.java.en.When)

Aggregations

RecommendationRequest (alien4cloud.rest.component.RecommendationRequest)2 Given (cucumber.api.java.en.Given)1 When (cucumber.api.java.en.When)1