use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.HostGroupV4Request in project cloudbreak by hortonworks.
the class ClusterCommonService method recreateCluster.
private FlowIdentifier recreateCluster(Stack stack, UpdateClusterV4Request updateCluster) throws TransactionExecutionException {
Set<HostGroup> hostGroups = new HashSet<>();
for (HostGroupV4Request json : updateCluster.getHostgroups()) {
HostGroup hostGroup = hostGroupV4RequestToHostGroupConverter.convert(json);
hostGroup = hostGroupDecorator.decorate(hostGroup, json, stack);
hostGroups.add(hostGroup);
}
return clusterOperationService.recreate(stack, updateCluster.getBlueprintName(), hostGroups, updateCluster.getValidateBlueprint());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.HostGroupV4Request in project cloudbreak by hortonworks.
the class HostGroupV4RequestToHostGroupConverterTest method testConvertWhenHostNameUpperCase.
@Test
public void testConvertWhenHostNameUpperCase() {
HostGroupV4Request source = new HostGroupV4Request();
source.setName("MixEdName");
HostGroup actual = underTest.convert(source);
assertEquals(actual.getName(), "mixedname");
}
Aggregations