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;
}
Aggregations