Search in sources :

Example 1 with UpdateTagRequest

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

the class ApplicationStepDefinitions method addTag.

private void addTag(String applicationId, String key, String value) throws JsonProcessingException, IOException {
    UpdateTagRequest updateTagRequest = new UpdateTagRequest();
    updateTagRequest.setTagKey(key);
    updateTagRequest.setTagValue(value);
    Context.getInstance().registerRestResponse(getRestClientInstance().postJSon("/rest/v1/applications/" + applicationId + "/tags", jsonMapper.writeValueAsString(updateTagRequest)));
}
Also used : UpdateTagRequest(alien4cloud.rest.component.UpdateTagRequest)

Example 2 with UpdateTagRequest

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

the class UpdateDeleteTagDefinitionsSteps method I_update_a_tag_with_key_and_value.

@When("^I update a tag with key \"([^\"]*)\" and value \"([^\"]*)\"$")
public void I_update_a_tag_with_key_and_value(String tagKey, String tagValue) throws Throwable {
    UpdateTagRequest updateTagRequest = new UpdateTagRequest();
    updateTagRequest.setTagKey(tagKey);
    updateTagRequest.setTagValue(tagValue);
    Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("/rest/v1/components/" + Context.getInstance().getComponentId(0) + "/tags", jsonMapper.writeValueAsString(updateTagRequest)));
}
Also used : UpdateTagRequest(alien4cloud.rest.component.UpdateTagRequest) When(cucumber.api.java.en.When)

Aggregations

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