use of com.sequenceiq.periscope.api.endpoint.v1.ConfigurationEndpoint in project cloudbreak by hortonworks.
the class AutoscalingUtil method configureAutoScaling.
static void configureAutoScaling(AutoscaleClient autoscaleClient, Long clusterId, int cooldown, int clusterMinsize, int clusterMaxSize) {
ConfigurationEndpoint configurationEndpoint = autoscaleClient.configurationEndpoint();
ScalingConfigurationRequest scalingConfigurationRequest = new ScalingConfigurationRequest();
scalingConfigurationRequest.setCoolDown(cooldown);
scalingConfigurationRequest.setMinSize(clusterMinsize);
scalingConfigurationRequest.setMaxSize(clusterMaxSize);
configurationEndpoint.setScalingConfiguration(clusterId, scalingConfigurationRequest);
ScalingConfigurationRequest scalingConfigurationTest = configurationEndpoint.getScalingConfiguration(clusterId);
Assert.assertEquals(cooldown, scalingConfigurationTest.getCoolDown());
Assert.assertEquals(clusterMinsize, scalingConfigurationTest.getMinSize());
Assert.assertEquals(clusterMaxSize, scalingConfigurationTest.getMaxSize());
}
Aggregations