Search in sources :

Example 1 with Tags

use of com.sequenceiq.cloudbreak.api.model.v2.Tags in project cloudbreak by hortonworks.

the class StackToStackV2RequestConverter method prepareTags.

private void prepareTags(Stack source, StackV2Request stackV2Request) {
    try {
        StackTags stackTags = source.getTags().get(StackTags.class);
        if (stackTags.getUserDefinedTags() != null) {
            Tags tags = new Tags();
            tags.setApplicationTags(null);
            tags.setDefaultTags(null);
            tags.setUserDefinedTags(stackTags.getUserDefinedTags());
            stackV2Request.setTags(tags);
        }
    } catch (IOException e) {
        stackV2Request.setTags(null);
    }
}
Also used : StackTags(com.sequenceiq.cloudbreak.cloud.model.StackTags) IOException(java.io.IOException) Tags(com.sequenceiq.cloudbreak.api.model.v2.Tags) StackTags(com.sequenceiq.cloudbreak.cloud.model.StackTags)

Aggregations

Tags (com.sequenceiq.cloudbreak.api.model.v2.Tags)1 StackTags (com.sequenceiq.cloudbreak.cloud.model.StackTags)1 IOException (java.io.IOException)1