Search in sources :

Example 1 with VolumeUsageType

use of com.sequenceiq.cloudbreak.domain.VolumeUsageType in project cloudbreak by hortonworks.

the class InstanceGroupEphemeralVolumeCheckerTest method createGroup.

private InstanceGroup createGroup(List<Pair<String, VolumeUsageType>> volumeTypes, InstanceGroupType groupType, String groupName) {
    InstanceGroup group = new InstanceGroup();
    group.setInstanceGroupType(groupType);
    group.setGroupName(groupName);
    Template template = new Template();
    group.setTemplate(template);
    template.setVolumeTemplates(Sets.newHashSet());
    for (Pair<String, VolumeUsageType> volumeType : volumeTypes) {
        VolumeTemplate volumeTemplate = new VolumeTemplate();
        volumeTemplate.setVolumeType(volumeType.getLeft());
        volumeTemplate.setUsageType(volumeType.getRight());
        template.getVolumeTemplates().add(volumeTemplate);
    }
    return group;
}
Also used : VolumeTemplate(com.sequenceiq.cloudbreak.domain.VolumeTemplate) VolumeUsageType(com.sequenceiq.cloudbreak.domain.VolumeUsageType) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) Template(com.sequenceiq.cloudbreak.domain.Template) VolumeTemplate(com.sequenceiq.cloudbreak.domain.VolumeTemplate)

Aggregations

Template (com.sequenceiq.cloudbreak.domain.Template)1 VolumeTemplate (com.sequenceiq.cloudbreak.domain.VolumeTemplate)1 VolumeUsageType (com.sequenceiq.cloudbreak.domain.VolumeUsageType)1 InstanceGroup (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup)1