use of com.sequenceiq.cloudbreak.structuredevent.event.InstanceGroupDetails in project cloudbreak by hortonworks.
the class InstanceGroupToInstanceGroupDetailsConverter method convert.
@Override
public InstanceGroupDetails convert(InstanceGroup source) {
InstanceGroupDetails instanceGroupDetails = new InstanceGroupDetails();
instanceGroupDetails.setGroupName(source.getGroupName());
instanceGroupDetails.setGroupType(source.getInstanceGroupType().name());
instanceGroupDetails.setNodeCount(source.getNodeCount());
Template template = source.getTemplate();
if (template != null) {
instanceGroupDetails.setInstanceType(source.getTemplate().getInstanceType());
instanceGroupDetails.setVolumeType(source.getTemplate().getVolumeType());
instanceGroupDetails.setVolumeSize(source.getTemplate().getVolumeSize());
instanceGroupDetails.setVolumeCount(source.getTemplate().getVolumeCount());
}
instanceGroupDetails.setSecurityGroup(conversionService.convert(source.getSecurityGroup(), SecurityGroupDetails.class));
return instanceGroupDetails;
}
use of com.sequenceiq.cloudbreak.structuredevent.event.InstanceGroupDetails in project cloudbreak by hortonworks.
the class StackToStackDetailsConverter method convert.
@Override
public StackDetails convert(Stack source) {
StackDetails stackDetails = new StackDetails();
stackDetails.setId(source.getId());
stackDetails.setName(source.getName());
stackDetails.setRegion(source.getRegion());
stackDetails.setAvailabilityZone(source.getAvailabilityZone());
stackDetails.setDescription(source.getDescription());
stackDetails.setCloudPlatform(source.cloudPlatform());
stackDetails.setPlatformVariant(source.getPlatformVariant());
stackDetails.setStatus(source.getStatus().name());
stackDetails.setDetailedStatus(source.getStackStatus().getDetailedStackStatus().name());
stackDetails.setStatusReason(source.getStatusReason());
stackDetails.setInstanceGroups((List<InstanceGroupDetails>) conversionService.convert(source.getInstanceGroups(), TypeDescriptor.forObject(source.getInstanceGroups()), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(InstanceGroupDetails.class))));
convertComponents(stackDetails, source);
convertNetwork(stackDetails, source.getNetwork(), source.cloudPlatform());
return stackDetails;
}
Aggregations