use of com.sequenceiq.cloudbreak.api.model.v2.TemplateV2Request in project cloudbreak by hortonworks.
the class OpenstackCloudProvider method template.
@Override
TemplateV2Request template() {
TemplateV2Request t = new TemplateV2Request();
String instanceTypeDefaultValue = "m1.xlarge";
String instanceTypeParam = getTestParameter().get("openstackInstanceType");
t.setInstanceType(instanceTypeParam == null ? instanceTypeDefaultValue : instanceTypeParam);
int volumeCountDefault = 1;
String volumeCountParam = getTestParameter().get("openstackInstanceVolumeCount");
t.setVolumeCount(volumeCountParam == null ? volumeCountDefault : Integer.parseInt(volumeCountParam));
int volumeSizeDefault = 50;
String volumeSizeParam = getTestParameter().get("openstackInstanceVolumeSize");
t.setVolumeSize(volumeSizeParam == null ? volumeSizeDefault : Integer.parseInt(volumeSizeParam));
String volumeTypeDefault = "HDD";
String volumeTypeParam = getTestParameter().get("openstackInstanceVolumeType");
t.setVolumeType(volumeTypeParam == null ? volumeTypeDefault : volumeTypeParam);
return t;
}
use of com.sequenceiq.cloudbreak.api.model.v2.TemplateV2Request in project cloudbreak by hortonworks.
the class AzureCloudProvider method template.
@Override
TemplateV2Request template() {
TemplateV2Request t = new TemplateV2Request();
String instanceTypeDefaultValue = "Standard_D3_v2";
String instanceTypeParam = getTestParameter().get("azureInstanceType");
t.setInstanceType(instanceTypeParam == null ? instanceTypeDefaultValue : instanceTypeParam);
int volumeCountDefault = 1;
String volumeCountParam = getTestParameter().get("azureInstanceVolumeCount");
t.setVolumeCount(volumeCountParam == null ? volumeCountDefault : Integer.parseInt(volumeCountParam));
int volumeSizeDefault = 100;
String volumeSizeParam = getTestParameter().get("azureInstanceVolumeSize");
t.setVolumeSize(volumeSizeParam == null ? volumeSizeDefault : Integer.parseInt(volumeSizeParam));
String volumeTypeDefault = "Standard_LRS";
String volumeTypeParam = getTestParameter().get("azureInstanceVolumeType");
t.setVolumeType(volumeTypeParam == null ? volumeTypeDefault : volumeTypeParam);
Map<String, Object> params = new HashMap<>();
params.put("encrypted", "false");
params.put("managedDisk", "true");
t.setParameters(params);
return t;
}
Aggregations